home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug012.arc
/
BASMODS.LBR
/
DUMPER.MAC
< prev
Wrap
Text File
|
1979-12-31
|
2KB
|
127 lines
;This program is designed to enable Ver 6.22e Microworld basic
;to have a Graphics screen dump whenever the ^P key is pressed
;THIS PROGRAM WILL NOT WORK PROPERLY ON ITS OWN
;For the program to work properly a patch needs to be added to Basic 6.22e
; i.e. @ A47E & F change from 04 A5 to 3D and C6 respectively.
.Z80
.RADIX 16D
;DUMPER Dumps screen to printer
;Printer type selected by OUTL# % from BASIC or Default LIST device
; RESIDES 0C63DH
; LOOK FOR ^P KEY AND IF FOUND THEN CALL DUMPER ROUTINE
CALL 0A504H ;TEST FOR CONTROL KEY
RET NZ ;NOT CONTROL SO RETURN
PUSH AF
CP 10H
JP Z,DUMP+0C53DH-3 ; DO GRAPHICS SCREEN DUMP
POP AF
RET
;SCREEN DUMP ROUTINE BASED ON WILDCARDS Vol 2
DUMP: PUSH BC
PUSH DE
PUSH HL
PUSH IX
XOR A
LD (0109),A;Clear handshake byte for parallel port
LD A,8
LD (80),A ;Interrupt vector
LD A,1BH ;ESC
CALL 8045
LD A,40 ;"@"
CALL 8045 ;reset printer
LD A,1BH ;"ESC"
CALL 8045
LD A,41 ;"A"
CALL 8045 ;Set LF to
LD A,8
CALL 8045 ;8/72"
LD IX,0F000; Point to start of screen
XOR A
LD (07FEH),A
LD A,1BH ;"ESC"
CALL 8045
LD A,4BH ;"K"
CALL 8045 ;Set up Dot graphics mode
XOR A
CALL 8045 ;N1=0
LD A,2
CALL 8045 ;N2=2 line length =512 bits
LD A,80
LD (07FFH),A
LD H,0FH
LD L,(IX+0)
ADD HL,HL
ADD HL,HL
ADD HL,HL
ADD HL,HL
LD A,(07FEH)
ADD A,L
LD L,A
LD A,1
OUT (0BH),A ;Set bit 1 to examine Char ROM
LD B,(HL)
XOR A
OUT (0BH),A ;Reset ROM latch
LD A,(07FFH)
AND B
JR Z,$+3H
CCF
RL C
INC HL
LD A,L
AND 07
JR NZ,$-15H
LD A,C
CALL 8045
LD DE,0FFF8
ADD HL,DE
LD A,(07FFH)
RRCA
LD (07FFH),A
JR NC,$-26H
INC IX ;Look at next screen location
DEFW 7DDDH
DEFW 3FE6
JR NZ,$-41H
LD A,0AH
CALL 8045
LD A,(07FEH)
AND A
JR NZ,$+0EH
LD A,8
LD (07FEH),A
LD DE,0FFC0
ADD IX,DE
JR $-6BH
DEFW 7CDDH
DEFW 0F4FEH
JR NZ,$-75H
LD A,1BH
CALL 8045
LD A,40 ;"@"
CALL 8045 ;Reset printer
POP IX
POP HL
POP DE
POP BC
POP AF
LD A,0AH ;LOAD IN A LF CHAR
RET
END