home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
BEEHIVE
/
UTILITYS
/
GPATCH.ARC
/
GVEC.Z80
< prev
Wrap
Text File
|
1990-07-21
|
2KB
|
90 lines
;Patches to GBASIC. Mar 87. K.C.M. Lau.
;Assem with ZASM (Cromemco). Overlay HEX file using DDT. Also overlay GNEW.HEX
;No. of pages to save is 100 dec + (newlen / 100h)
;-------- Modify searchbyte -------
org 0C8Ch
db 0A9h ;search byte at BDOS - 6
disp equ 1FF2h ;relocation displacement
scrn equ 8477h ;runtime position of screen code translation table
;-------- Relocate screen table --------
org 256Bh
dw scrn
org 2586h
dw scrn+1
org 2593h
dw scrn+1
org 6444h ;new shortened signon
db '[Starcard CP/M Version]',0Dh,0Ah
db 'Copyright (C) 1980 by Microsoft',0Dh,0Ah
db 0
org scrn-disp ;new screen code translation table
db 20h,1Bh,0AAh,0D9h,0D4h,0EBh,0EAh,1Eh,0BDh,0Bh,0Ch
;-------- Move GNEW --------
newst equ 1000h ;runtime addr of GNEW
newlen equ 0800h ;length of GNEW (moved to 1000h at runtime)
org 1000h ;modify stage 1 relocation (bulk)
ld hl,64FFh+newlen
ld de,64FFh+newlen+disp
ld bc,64FFh+newlen+disp-3000h+1
lddr
jp 84D2h
org 84D2h-disp ;add stage 2 relocation (SUBR --> 1000h)
ld hl,6500h+disp
ld de,newst
ld bc,newlen
ldir
jp 81D3h
;-------- Patch vectors --------
;location of command vector is (token - 80h) * 2 + 106h
org 01A8h
dw newst ;HGR (token 0D1h)
dw newst+06h ;HPLOT (token 0D2h)
dw newst+03h ;HCOLOR (token 0D3h)
org 3C86h-disp
dw newst+09h ;function HCOLOR
org 3C90h-disp
dw newst+0Ch ;function HSCRN
org 0192h
dw newst+0Fh ;TEXT
org 019Eh
dw newst+12h ;GR
org 01A0h
dw newst+15h ;COLOR
org 01A6h
dw newst+18h ;PLOT
org 3C81h-disp
dw newst+1Bh ;function COLOR
org 3C8Bh-disp
dw newst+1Eh ;function SCRN
org 01A2h
dw newst+21h ;HLIN
org 01A4h
dw newst+24h ;VLIN
org 021Ah
dw newst+27h ;function PDL ()
org 021Ch
dw newst+2Ah ;function BUTTON ()
org 01AEh
dw newst+2Dh ;BEEP
org 7250h-disp
dw newst+30h ;CALL%
org 62A6h-disp
jp newst+33h ;EDIT
end
TTON ()
org 01AEh
dw newst+2Dh ;BEEP
org 7250h-disp
dw newst+30h ;CALL%
org 62A6h-disp
jp newst+33h ;EDIT