Download Advancing Computer Knowledge
Transcript
the top of a form. Margins are now in serted if indicated by the last character having been a carriage return, vertical tab, or form feed, and the character to be printed is sent via the CTOUT subroutine. Finally, MXOUT checks for form feed, carriage return, and vertical tab characters for special handling. Form feed zeros out the line count and flags for a margin. Carriage return or vertical tab advances the line count, generates a form feed if the maximum number of lines have been printed, and flags for a margin. Now you have two ways to send characters to your printer. If the pro gram sending the characters to the Ac tive Output Device is doing all of its own formatting and control, or sending graphics or other non-ASCII, you can use the bare-bones Centronics inter face. Every character sent out this way goes direcly to the printer. To print ASCII text that knows nothing of the special requirements and capabilities of the printer, you can use the MX-Driver to handle the basic for matting. Unfortunately, this involves modifying the UOUT vector every time • Listing 2 (continued) LIN E# LOG CODE 0F4F LINE ; SNDOPT : SEND REQUESTED RI OPTIONS TO PRINTER 0205 0206 0207 0208 0209 0F4F 0F52 0F55 0F57 0F59 0F5B 0F5D AC B9 F0 C9 F0 C9 D0 04 0E 38 A4 3A 24 04 27 25 SNDOPT LDY TEMP NXTOPT LDA DIBUFF,Y BEQ OPTRET CMP # ’* ’ BEQ HEXNUM CMP #*27 BNE ESCSEQ 5 INDEX INTO DISPLAY BUFFER »GET NEXT OPTION ;ZERO MARKS END ;HEX NUMBER? JYES •SINGLE QUOTE FOR CHG LINMAX"1 0212 8D A2 C8 B9 F0 20 B0 CA D0 AE E0 F0 8D D0 04 0E 02 HEXNUM STA LDX PKBYT INY LDA BEQ JSR BCS DEX BNE LDX CPX BEQ STA BNE TEMP #2 jSAVE BYTE USE MARKER 52 CHARACTERS TO PACK DIBUFF,Y OPTRET PACK ESCSEQ ;NEXT CHARACTER iZERO MARKS END iPACK IT IN JNOT HEX ;COUNT IT ;a n d l o o p 0223 0224 0225 0F5F 0F62 0F64 0F65 0F68 0F6A 0F6D 0F6F 0F70 0F72 0F75 0F77 0F79 0F7C 0226 0227 0F7E 0F81 20 60 0E 4C 8E 0F SNDBYT JSR CTOUT JMP ESC1 jSEND TO PRINTER 0228 0229 0230 0231 0232 0233 0234 0235 0F84 0F85 0F87 0F8A 0F8B 0F8E 0F8F 0F91 48 A9 20 68 20 C8 10 60 ESCSEQ PHA LDA JSR PLA JSR ESC 1 INY BPL OPTRET RTS *SEND AS ESCAPE SEQUENCE 0236 0F92 0237 0238 0239 0240 0241 0F92 0F95 0F97 0F9A 0F9B 0F9D 0243 0F9E 5 0244 0245 0246 0247 0248 0249 0F9E 0F9E 0FA0 0FAB 0FAD 0FB1 0FB3 0FB9 0FB8 LITS =* CNTMSG .BYT ’ CENTRONICS 0210 0211 0213 0214 ■0215 0216 0217 0218 0219 0220 0221 0222 02f/0 0V*Jl 38 A4 27 84 EA 15 F2 04 0E 24 05 02 0E 10 IB 60 0E 60 0E Cl ; B9 F0 20 C8 D0 60 9E 0F 06 7A E9 F5 PKBYT TEMP # ’* ’ SNDBYT LINMAX ESC1 #ESC CTOUT ;t o printer? jnew max lines JBRANCH ALWAYS PER PAGE 5SEND ESCAPE FIRST CTOUT ;AND NOW CHARACTER NXTOPT ;l o o p PMSG : DISPLAY 1 MESSAGE FROM LITERAL TABLE VIA PMSG LDA BEQ JSR INY BNE RTS PDUN LITS,Y PDUN OUTPUT 5GET A CHAR ;QUIT ON ZERO ;SEND IT PMSG SNEXT CHAR Y LITERAL TABLE LPIMSG .BYT ” L P I = ’ ,0 20 4D MRGMSG .BYT ’ MARGIN',0 20 4F OPTMSG .BYT ’ O P T S = ’,0 00 P e r r y P e r ip I ie r a I s R e p a I r s K I M s !! (SYMs ANd A IM s Too) We will Diagnose, Repair, and Completely Test your Single Board Computer • We Socket all replaced Integrated Circuits • You receive a 30-day Parts and Labor Warranty • Your repaired S.B.C. returned via U.P.S. C.O.D., Cash Don’t delay! Send us your S.B.C. for repair today Ship To: (Preferably via U.P.S.) — Perry Peri'pIieraLs Brookhaven Drive Rocky Point, NY 11778 6 KIM-1 Replacement ModuUs • Exact replacement for MOS/Commodore KIM-1 S.B.C. • Original KIM-1 firm w are — 1K and 4K RAM versions Replacement KIM-1 KeyboARds Id e n tic a l to th o se on early KIMS — SST s w itc h in to p rig h t corner • • E asily in s ta lle d in la te r m odel KIM s Perry Peripherals is an authorized HDE factory service center. Perry Peripherals carries a full line o f the a cclaim ed HDE expansion com ponents for you KIM, SYM, and AIM, including RAM boards, D isk Systems, and Software like HDE D isk BASIC V1.1. Yes, we also have diskettes. For m ore inform ation w rite to: P.O Box 924, M ille r Place, NY 11764, o r Phone (516) 744-6462. Circle No. 22 34 MICRO No. 58 ■ M arch 1983