Relocate PET Monitor Almost Anywhere

Started by Blacklord, August 09, 2009, 08:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Blacklord

RELOCATE:

0348 20 36 E2 Begin JSR 57910 ; clear screen
034B 20 AE F5       JSR 62894 ; INIT LOAD
034E AE 3A 03       LDX 826 ; start location
0351 AD 7E 02       LDA 638 ; end load high byte
0354 38             SEC ;
0355 ED 7C 02       SBC 636 ; start load high byte
0358 8D 3B 03       STA 827 ; offset
035B A9 04          LDA #4 ; normal start high byte
035D E0 01    Incre CPX #1 ; ready to load?
035F F0 07          BEQ Load ; YES
0361 18             CLC ; NO
0362 69 04          ADC #4 ; increment by 1K
0364 CA             DEX ;
0365 4C 5D 03       JMP Incre ;
0368 8D 7C 02 Load  STA 636 ; new start high byte
036B 85 7B          STA 123 ;new start BASIC pointer
036D 18             CLC ;
036E 6D 3B 03       ADC 827 ; add offset
0371 8D 7E 02       STA 638 ; new end high byte
0374 A9 37          LDA #55 ; #7 for screen store
0376 8D 18 81       STA 33048 ; Line 77 hopefully
0379 8D 19 81       STA 33049 ; not in program
037C A9 01          LDA #1 ; dynamic RETURN
037E 8D 0D 02       STA 525 ; to enter 77
0381 A9 0D          LDA #13 ; as a line to
0383 8D 0F 02       STA 527 ; reset line links
0386 4C C3 F3       JMP 62403 ; LOAD
0389                .END


LOAD ‘RELOCATE’
NEW

Rewind cassette to EXACT position for desired program.

POKE 826,X where X is the desired starting location for the load in increments of 1K (minimum 1K). Eg. if X = 7, the program will be loaded beginning at the 7K (7168 decimal) location.

Load with SYS 840. Note the contents of locations 123, 124, 125, 134, 135 to be able to return to this program. To return to the beginning of memory, POKE 135, PEEK( 123) : POKE 123, 4 : POKE 124, 4 : POKE 125, 4 : CLR.