home *** CD-ROM | disk | FTP | other *** search
-
- EXT MHL5DC,MHL4HC,MFN3,AT,VPSTR,GXYMSG,STNDEND,MUD,RETUD,IVPSTR
- EXT GETDUOK,DUTDIR,COPY8,LDFIL
- PUBLIC INFO,INFOMSG,DISPLAY,DSPSEC
-
- MACLIB ZPATCH.LIB
- ;
- ; DISPLAY THE SECTOR TO BE EDITED ON THE SCREEN
- ;
- DSPSEC:
- PUSH HL
- LD A,(LINE##)
- SBC 2
- LD (ROW),A
- ; CALL CLS
- CALL AT
- ROW: DB 0
- COL: DB 1
- LD HL,(OUTBUF##)
- call IVPSTR
- POP HL
- RET
- INFO:
- LD HL,FNM
- LD BC,25
- LD A,' '
- CALL LDFIL
-
- LD HL,VNO
- LD DE,(VERSION##)
- LD (HL),D
- LD A,'.'
- INC HL
- LD (HL),A
- INC HL
- LD (HL),E
- LD DE,DRV
- CALL GETDUOK
- JR Z,DIRFM
- CALL RETUD
- CALL MUD
- CALL DUTDIR
- JR Z,COLON
- LD A,'/'
- LD (DE),A
- INC DE
- DIRFM: CALL RETUD
- CALL DUTDIR
- JR Z,FN
- CALL COPY8
- COLON: LD A,':'
- LD (DE),A
- INC DE
- FN: LD HL,(FCB##)
- INC HL
- EX DE,HL
- CALL MFN3
- LD HL,(RECNUM##)
- INC HL ; BDOS numbers 0..n-1
- ; humans prefer 1..n
- LD DE,RN
- CALL MHL5DC
- LD DE,RHN
- CALL MHL4HC
- LD HL,(FILESIZE##)
- INC HL
- LD DE,LFILE
- CALL MHL5DC
- LD DE,LHFILE
- CALL MHL4HC
- LD A,(LINE##)
- SBC A,4
- LD (ROWI),A
- CALL GXYMSG
- ROWI: DB 1,1
- INFOMSG:
- DB 'ZPATCH '
- VNO: DB ' '
- DRV: DB 'A'
- FNM: DB ' '
- DB 1,'Rec. # ',2
- RN: DB ' ('
- RHN: DB ' H)'
- DB 1,' of ',2
- LFILE: DB ' ('
- LHFILE: DB ' H)',0dh,0ah,0dh,0ah,0
- RET
- DISPLAY:
- CALL INFO
- CALL DSPSEC
- RET
- end
- LFILE: DB ' ('
- LHFILE: DB ' H)',0dh