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
/
PRNTEP06.ARK
/
EPSON.MAC
< prev
next >
Wrap
Text File
|
1989-09-27
|
2KB
|
113 lines
.z80
.comment ~
This is a printing module for any Epson ?X-??? printer. It prints the contents
of the line buffer to the printer, using an <esc>*04<n2><n1> sequence to set up
the graphics.
~
true equ -1
false equ 0
dseg
grafixon: db '*',4,'$';the character (string) to send to the printer
;to turn on bit-image mode
hib4low equ false ;Look in your printer manual to determine how
;to set this. If true, then the high byte
;of the line length is sent first
prset2:: ;<--- DO NOT CHANGE THIS
; Set line spacing to 8/72", set condensed type.
;[Setting condensed type is a damn good idea since the header line tends
; to be on the long side!!]
db 27,'@',27,'C',70,27,'A',8,15 ;string to set the spacing for the printer
db '$'
preset:: ;<--- DO NOT CHANGE THIS
; Line spacing at 12/72" (1/6"), condensed type off
db 12,27,'@',27,'C',70,13
db '$' ;reset string
prtype:: ;<--- DO NOT CHANGE THIS
db 'Epson LX-800, 70 line paper'
db 13,10,'$'
cseg
pline:: ;<--- DO NOT CHANGE THIS. This symbol is the entry
; point to the routine
ld hl,print_bufr## ;find first thing to print to
ld de,575
add hl,de
ploop2: ld a,(hl)
or a
jr nz,found_end
dec hl
jr ploop2
found_end:
ld de,print_bufr## ;tell printer how many things to print
and a ;trash carry
sbc hl,de
inc hl ;this since the value in hl was an offset from
;the start of the buffer
ld a,h
or l
jr z,pnewline ;nothing, so skip the line
ld a,27
call wrlst##
ld de,grafixon
call lpstr##
if hib4low
ld a,h
else
ld a,l
endif
call wrlst##
if hib4low
ld a,l
else
ld a,h
endif
call wrlst##
ld c,l
ld b,h ;transfer to bc
ld hl,print_bufr##
prit: ld a,(hl)
call wrlst##
inc hl
dec bc
ld a,c
or b
jr nz,prit ;do a line
pnewline:
ld a,13
call wrlst##
ld a,10
call wrlst##
ld hl,prlincnt##
; The main program uses prlincnt## to determine when it reaches the
; end of the file, hence it is essential to increment it if you want
; to avoid grabage after your picture. [note this doesn't happen very
; often, but better safe than sorry, eh?]
inc (hl)
ret ;done!
end