home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
sigm
/
vol182
/
pbh.lbr
/
PBH.AQM
/
PBH.ASM
Wrap
Assembly Source File
|
1985-02-09
|
20KB
|
792 lines
;
;FILENAME: PBH.ASM
;
;TITLE: PRINT BLOCKHEAD
;
;REV 4 12-5 81 ADD CONDITIONAL ASSEMBLY FOR NON-
;FORM FEED PRINTER
;
;REV 3 3-8-81 CHG MAXCHR TO MEM LOC CBM
;
;REV 2 3-8-81 ADD SUBROUTINES AND CHANGES TO
;ALLOW FOR * TITLE OPERATION *
;
;REV 1 3-7-81 CHANGE MOVE FILE NAME ROUTINE TO CURE
;PROBLEM OF PRINTING DRIVE SELECT & COLON WHEN
;INPUTING DRIVE: FILENAME.TYPE * CBM
;
;ORIGIN DATE: 3-1-81
;
;HISTORY: THIS PROGRAM IS A MERGING OF THE "PRNT" FILE
;FROM THE CPM USER GROUP LIBRARY AND "MASTHEAD" BY
;EMILIO D. IANNUCCILLO, BASED ON THE BASIC VERSION BY
;LEO P. BIESE. INTERFACE AGE MAGAZINE 8/80 PG 122.
;THE TWO FILES WERE MERGED ON 3-1-81 BY C. B MUELLER
;WITH ASSISTANCE FROM DON LAYCOCK.
;HOW TO USE:
;TO PRINT A FILE WITH NO BLOCK TITLE ENTER;
;PBH FILENAME.TYPE<CR>
;TO PRINT A FILE WITH A BLOCK TITLE THE SAME AS THE
;FILE NAME ENTER; PBH FILENAME.TYPE<SP>*
;TO PRINT A FILE WITH A DESIRED BLOCK TITLE ENTER;
;PBH FILENAME.TYPE<SP>TITLE
;TO PRINT A BLOCK TITLE ONLY ENTER:
;*<SP>TITLE
;8 CHARACTERS WILL FIT ON A 8 1/2" WIDE PAGE AND
;14 CHARACTERS WILL FIT ON A 14" WIDE PAGE.
;TO CHANGE THE NUMBER OF CHARACTERS CHANGE MAXCHR
;IN THE EQUATE TABLES.
;
TRUE EQU 0FFFFH
FALSE EQU NOT TRUE
;
;SET FORM TRUE IF YOUR PRINTER CAN ACCEPT FORM FEEDS
;
FORM EQU FALSE
;
MAXLN EQU 56 ;LINES PER PAGE -8
FFNUL EQU 12 ;NULLS AFTER A FORM FEED
PGSPC EQU 6 ;NUMBER OF LINES BETWEEN PAGES
TBUFF EQU 80H ;TRANSIENT PROGRAM BUFFER
TFCB EQU 5CH ;TRANSIENT PROGRAM FCB
;
OPEN EQU 15 ;OPEN FUNCTION CODE
READ EQU 20 ;READ FUNCTION CODE
;
LPCMD EQU 5 ;LINE PRINT COMMAND
CLCMD EQU 9 ;CONSOLE COMMAND
BDOS EQU 5
;
CR EQU 0DH
LF EQU 0AH
;
CHR1 EQU 'A'
CHR2 EQU 'W'
CHR3 EQU 'O'
;
; MAIN LOOP
;
ORG 100H
LXI H,0 ;CPM
DAD SP ;BOOT
SHLD CPMRET ;RETURN
LXI SP,STACK
CALL BHCHK ;TEST FOR BLOCKHEAD
CALL FCHK ;TEST FOR VALID FILE
JMP BH ;PRINT BLOCKHEAD TITLE
PRINT: LXI D,WRKMSG ;LOAD WORKING MSG
CALL CONPRT ;SEND IT TO CONSOLE
CALL TOF3 ;PRINT HEADER LINE
MVI A,9 ;LOAD LINES TO SKIP
STA LINECNT ;PUT IN LINE COUNT STORAGE
JMP LOOP
FCHK: LXI D,TFCB ;POINT TO FCB
CALL FOPEN ;OPEN FILE
JC ERR1 ;IF ERROR, EXIT
RET
PRINT1: CALL FCHK ;TEST FOR VALID FILE
LXI D,WRKMSG ;LOAD WORKING MESSAGE
CALL CONPRT ;SEND IT TO CONSOLE
CALL TOF3 ;PRINT HEADER LINE
LOOP: CALL GETBT ;GET A BYTE
JC ERR ;ERROR
CPI 1AH ;EOF?
JZ DONE ;YES
CPI CR ;CR?
JZ CRET ;YES
CPI 09H ;TAB?
JNZ LOOPX ;NO, CONTINUE
LXI H,COL ;POINT TO COLUMN
TBLP: MVI A,' ' ;LOAD ONE SPACE
CALL PBYT ;SEND IT
MOV A,M ;GET COLUMN
ANI 07H ;MODULO 8
JNZ TBLP ;IF NOT AT TAB STOP, KEEP TYPEING
JMP LOOP
LOOPX: CALL PBYT ;PRINT BYTE
JMP LOOP
CRET: LDA LINECNT ;GET LINE COUNT
CPI MAXLN ;PAGE OVERFLOW?
JZ CRET2 ;YES
INR A ;BUMP LINE COUNT
STA LINECNT
XRA A
STA COL
MVI A,CR
JMP LOOPX ;CONTINUE
CRET2: MVI A,CR ;LOAD CR
CALL PBYT ;PRINT CR
CALL TOF
JMP LOOP
TOF:
IF FORM
;
MVI A,0CH ;LOAD FORM FEED
CALL PBYT ;SEND IT
MVI B,FFNUL ;NUMBER OF RUBOUTS
TOF1: MVI A,7FH ;LOAD RUBOUT
CALL PBYT ;SEND IT
DCR B ;DCREMENT COUNT
JNZ TOF1 ;PRINT 'N' RUBOUTS
ENDIF
;
IF NOT FORM
TOF: MVI B,PGSPC ;LOAD NBR LINES TO SKIP
TOF1: MVI A,CR ;LOAD CR
CALL PBYT ;SEND IT
MVI A,LF ;LOAD LF
CALL PBYT ;SEND IT
DCR B ;ONE LINE SKIPED
JNZ TOF1 ;IF NOT 0 DO IT AGAIN
ENDIF
;
TOF3: LXI H,FMSG ;POINT TO MESSAGE
CALL PSTRNG ;PRINT STRING
LXI H,TFCB+1 ;POINT TO FILENAME
MVI B,8 ;SIZE OF FILENAME
CALL PCNT ;PRINT FILENAME
MVI A,' ' ;LOAD A SPACE
CALL PBYT ;SEND IT
LXI H,TFCB+9 ;POINT TO FILETYPE
MVI B,03 ;SIZE OF FILETYPE
CALL PCNT ;PRINT FILETYPE
LXI H,PMSG ;LOAD PAGE MESSAGE
CALL PSTRNG ;PRINT PAGE MESSAGE STRING
LDA PAGE ;GET PAGE NUMBER
INR A ;BUMP IT
STA PAGE ;SAVE IT
CALL DEC ;CONVERT TO DECIMAL
LXI H,DECWRK ;POINT TO DEC STRING
MVI B,3
CALL PCNT ;PRINT PAGE NUMBER
MVI A,CR ;LOAD CR
CALL PBYT ;SEND IT
MVI A,LF ;LOAD LF
CALL PBYT ;SEND LF
MVI A,LF ;LOAD LF
CALL PBYT ;SEND IT
XRA A ;ZERO 'A' REGISTER
STA LINECNT ;RESET LINE COUNT
STA COL ;RESET COLUMN
RET
PBYT: PUSH H
PUSH B
PUSH PSW
MOV E,A ;MOVE CHAR TO 'E' REG
MVI C,05 ;CPM PRINT COMMAND
CALL BDOS ;SEND IT
POP PSW
CPI 20H ;NON-PRINTING?
JC PBY2 ;YES, DON'T BUMP COL
LXI H,COL ;INCREMENT COLUMN
INR M
PBY2: POP B
POP H
CALL CONCHK ;TEST CONSOLE STATUS
RET
PSTRNG: MOV A,M ;GET BYTE
CPI '$' ;STRING END?
RZ ;YES, DONE
CALL PBYT ;NO, PRINT BYTE
INX H ;BUMP POINTER
JMP PSTRNG ;LOOP
PCNT: MOV A,M ;GET BYTE
CALL PBYT ;PRINT IT
INX H ;BUMP POINTER
DCR B ;DECREMENT COUNT
JNZ PCNT
RET
DEC: LXI H,DECWRK
MVI C,100
CALL DIGIT
MVI C,10
CALL DIGIT
MVI C,1
CALL DIGIT
RET
DIGIT: MVI M,'0'
DI0: SUB C
JM DI1
INR M
JMP DI0
DI1: ADD C
INX H
RET
PABORT: LXI D,ABTMSG ;LOAD ABORT MESSAGE #
MVI C,09 ;CONSOLE BUFFER COMMAND
CALL BDOS ;SEND IT TO CONSOLE
JMP EXIT
DONE: LXI D,DNMSG ;LOAD DONE MESSAGE
MVI C,09 ;CONSOLE BUFFER COMMAND
CALL BDOS ;SEND IT TO COLSOLE
MVI A,0CH ;LOAD FORM FEED
CALL PBYT ;SEND IT
MVI B,FFNUL ;RUBOUT COUNT
DLP2: MVI A,7FH ;SEND
CALL PBYT ;NULLS
DCR B ;AFTER
JNZ DLP2 ;FORM FEED
JMP EXIT ;EXIT
BHCHK:
LXI D,TLE ;POINT TO TITLE BUFF
MVI C,00 ;CLEAR 'C' FOR CHARACTER COUNT
LXI H,TFCB+1 ;POINT TO 1ST CHARACTER FCB1
MOV A,M ;MOVE TO 'A'
CPI 3FH ;TEST FOR '?' (* CHG TO ? BY CPM)
JZ GETITLE ;GO MOVE TITLE.
LXI H,TFCB+17 ;POINT TO 1ST CHARACTER FCB2
MOV A,M ;MOVE CHARACTER TO 'A'
CPI 20H ;TEST FOR SPACE
JZ PRINT1 ;YES, RETURN TO PRINT
CPI 3FH ;TEST FOR '?' (* CHG TO ? BY CPM)
JNZ MVTITL ;YES, GO MOVE TITLE NAME, ELSE
;FALL THRU & MOVE FILE NAME
MVFILE: ;MOVES FILE NAME FROM TFCB TO TITLE BUFF
LXI H,TFCB ;POINT TO START OF TFCB
MVFILE1: ;NOW MOVE TITLE TO TITLE BUFFER
INX H ;BUMP HL TO 1ST CHARACTER
MOV A,M ;MOVE CHARACTER TO 'A'
CPI 20H ;TEST FOR SPACE
JZ MVFILE2 ;YES, GO TO NEXT STEP
STAX D ;NO, PUT CHAR IN TITLE BUFF
INX D ;BUMP DE
INR C ;BUMP COUNT
MOV A,C ;PUT COUNT IN 'A'
CPI 9 ;MORE THAN 8 CHARACTERS ?
JNZ MVFILE1 ;NO, DO IT AGAIN
;YES, FALL THRU & BACKUP
DCR C ;BACK UP 1 COUNT
DCX D ;BACK UP 1 MEM LOC
MVFILE2: ;SET LAST CHAR TO 00 FOR BH
XRA A ;ZERO 'A'
STAX D ;SAVE 00 FOR BH
JMP SAVECNT ;GO SAVE COUNT
MVTITL: ;MOVES TITLE FROM TBUFF TO TITLE BUFF
LXI H,TBUFF+1 ;POINT TO START OF TBUFF
MVTITL1:INX H ;BUMP TBUFF POINTER
MOV A,M ;MOVE CHAR TO 'A'
CPI 20H ;TEST FOR SPACE BETWEEN TITLES
JNZ MVTITL1 ;NO, GO DO IT AGAIN
MVTITL2: ;NOW MOVE TITLE TO TITLE BUFFER
INX H ;BUMP HL TO 1ST CHARACTER
MOV A,M ;MOVE CHARACTER TO 'A'
STAX D ;PUT IN TITLE BUFF
INX D ;BUMP DE
CPI 00 ;TEST FOR NULL
JZ SAVECNT ;GO TO SAVE COUNT
INR C ;BUMP COUNT
JMP MVTITL2 ;DO IT AGAIN
SAVECNT:LXI H,MAXCHR ;POINT TO MAXCHR COUNT STORAGE
MOV A,M ;MOVE MAX CHAR COUNT TO 'A'
CMP C ;COMPARE CHAR COUNT TO MAXCHR
CC MAXCNT ;YES, GOTO ERROR
LXI H,TITLSET ;POINT TO TITLE SET LOC
MOV A,M ;MOVE TITLSET CHAR TO 'A'
CPI 3FH ;TEST FOR '?'
JZ BH ;YES, GO TO BH ROUTINE
RET ;NO, RETURN
MAXCNT: PUSH B ;CONSOLE STATUS ROUTINE
PUSH D
PUSH H
PUSH PSW
LXI D,MAXMSG ;LOAD MAX COUNT EXCEEDED MSG
CALL CONPRT ;SEND IT TO CONSOLE
CALL CONSTAT ;TEST CONSOLE STATUS
POP PSW ;NO, RETURN
POP H
POP D
POP B
RET
GETITLE:
LXI B,TITLSET ;LOAD TITLE SET LOC
STAX B ;SAVE 3FH FOR BH TEST
MVI C,00 ;CLEAR 'C'
JMP MVTITL ;GO MOVE TITLE
ERR: LXI D,ERMSG ;LOAD FILE ERROR MESSAGE
CALL CONPRT ;SEND IT TO CONSOLE
JMP EXIT
ERR1: LXI D,ERMSG1 ;LOAD FILE NOT FOUND
CALL CONPRT
JMP EXIT
ERROR: LXI D,ERRMSG ;TOO LONG A PRINT LINE
CALL CONPRT ;SEND IT TO CONSOLE
JMP EXIT
; F O P E N
; ROUTINE TO OPEN A DISK FILE
; INPUT: DE=A(FCB)
; OUTPUT: CARRY=ERROR
FOPEN: MVI C,OPEN ;OPEN CODE
CALL BDOS ;ISSUE OPEN
CPI 0FFH ;ERROR?
JZ FOERR ;YES
XRA A ;CLEAR CARRY
RET
FOERR: STC
RET
; G E T B T
; ROUTINE TO READ A BYTE
; OUTPUTS: A=BYTE
; CARRY=ERROR
GETBT: LXI H,TBUFF+128 ;POINT TO BUFFER END
XCHG ;MOVE BUFFER END ADR TO DE
LHLD INPTR ;CURRENT POINTER IN HL
CALL CPHL ;TEST FOR END OF BUFFER
JZ GETB2 ;YES, READ
GETB1: MOV A,M ;GET BYTE
INX H ;BUMP POINTER
SHLD INPTR ;SAVE POINTER
ORA A ;RESET CARRY
RET
GETB2: MVI C,READ ;READ CODE
LXI D,TFCB ;FCB ADDRESS
CALL BDOS ;ISSUE READ
CPI 00 ;ERROR?
JNZ IERR ;YES
LXI H,TBUFF ;RESET BUFFER POINTER
SHLD INPTR
JMP GETB1 ;CONTINUE
IERR: STC
RET
; MISCELLANEOUS SUBROUTINES
; C P H L
; ROUTINE TO COMPARE HL VS DE
CPHL: MOV A,H
CMP D
RNZ
MOV A,L
CMP E
RET
; START OF BLOCKHEAD PROGRAM
BH: LXI D,RUNMSG ;LOAD RUN MSG
CALL CONPRT ;SEND TO CONSOLE
LXI H,TLE ;POINT TO 1ST TITLE CHAR
SHLD IBP ;SAVE 1ST CHAR LOC
;IBP DENOTES INPUT BUFFER POINTER
; ZERO PRINT BUFFER ROUTINE
LXI H,PRINT$BUF
SHLD PB$POINTER
LXI B,TOP$PB-PRINT$BUF
INR B
XRA A
ZERO: MOV M,A
INX H
DCR C
JNZ ZERO
DCR B
JNZ ZERO
;MAIN ROUTINE
CALL TOP ;TOP OF FORM
CALL LOAD$PRINT$BUF
CALL PRINT$MAST
CALL CRLF
CALL CRLF
LXI H,TITLSET ;POINT TO TITLE SET LOC
MOV A,M ;MOVE CHAR TO 'A'
CPI 3FH ;TEST FOR '?'
JZ EXIT ;YES, EXIT
JMP PRINT ;NO, GO BACK AND PRINT FILE
; SUB-ROUTINES
TOP: MVI E,0CH ;LOAD FORM FEED
CALL LISTER ;SEND TO PRINTER
RET
CONPRT: ;PRINT LINE TO THE CONSOLE
PUSH H
PUSH D
PUSH B
PUSH PSW
MVI C,CLCMD
CALL BDOS
POP PSW
POP B
POP D
POP H
RET
LOAD$PRINT$BUF: ; LOAD PRINT BUFFER
LHLD IBP ;LOAD HL WITH 1ST CHAR LOC
MOV A,M ;MOVE TO 'A'
CPI 00 ;TEST FOR LAST CHARACTER
RZ ;DONE WHEN BYTE=00
INX H ;INCR HL REGS
SHLD IBP ;SAVE NEXT LOCATION
ANI 7FH ;WE WANT LOWER ASCII GROUP
CPI 60H ;IS IT LOWER CASE?
JC $+5
ANI 5FH ;CHANGE TO UPPER CASE
SUI 20H ;DROP OFF NON-PRT CHAR
CALL TIMES10 ;MULT BYTE IN A * 10
LXI H,CONVERT$TABLE;POINT TO BEGINNING OF TABLE
DAD D ;ADD OFFSET FROM TIMES10
INX H ;ADD ONE
CALL FILL$PB ;PUT PRT CODE IN PRT BUF
JMP LOAD$PRINT$BUF ;GO BACK FOR ANOTHER BYTE
; ENTER WITH SUBJECT BYTE IN A
; EXIT WITH 10 TIMES SUBJECT BYTE IN DE
TIMES10:
LXI D,0
MOV E,A
ADD A
MVI C,3
MOV B,A ;2 TIMES STORED IN B
;(NOT OVER FF)
TLOOP: MOV A,E ;MULTIPLY TIMES 8
ADD A
MOV E,A
MOV A,D
ADC D
MOV D,A
DCR C
JNZ TLOOP
MOV A,E ;ADD 2 TIMES TO 8 TO SET
ADD B ;10 TIMES
MOV E,A
JNC $+4
INR D
RET
; ENTER WITH HL POINTING TO CORRECT LOC IN CONVERT TABLE
FILL$PB:
MVI C,9 ;PRINT BUFFER IS 9 LINES LONG
XCHG ;FOR EACH LETTER TO BE PRINTED
LHLD PB$POINTER ;EACH BYTE REPRESENTS THE 7
FLOOP: LDAX D ;HORIZONTAL PRINT POSITIONS
MOV M,A
INX H
INX D
DCR C
JNZ FLOOP
SHLD PB$POINTER
RET
; PRINT IS DONE BY GOING THROUGH THE PRINT BUFF AS FOLLOWS:
; START WITH FIRST BYTE OF PRINT BUFFER. CHECK FOR BIT 7
; WHICH INDICATES A PRINT CHARACTER IS PRESENT. THEN TYPE
; A CHARACTER HORIZONTALLY FOR EACH OF THE REMAINING 7 BIT
; POSITION AS INDICATED. SPACE 2. THEN ADD 9 TO THE BUFFER
; TABLE POINTER TO SET THE NEXT CHARACTER,IF ANY. CONTINUE
; UNTIL THE FIRST HORIZONTAL LINE IS COMPLETE. THEN RETURN
; CARRIAGE AND REPEAT WITH TWO MORE PRINT CHARACTERS. THEN
; ADD ONE TO THE PRINT BUFFER POINTER FOR THE SECOND LINE.
; REPEAT THE HORIZONTAL PRINTING ABOVE AGAIN FOR THE 2ND
; LINE THEN REPEAT THE WHOLE PROCESS AGAIN FOR 7 LINES.
; SPACE UP TWO AND EXIT.
PRINT$MAST:
LXI H,PRINT$BUF ;SET PB POINTER
SHLD PB$POINTER
MVI A,7 ;PRINT 7 HORIZONTAL LINES
STA PLOOP$COUNTER ;TO THE MATRIX
PLOOP: LHLD PB$POINTER
PUSH H
MVI A,CHR1
STA PTCHR
CALL RESET$PHEAD
CALL PRINTMATRIX
MVI A,CHR2
STA PTCHR
POP H
PUSH H
CALL RESET$PHEAD
CALL PRINTMATRIX
MVI A,CHR3
STA PTCHR
POP H
PUSH H
CALL RESET$PHEAD
CALL PRINTMATRIX
POP H
INX H
SHLD PB$POINTER
CALL CRLF
LDA PLOOP$COUNTER
DCR A
STA PLOOP$COUNTER
JNZ PLOOP
RET
; ENTER WITH HL POINTING AT BYTE IN PRINTER BUFFER
; EXIT WHEN BIT 7 = 0
; ELSE PRINT OUT THE CHARACTER STORED IN PTCHR EVERY
; TIME A BIT IS HIGH. SPACE BETWEEN LETTERS . JUMP
; NINE IN PRINT BUFFER FOR NEXT LETTER.
PRINT$MATRIX:
MOV A,M
RAL
RNC
MVI C,7 ;NUMBER OF ROTATES
PMLOOP:
XCHG ;PUT PRINT CHARACTER IN E
LHLD PTCHR
XCHG
RAL
JC $+5
MVI E,20H
CALL LISTER
DCR C
JNZ PMLOOP
CALL SPACE
CALL SPACE
MOV A,L ;ADJUST HL POINTER
ADI 9
MOV L,A
JNC $+4
INR H
JMP PRINT$MATRIX
RESET$PHEAD:
CALL CONCHK
MVI E,CR
JMP LISTER
CRLF: MVI E,CR
CALL LISTER
MVI E,LF
JMP LISTER
SPACE: MVI E,20H
JMP LISTER
LISTER: PUSH H ;PRINTER ROUTINE
PUSH D
PUSH B
PUSH PSW
MVI C,LPCMD ;LOAD PRINT COMMAND
CALL BDOS ;SEND IT TO PRINTER
POP PSW
POP B
POP D
POP H
RET
CONSTAT:MVI C,11 ;CONSOLE STATUS COMMAND
CALL BDOS ;GET STATUS
CPI 01 ;CHARACTER READY?
JNZ CONSTAT ;NO, DO IT AGAIN
;YES FALL THRU
MAXANS: MVI C,01 ;READ CONSOLE COMMAND
CALL BDOS ;GET CHARACTER
CPI 4EH ;TEST FOR 'N'
JZ ERROR ;YES, EXIT
RET
CONCHK: PUSH B ;CONSOLE STATUS ROUTINE
PUSH D
PUSH H
PUSH PSW
MVI C,11 ;CONSOLE STATUS COMMAND
CALL BDOS ;GET STATUS
CPI 01 ;CHARACTER READY?
CZ GETCHR ;YES, GET IT
POP PSW ;NO, RETURN
POP H
POP D
POP B
RET
GETCHR: MVI C,01 ;READ CONSOLE COMMAND
CALL BDOS ;GET CHARACTER
CPI 03H ;TEST FOR ^C
JZ ABORT ;YES GO TO ABORT
RET
ABORT: LXI D,ABTMSG ;LOAD ABORT MSG
CALL CONPRT
JMP EXIT
EXIT: LHLD CPMRET
SPHL
RET
; D A T A
COL: DB 0 ;COLUMN COUNTER
LINECNT: DB 0 ;LINE COUNTER
PAGE: DB 0 ;PAGE COUNTER
CPMRET: DW 0 ;CPM RETURN ADR
MAXCHR: DB 8 ;MAX TITLE CHAR
TITLSET: DB 0 ;TITLE SET FOR BH
TLE: EQU $ ;INPUTED TITLE
DS 0FH
LINE1: DB 0
DS 128
STACK: EQU $
IBP: DW 0 ;INPUT BUFFER POINTER
PRINT$BUF: EQU $
DS 200
TOP$PB: EQU $
PB$POINTER: DW 0
PTCHR: DB 0
PLOOPCOUNTER: DB 0
INPTR: DW TBUFF+128;INPUT POINTER
; MESSAGES
FMSG: DB CR,LF,'FILE: $'
PMSG: DB ' '
DB ' PAGE $'
ERMSG: DB CR,LF,'DATA ERROR, PLEASE RENTER.'
DB CR,LF,'$'
ERMSG1: DB CR,LF,'FILE NOT FOUND, PLEASE '
DB 'RENTER.',CR,LF,'$'
ERRMSG: DB CR,LF,'TOO LONG A TITLE LINE, '
DB 'PLEASE RENTER.',CR,LF,'$'
MAXMSG: DB CR,LF,'WARNING!! FILENAME HAS EXCEEDED 8 '
DB 'CHARACTERS, DO YOU WANT TO CONTINUE ?$'
ABTMSG DB CR,LF,'PRINT ABORTED',CR,LF,'$'
DNMSG: DB CR,LF,'PRINT COMPLETE',CR,LF,'$'
RUNMSG: DB CR,LF,'RUNNING TITLE PRINTER, '
DB 'PRESS CONTROL C TO EXIT TO CPM$'
WRKMSG: DB CR,LF,'PRINTING FILE, PRESS CONTROL C'
DB ' TO EXIT TO CPM$'
DECWRK: DB ' '
; CONVERSION TABLE FOR THE ASCII CHARACTERS
; TO THE HEX CODE WHICH SIGNALS THE PRINTER WHEN TO PRINT
;
; FORM OF TABLE
; | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 |
; ---------------------------------------------------
; | | 7 OR 9 BYTES OF HEX CODE
; | A | ONE HEX CODE FOR EACH LINE
; | | START 7 BY 7 MATRIX THEN LATER
; | B | WE CAN USE BYTE 8&9 FOR DECODERS
; | |
; | C |
; ^------HERE IS THE ASCII CODE THAT WE WILL USE
; TO TEST FOR A MATCH. THE PRINT CODE FOLLOWS
; IN ORDER
CONVERT$TABLE:
DB ' ',80H,80H,80H,80H,80H,80H,80H,0,0
DB '!',88H,88H,88H,88H,88H,80H,88H,0,0
DB '"',182,182,182,80H,80H,80H,80H,0,0
DB '#',94H,94H,255,94H,255,94H,94H,0,0
DB '$',191,232,232,190,8BH,8BH,254,0,0
DB '%',177,178,84H,88H,90H,166,198,0,0
DB '&',90H,168,88H,168,197,194,189,0,0
DB 27H,80H,98H,8CH,90H,80H,80H,80H,0,0
DB '(',81H,82H,84H,84H,84H,82H,81H,0,0
DB ')',192,160,90H,90H,90H,160,192,0,0
DB '*',201,170,9CH,255,9CH,170,201,0,0
DB '+',88H,88H,88H,255,88H,88H,88H,0,0
DB ',',80H,80H,80H,80H,80H,88H,90H,0,0
DB '-',80H,80H,80H,9CH,80H,80H,80H,0,0
DB '.',80H,80H,80H,80H,80H,98H,98H,0,0
DB '/',81H,82H,84H,88H,90H,160,192,0,0
DB '0',190,193,193,193,193,193,190,0,0
DB '1',88H,98H,168,88H,88H,88H,190,0,0
DB '2',9EH,161,82H,84H,88H,90H,255,0,0
DB '3',190,193,81H,86H,81H,193,190,0,0
DB '4',86H,92H,162,254,82H,82H,82H,0,0
DB '5',254,192,192,252,82H,82H,252,0,0
DB '6',188,192,192,252,194,194,188,0,0
DB '7',255,82H,84H,88H,90H,160,224,0,0
DB '8',158,161,161,9EH,161,161,9EH,0,0
DB '9',158,161,161,9FH,81H,81H,9EH,0,0
DB ':',80H,176,176,80H,176,176,80H,0,0
DB ';',80H,98H,98H,80H,84H,90H,80H,0,0
DB '<',84H,88H,90H,160,90H,88H,84H,0,0
DB '=',80H,190,190,80H,190,190,80H,0,0
DB '>',90H,88H,84H,82H,84H,88H,90H,0,0
DB '?',9CH,162,82H,84H,88H,80H,88H,0,0
DB '@',9CH,178,210,210,204,160,9EH,0,0
DB 'A',190,227,227,255,227,227,227,0,0
DB 'B',254,227,227,254,227,227,254,0,0
DB 'C',190,227,224,224,224,227,190,0,0
DB 'D',254,227,227,227,227,227,254,0,0
DB 'E',255,224,224,252,224,224,255,0,0
DB 'F',255,224,224,248,224,224,224,0,0
DB 'G',190,227,224,224,231,227,190,0,0
DB 'H',227,227,227,255,227,227,227,0,0
DB 'I',158,140,140,140,140,140,158,0,0
DB 'J',83H,83H,83H,83H,83H,179,9EH,0,0
DB 'K',227,230,236,248,252,230,227,0,0
DB 'L',224,224,224,224,224,224,255,0,0
DB 'M',193,227,247,235,227,227,227,0,0
DB 'N',195,227,243,235,231,227,225,0,0
DB 'O',190,227,227,227,227,227,190,0,0
DB 'P',254,227,227,254,224,224,224,0,0
DB 'Q',190,227,227,227,227,231,191,0,0
DB 'R',254,227,227,254,248,236,230,0,0
DB 'S',191,224,224,190,131,131,254,0,0
DB 'T',254,152,152,152,152,152,152,0,0
DB 'U',227,227,227,227,227,227,190,0,0
DB 'V',193,161,179,146,158,140,140,0,0
DB 'W',227,227,227,235,247,227,193,0,0
DB 'X',227,182,156,156,156,182,227,0,0
DB 'Y',227,182,156,140,140,140,140,0,0
DB 'Z',255,130,132,136,144,160,255,0,0
DB '[',128,128,128,128,128,128,128,0,0
DB '\',128,128,128,128,128,128,128,0,0
DB ']',128,128,128,128,128,128,128,0,0
DB '^',128,128,128,128,128,128,128,0,0
DB '_',128,128,128,128,128,128,128,0,0
DB '`',128,128,128,128,128,128,128,0,0
; FORMAT FOR THE PRINTING TABLE
;
; LINE LINE LINE LINE LINE LINE LINE LINE LINE
; 0000 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 |
; ---------------------------------------------------
; | | 7 OR 9 BYTES OF HEX CODE
; 1ST LETTER | ONE HEX CODE FOR EACH PRINT LINE
; |
; 0009 |
; | | START WITH 7 BY 7 MATRIX
; 2ND LETTER | LATER WE CAN USE BYTE 8 &9
; | FOR DECODERS
; OO12 |
; | |
; 3RD LETTER |
; |
;
; ^_____EACH LETTER IS 9 BYTES APART. IF A BIT 7 SET
; THEN IT IS A CHARACTER TO BE PRINTED. A 00
; IN ANY POSITION DESIGNATES THE END OF THE
; PRINT LINE
;
; PRINT$BUFFER: DS 9*14 ;MAXIMUM OF 14 PRINTABLE CHARS.
END