diff --git a/SP_128.ASM b/SP_128.ASM index 5b7c2f2..0480f7b 100644 --- a/SP_128.ASM +++ b/SP_128.ASM @@ -876,9 +876,9 @@ NMI_POINT: ; BLOCK #6B-$,0 -; ============ -; RAM ROUTINES -; ============ +; ============ +; RAM ROUTINES +; ============ ; The following code will be copied to locations #5B00 to #5B57, within the old ZX Printer buffer. ; ----------------- @@ -922,6 +922,7 @@ NMI_POINT: ; ENT ;SWAP_ROM +RAM_ROUTINES: L006B: PUSH AF ; Save AF and BC. PUSH BC ; LD BC,#7FFD ; @@ -1012,7 +1013,9 @@ L00B5: EX AF,AF' ; Save AF registers. For a read, A holds the byte read OUT (C),A ; Switch back to original paging configuration. EI ; EX AF,AF' ; Restore AF registers. For a read, A holds the byte read and the flags the success status. - RET ; <<< End of RAM Routines >>> + RET +RAM_ROUTINES.Size EQU $-RAM_ROUTINES +;<<<<<<<<<<<<<<<<<<<<<<<<< End of RAM Routines >>>>>>>>>>>>>>>>>>>>>>>>>; ; =============================== @@ -1142,10 +1145,10 @@ L0137: LD B,D ; Complete setting up the sound chip registers. LD A,#FF ; Disable AY-3-8912 sound channels. OUT (C),A ; - LD DE,SWAP_ROM ; #5B00. Copy the various paging routines to the old printer buffer. - LD HL,L006B ; The source is in this ROM. - LD BC,L006B.Size; There are eighty eight bytes to copy. - LDIR ; Copy the block of bytes. + LD DE,SWAP_ROM ; #5B00. Copy the various paging routines to the old printer buffer. + LD HL,RAM_ROUTINES ; The source is in this ROM. + LD BC,RAM_ROUTINES.Size ; There are eighty eight bytes to copy. + LDIR ; Copy the block of bytes. LD A,#CF ; Load A with the code for the Z80 instruction 'RST #08'. LD (RAMRST),A ; #5B5D. Insert into new System Variable RAMRST. diff --git a/SP__48.ASM b/SP__48.ASM index dc3f4e6..8c9301e 100644 --- a/SP__48.ASM +++ b/SP__48.ASM @@ -18971,17 +18971,14 @@ L3B3B: BIT 4,(IY+$01) ; FLAGS 3 - In 128K mode? JR NZ,L3B46 ; NZ=128K mode ; In 48K mode - XOR A ; Replicate code from standard ROM that the patch over-wrote LD DE,$1536 RET ; In 128K mode - L3B46: LD HL,$010F ; Vector table entry in Editor ROM -> JP $03A2 ; Return to Editor ROM at address in HL - L3B49: EX (SP),HL ; Change the return address JP $5B00 ; Page Editor ROM and return to the address on the stack @@ -18993,12 +18990,10 @@ L3B4D: BIT 4,(IY+$01) ; In 128K mode? JR NZ,L3B58 ; NZ=128K mode ; In 48K mode - BIT 7,(IY+$0A) ; replicate code from standard ROM that the patch over-wrote RET ; In 128K mode - L3B58: LD HL,$0112 ; Handle in Editor ROM by jumping to Vector table entry in Editor ROM -> JP #182A JR L3B49 @@ -19010,7 +19005,6 @@ L3B5D: BIT 4,(IY+$01) ; In 128K mode? JR NZ,L3B67 ; NZ=128K mode ; In 48K mode - RST 18H ; replicate code from standard ROM that the patch over-wrote CP $0D RET