Locomotive BASIC Version check

You can check your Locomotive BASIC version with this short BASIC listing:

10 MODE 2:FOR i=0 TO 24:READ a:POKE &4000+i,a:NEXT:CALL &4000
20 PRINT"Version ";PEEK(0);".";(PEEK(1)*10+PEEK(2))  
30 DATA &0E,&00,&CD,&0F,&B9,&C5,&21,&01
40 DATA &C0,&11,&00,&00,&01,&03,&00,&ED
50 DATA &B0,&C1,&78,&CD,&0F,&B9,&C3,&0C
60 DATA &B9

The data correspond to this little assembly routine:

KL_ROM_RESTORE	equ &B90C
KL_ROM_SELECT	equ &B90F
 
		org &4000
 
		; Select and enable Upper ROM 0 (BASIC)
		ld c,0
		call KL_ROM_SELECT
		push bc
 
		; (&C001) = Mark number
		; (&C002) = Version number
		; (&C003) = Revision level
		ld hl,&C001
		ld de,&0000
		ld bc,3
		ldir
 
		; Restore previous Upper ROM state
		pop bc
		ld a,b
		call KL_ROM_SELECT
		jp KL_ROM_RESTORE
documentations/software/locomotive.basic/romversion.txt · Last modified: 2012/06/15 20:56 by grim