DataMuseum.dk

Presents historical artifacts from the history of:

Jet Computer Jet80

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Jet Computer Jet80

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦5736acc5c⟧ TextFile

    Length: 1152 (0x480)
    Types: TextFile
    Names: »LOAD«

Derivation

└─⟦073ff2c3b⟧ Bits:30002864 Assembler (RMAC), linker, libraries etc. for JET80
    └─ ⟦this⟧ »LOAD« 

TextFile

	;Z8 machine code routine to load
	;HEX file into ARC
;
ORG %1530
;
BUFF:	EQU	#%30
BPNTR:	EQU	R14
NXTBYT:	EQU	@R14
CKSM:	EQU	R15
ERCNT:	EQU	R1
;
	SRP	#%20
	CLR	ERCNT
LOOP:	LD	BPNTR,BUFF	;Buffer pointer
LOOP1:	CALL	CONIN
	CP	R3,#%3A
	JR	NZ,LOOP1	;Wait for colon
	CLR	CKSM
	CALL	HEXSUM		;Block length
	AND	R9,#%1F
	JR	Z,EXIT
	LD	R13,R9
	LD	R12,R9
	CALL	HEXSUM
	LD	R10,R9		;HI addr.
	CALL	HEXSUM
	LD	R11,R9		;LO addr.
	ADD	R11,19
	ADC	R10,18		;Add in offset
	CALL	HEXSUM
LOOP2:	CALL	HEXSUM
	LD	NXTBYT,R9
	INC	BPNTR
	DEC	R13
	JR	NZ,LOOP2
	CALL	HEXSUM
	JR	Z,STORE		;Checksum zero
	INC	ERCNT		;Error count
	JR	LOOP
STORE:	LD	BPNTR,BUFF
STOR1:	LDCI	@RR10,NXTBYT	;Move buffer
	DEC	R12
	JR	NZ,STOR1
	JR	LOOP
EXIT:	SRP	#%10
	RET
HEXSUM:	CALL	HEX1		;Get byte and inc. checksum
	LD	R9,R3
	SWAP	R9
	CALL	HEX1
	ADD	R9,R3
	ADD	R15,R9		;Checksum
	RET
HEX1:	CALL	CONIN		;Get nibble
	SUB	R3,#%30
	CP	R3,#10
	JR	C,LT10
	SUB	R3,#7
LT10:	AND	R3,#15
	RET
CONIN:	TM	IRQ,#8		;Input routine w/o reflection
	JR	Z,CONIN
	LD	R3,SIO
	AND	R3,#%7F
	AND	IRQ,#%E7
	RET
	END
«eof»