Authors
Publication
Pub Details
Date
January 1992
Pages
12
BASIC Terms
See all articles from LISTing Newsletter January 1992
Relocates a machine code program to new location in RAM.
1 REM THIS TAPE WAS DONATED BY TORONTO TIMEX SINCLAIR USER'S GROUP.
2 REM MODIFIED AND COPIED BY ALGIS E. GEDRIS DECEMBER 20, 1986
3 REM "2068" COMPUTER
9500 REM RELOCATE
9505 PRINT "Note:- This program will relocate a machine code program to a new location in RAM. Since it is in BASIC, it i s rather slow. "''"Follow the instructions."
9510 INPUT "Enter new start address",ns
9520 INPUT "Enter old start address",OS
9530 INPUT "Enter old end address",oe
9540 LET a=ns-os
9550 FOR i=os TO oe
9560 LET v=PEEK (i+1)+256*PEEK (i+2)
9570 IF (PEEK i=17 OR PEEK i=33 OR PEEK i=34 OR PEEK i=42 OR PEEK i=50 OR PEEK i=83 OR PEEK i=91 OR PEEK i=115 OR PEEK i=194 OR PEEK i=195 OR PEEK i=196 OR PEEK i=202 OR PEEK i=204 OR PEEK i=205 OR PEEK i=210 OR PEEK i=212 OR PEEK i=218 OR PEEK i=220 OR PEEK i=218 OR PEEK i=220 OR PEEK i=242) AND v>=os AND v<=oe THEN POKE i+a, PEEK i: POKE i+1+a,(v+a)-256*INT ((v+a)/256): POKE i+a+2, INT ((vta)/256): LET i=i+2 : GO TO 9590
9580 POKE i+a, PEEK i
9590 NEXT i: CLEAR (ns-1)
9595 STOP
9998 SAVE "RELOC" LINE 9500
Products
Media
Image Gallery
Source Code
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.