Classic Computer Magazine Archive COMPUTE II ISSUE 2 / JUNE/JULY 1980

KIM-1 Tidbits

Harvey B. Herman
Chemistry Department
University of North Carolina at Greensboro
Greensboro, N.C. 27412

I have been using KIM for a number of years and wish to share programs which I have developed or modified with the readers of Compute II.

The first item is a modification to the KIM tape verify program from Issue #13 of 6502 User's Notes. This program has a small bug which affects TTY use. The TTY delay characters (CNTL30/CNTH30) are stored in $17F2 and $17F3 and are overwritten by a section (VEB) of the original verify program. Instead of the comforting KIM message on completion of the program, all I got was a meaningless chugging. The following program (origin $300) circumvents the problem by shortening the VEB section so the delay characters remain intact. I now include this in KIM Microsoft BASIC, as the User program, so I can check tapes after a SAVE.

Item 2 is a modification to KIM Microsoft BASIC (serial number 9011) which allows one to append programs on tape to the current one (if any) in memory. Line numbers must be higher in the appended program and cannot overlap. Otherwise the only noticeable change is that one must remember to NEW before LOAD when appending is not desired. I have found this very helpful in conjunction with a renumbering program, written in BASIC (see 6502 User's Notes no. 13, p. 12).

I hope these programs will be found useful and plan to share other tidbits with Compute II readers in the future.

 	 	 	 	0100 	; 	 	
 	 	 	 	0110 	;KIM TAPE VERIFY PROGRAM 	 	
 	 	 	 	0120 	; 	 	
 	 	 	 	0130 	; HARVEY B. HERMAN 	 	
 	 	 	 	0140 	; 	 	
 	 	 	 	0150 	 	.BA 	$300
 	 	 	 	0160 	 	.OS 	
 	 	 	 	0170 	CHKL 	.DE 	$17E7
 	 	 	 	0180 	CHKH 	.DE 	$17E8
 	 	 	 	0190 	VEB 	.DE 	$17EC
 	 	 	 	0200 	LOAD12 	.DE 	$190F
 	 	 	 	0210 	LOADT9 	.DE 	1929
0300- 	D8 	 	 	0220 	VERIFY 	CLD 	
0301- 	A9 	00 	 	0230 	 	LDA 	#$00
0303- 	8D 	E7 	17 	0240 	 	STA 	CHKL
0306- 	8D 	E8 	17 	0250 	 	STA 	CHKH
0309- 	A2 	06 	 	0260 	 	LDX 	#$06
030B- 	BD 	16 	03 	0270 	LOADP 	LDA 	PROG-1,X
030E- 	9D 	EB 	17 	0280 	 	STA 	VEB- 1,X
0311- 	CA 	 	 	0290 	 	DEX 	
0312- 	D0 	F7 	 	0300 	 	BNE 	LOADP
0314- 	4C 	BC 	18 	0310 	 	JMP 	$188C
0317- 	CD 	00 	00 	0320 	 	PROG 	.BY 	$CD $00 $00
031A- 	4C 	1D 	03 	0330 	 	.BY 	$4C $1D $03
031D- 	D0 	03 	 	0340 	PATCH 	BNE 	FAILED
031F- 	4C 	0F 	19 	0350 	 	JMP 	LOAD12
0322- 	4C 	29 	19 	0360 	FAILED 	JMP 	LOADT9
 	 	 	 	0370 	 	.EN 	

 	 	 	 	0100 	; 	 	
 	 	 	 	0110 	;APPEND MODIFICATIONS TO 	 	
 	 	 	 	0120 	;KIM MICROSOFT BASIC 	 	
 	 	 	 	0130 	;SERIAL NUMBER 9011
 	 	 	 	0140 	; 	 	
 	 	 	 	0150 	; HARVEY B. HERMAN 	 	
 	 	 	 	0160 	; 	 	
 	 	 	 	0170 	 	.BA 	$2785
 	 	 	 	0180 	;ADJUST TAPE LOAD POINTERS 	 	
2785- 	38 	 	 	0190 	NEWLOAD SEC 	
2786- 	A5 	7A 	 	0200 	 	LDA 	#$7A
2788- 	E9 	03 	 	0210 	 	SBC 	#$03
278A- 	8D 	F5 	17 	0220 	 	STA 	$17F5
278D- 	A5 	7B 	 	0230 	 	LDA 	*$7B
 	 	 	 	0240 	;NAIVE HARVEY 	 	
278F- 	B0 	02 	 	0250			BCS 	SKIP
2791- 	E9 	00 	 	0260			SBC 	#$00
2793- 	8D 	F6 	17 	0270 	SKIP		STA 	$17F6
 	 	 	 	0280 	;ORIGINAL 	CODE 	CONTINUES
 	 	 	 	0290			.BA 	$2744
 	 	 	 	0300 	;ASSIGN ID 	01 TO TAPES 	
2744- 	A9 	01 	 	0310			LDA 	#$01
 	 	 	 	0320			.BA 	$2026
 	 	 	 	0330 	;POINTER TO 	NEWLOAD 	
2026- 	84 	27 	 	0340			.SI 	NEWLOAD- 1
 	 	 	 	0350			.EN