home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpm
/
list
/
send.lbr
/
SEND.AQM
/
SEND.ASM
Wrap
Assembly Source File
|
1987-05-23
|
1KB
|
69 lines
;
; SEND.ASM Version 1.0
; -- send a preconfigured string to the LST: device
;
; USAGE:
;
; A>SEND
;
; Any parameters in the command tail will be ignored.
;
; Version 1.0 (May 15, 1987):
; Gene Pizzetta
; 481 Revere Street
; Revere, MA 02151
; Compuserve
; FOG #29
; Voice (617) 284-0891
;
; Assemble with MAC.
;
WBoot equ 00h
Bdos equ 05h
TPA equ 100h
LstOut equ 05h
PrtStr equ 09h
LF equ 0Ah
CR equ 0Dh
;
org TPA
jmp MAIN
SIGNON: db 'SEND v1.0 -- Gene Pizzetta',CR,LF,LF
db 'Sending string to LST:',CR,LF,'$'
;
DONE: db 'DONE',CR,LF,'$'
;
db '---STRING-->' ; marker for beginning of string
STRING: db 0FFh ; string may be up to 64 bytes and
ds 120 ; must end with 0FFh
db '<--END---' ; marker for end of string
;
MAIN: push psw
lxi d,SIGNON
mvi c,PrtStr ; print sign on
call Bdos
pop psw
;
LIST: lxi h,STRING ; HL --> string
LOOP: mov a,m ; get byte <-- HL
cpi 0FFh ; end of string?
jz EXIT ; (yes)
push psw
push h ; save HL
mov e,a ; move byte to E
mvi c,LstOut ; ..and send it to printer
call Bdos
pop h ; recover our string pointer
pop psw
inx h ; ..increment it
jmp LOOP ; ..and get another byte
;
EXIT: push psw
lxi d,DONE
mvi c,PrtStr ; print "done"
call Bdos
pop psw
jmp WBoot
;
end