Publication: The Data Expansion
Pub Details: The Data Expansion v5 n4 (Volume 5, Issue 4)
Date: April 1988
Pages: 3-4
CONTINUED
BASIC PART: UPLOAD MACHINE CODE:
=========== ====================
1 REM [your machine code] 40D8 213075 UPLOAD: LD HL, 7530
2 REM [UPLOAD machine code] 220440 LD(RAMTOP),HL
10 ) -- your 2B DEC HL
--- ) -- BASIC 363E LD (HL),3E
--- ) --program 2B DEC HL
--- ) -- listing 3600 LD (HL),00
8999 STOP 2B DEC HL
9000 SAVE "NAME" 3606 LD (HL),06
9010 RAND USR 16600 2B DEC HL
9020 RUN 3676 LD (HL),76
220240 LD (ERR.SP), HL
F9 LD SP, HL
218240 LD HL, SOURCE
113075 LD DE, DESTINATION
015000 LD BC, # OF BYTES
EDB LDIR
C9 RET
34 BYTES
To determine the address of “UPLOAD”, PEEK 16511 + 256 * PEEK 16512 + 4 using a direct command. Then add this number to 16514. The result will be the required address. In my example there are no extra bytes in 1 REM. Therefore the PEEK would give 86. 16514 + 86 = 16600
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.