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
/
MBUG
/
MBUG081.ARC
/
LPRINT.ASC
< prev
next >
Wrap
Text File
|
1979-12-31
|
2KB
|
99 lines
;12-NOVEMBER-1983
;110 BAUD PROGRAM WRITTEN BY P.TANDY
;FOR MICROBEE 16K PLUS
;DESIGNED FOR WESTREX TELETYPE
;TELETYPE USES ASCII CHARACTOR SET
ORG 014DH
LD HL,TTYIN
LD (0BCH),HL ;SET PRINT ADDR
LD HL,(0A2H)
JP (HL) ;WARM START
TTYIN CALL SPEED ;SET EA TO 0
LD C,A ; STORE A CONTENTS
LD A,0C3H
LD (015BH),A ;CHANGE PROGRAM
LD A,06FH
LD (015CH),A ;TO JP ROUND
LD A,01H
LD (015DH),A ;CLEAR COUNTER
LD HL,090H ;COUNTER FOR 72
LD (HL),00 ;CHARACTORS
LD A,C ;PUT CHARACTOR BACK
CP 0DH ;SEE IF CR
JP Z,ADDR1
LD HL,090H
LD A,(HL)
CP 47H ;COUNT LENGTH
JP Z,ADDR2
ADDR3 LD A,C
INC (HL)
CP 24H
JP NZ,RUN
LD A,5CH ;CHNG POUND TO $
RUN JP GO
ADDR1 LD HL,090H
LD (HL),00
JP RUN
ADDR2 LD (HL),00
LD HL,091H ;STORE 73 CHARACTOR
LD A,C
LD (HL),A
LD A,0DH ;FEED IN CR
CALL RUN
LD A,0AH ;FEED IN LF
CALL RUN
LD A,(HL)
LD HL,090H
JP ADDR3
GO PUSH BC
PUSH AF
CTS IN A,(02)
BIT 3,A ;CLEAR TO SEND
JR Z,CTS
POP AF
OR A
CALL PRINT
LD B,08H ;8 DATA BITS
BIT RRCA
CALL PRINT ;GET START BIT
DJNZ BIT
SCF ;SET CARRY FLAG
CALL PRINT ;FOR STOP BIT
CALL PRINT
POP BC
RET
PRINT PUSH AF
PUSH BC
IN A,(02) ;READ PIO
RES 5,A
JR NC,STBIT ;SEE IF STOP BIT
SET 5,A
STBIT OUT (02),A ;PRINT IT
LD DE,760 ;110 BAUD SPEED
LD A,(0EAH)
OR A
JR Z,DELAY
LD B,02CH
DELAY DEC DE ;9.09 MILSEC DELAY
LD A,D
OR E
JR NZ,DELAY
POP BC
POP AF
RET
SPEED PUSH AF
XOR A
LD (0EAH),A
POP AF
RET
END