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IUjjj&*mmZZVZRVʪT*_^o][[Bz*U)UUVիU-%VֵukmjիUVk)RJ+mU IUZUJZT%*ַzVֵRUZjUP*RVvmnڪ ꤠVUj֫UU*V ݭZZ֊kVjTJ+R_n{TW{} ZZUZBU[jתkZVխjU[DBRmTjUko*"W*UiU)%*կzkUjZVUV{QJ*Dꪭw*JڪjjUT?*j[JUڵZRTQ)RRDk[mڽP$Dj}{(UUUUR Uj_j*j.JBJ*TZzVݮUԀ*}j**VUjR?*kjխkZֻVZUUV)RJK[RvnTjV_jH?*ujUZjUU[RJT%)JݩUoU{mI +[}{VzZUU$?VֵVխmUjJ%JUJ~mR +_ր/^mT*VZ? V]V+Vper 32k RAM bank and prepare 02780 * to shift the contents of the /MAC picture buffer 02790 * to the right. 02800 LDX #ENDMAC point to the end of the /MAC picture buffer. 02810 LDD #$6540 number of bytes to shift. 02820 SHRIN3 LDU ,--X fetch two bytes of picture data and decrement 02830 * the pointer twice. 02840 STU 1,X move the two bytes. 02850 SUBD #1 decrement the byte shift counter. 02860 BNE SHRIN3 if all bytes not shifted, then continue. 02870 SHRIN4 LDA #$FF prepare to update the screen display. 02880 STA 1,X 02890 LBRA VIEW0 go update the screen display. 02900 SHRIN5 CMPA #$31 is the key pressed higher or equal to the 1 key? 02910 LBLO INKEY0 no, go back to scanning the keyboard. 02920 CMPA #$34 is the key pressed lower or equal to the 4 key? 02930 LBHI INKEY0 no, go back to scanning the keyboard. 02940 ANDA #7 if the pressed key is between 1 and four, then 02950 * prepare to adjust the contrast value. 02960 NEGA ACCA now contains the contrast value. 02970 STA CNTRST put it in the shrink mode contrast variable. 02980 LBRA VIEW0 go update the screen display. 02990 VIEW1 LDA #$C0 initialize byte transfer counter. 03000 STA VUCNT 03010 LDA VUPDN get current up/down position. 03020 LDB #$48 03030 MUL calculate current position within the /MAC 03040 ASLB picture buffer and prepare to transfer the 03050 ROLA bytes to the screen. 03060 ASLB 03070 ROLA 03080 ASLB 03090 ROLA 03100 LDX #MACBUF point to the beginning of the /MAC buffer. 03110 LEAX D,X point to the first up/down byte. 03120 LDA VLFRT get the current left/right position. 03130 LEAU A,X add it to the current buffer position. 03140 TST SHRFLG check if shrink mode is active. 03150 BNE VIEW3 go do shrink mode display. 03160 STS TEMPS preserve contents of the stack pointer. 03170 LDS BEGGRP point to the start of the current PMODE 4 03180 * graphics page. 03190 LEAS 6,S six bytes into the graphics page. 03200 VIEW2 PULU A,B,X,Y fetch six bytes from /MAC buffer. 03210 PSHS A,B,X,Y put them in the PMODE graphics memory. 03220 LEAS $C,S bump pointer. 03230 PULU A,B,X,Y transfer six more bytes. 03240 PSHS A,B,X,Y 03250 LEAS $C,S bump pointer. 03260 PULU A,B,X,Y transfer six more bytes. 03270 PSHS A,B,X,Y 03280 LEAS $C,S bump pointer. 03290 PULU A,B,X,Y transfer six more bytes. 03300 PSHS A,B,X,Y 03310 LEAS $C,S bump pointer. 03320 PULU A,B,X,Y transfer six more bytes. 03330 PSHS A,B,X,Y 03340 LDD ,U transfer two more bytes. 03350 STD 6,S 03360 LEAS $E,S bump pointer. 03370 LEAU $2A,U bump /MAC buffer pointer. 03380 DEC VUCNT decrement the view bytes moved counter. 03390 BNE VIEW2 if not done, go continue transferring the /MAC 03400 * data to the PMODE graphics screen. 03410 LDS TEMPS else, restore the stack pointer 03420 RTS and return. 03430 VIEW3 LDX BEGGRP point to the start of the PMODE graphics page and 03440 * prepare to create shrink version of the sreen. 03450 VIEW4 LDA #$20 initialize the number of PMODE bytes per line 03460 STA DECCNT counter. 03470 VIEW5 LDA #2 initialize the shrink factor. 03480 STA BUFPOS 03490 VIEW6 LDA ,U+ get a /MAC byte. 03500 STA SHRBYT put it in the shrink byte temporary storage. 03510 LDA $47,U get next /MAC byte. 03520 LDB #4 03530 STB BUFPOS+1 03540 *the following creates the shrink byte. 03550 VIEW7 CLRB 03560 ASLA 03570 ADCB #0 03580 ASLA 03590 ADCB #0 03600 ASL SHRBYT 03610 ADCB #0 03620 ASL SHRBYT 03630 ADCB CNTRST include the contrast value. 03640 ROL ,X 03650 DEC BUFPOS+1 03660 BNE VIEW7 03670 DEC BUFPOS 03680 BNE VIEW6 03690 LEAX 1,X bump PMODE pointer. 03700 DEC DECCNT 03710 BNE VIEW5 03720 LEAU $50,U bump /MAC picture buffer pointer. 03730 DEC VUCNT decrement the byte transfer counter. 03740 BNE VIEW4 if not done, then continue. 03750 RTS else, return. rn. LDS TEMPS e 01840 LDA #$42 01850 STA UPDNMX view up/down boundary limit. 01860 PULS CC,PC restore cc register & return. 01870 *VIEW THE /MAC PICTURE BUFFER. 01880 VIEW PSHS CC preserve cc. 01890 VIEW0 ORCC #$50 disable irq & firq. 01900 STA $FFDF enable upper 32k RAM bank. 01910 LBSR VIEW1 go display current 256x192 portion of buffer. 01920 STA $FFDE enable upper 32k ROM bank. 01930 INKEY0 LDD #$FFFF 01940 STD KEYBUF+3 force automatic key repeat. 01950 STD KEYBUF+5 01960 INKEY1 JSR [POLCAT] scan keyboard for a character. 01970 BEQ INKEY1 if no key pressed, continue scan. 01980 UP CMPA #$5E is up arrow pressed? 01990 BNE DOWN no, go check for down arrow. 02000 LDA VUPDN else get current up/down position. 02010 BEQ INKEY0 if we are at the top of the picture, then go 02020 * back to scanning the keyboard. 02030 DEC VUPDN else decrement the up/down position. 02040 BRA VIEW0 go update the screen display. 02050 DOWN CMPA #$0A is the down arrow pressed? 02060 BNE LEFT no, go check for the left arrow. 02070 LDA VUPDN else get the current up/down position. 02080 CMPA UPDNMX if we are at the bottom of the picture, then go 02090 BHS INKEY0 back to scanning the keyboard. 02100 INC VUPDN else increment the up/down position. 02110 BRA VIEW0 go update the screen display. 02120 LEFT CMPA #$08 is the left arrow key pressed? 02130 BNE RIGHT no, go check for the right arrow. 02140 LDA VLFRT else get the current up/down position. 02150 BEQ INKEY0 if we are at the left edge of the picture, then 02160 * go back to scanning the keyboard. 02170 DEC VLFRT else decrement the left/right position. 02180 BRA VIEW0 go update the screen position. 02190 RIGHT CMPA #$09 is the right arrow key pressed? 02200 BNE PPRNT no, go check for the P key. 02210 LDA VLFRT else get the current left/right position. 02220 CMPA LFRTMX are we at the right edge of the picture? 02230 BHS INKEY0 yes, go back to scanning the keyboard. 02240 INC VLFRT else increment the left/right position. 02250 BRA VIEW0 go update the screen display. 02260 PPRNT CMPA #$50 is the P key pressed? 02270 BNE PPRN1 no, go check for the p key. 02280 PPRN0 LBSR PM4PRT else go dump the PMODE 4 screen to the printer. 02290 BRA VIEW0 go update the screen display. 02300 PPRN1 CMPA #$70 is the p key pressed? 02310 BNE MPRINT no, go check for the M key. 02320 BRA PPRN0 else go dump the PMODE 4 screen to the printer. 02330 MPRINT CMPA #$4D is the M key pressed? 02340 BNE MPRIN1 no, go check for the m key. 02350 MPRIN0 LBSR MACPRT else go dump the MAC picture buffer to printer. 02360 BRA VIEW0 go update the screen display. 02370 MPRIN1 CMPA #$6D is the m key pressed? 02380 BNE SPACE no, go check for the SPACE bar. 02390 BRA MPRIN0 else go dump the MAC picture buffer to printer. 02400 SPACE CMPA #$20 is the SPACE bar pressed? 02410 BNE CLEAR no, go check for the CLEAR key. 02420 PULS CC,PC else restore CC and return from the view routine. 02430 CLEAR CMPA #$0C is the CLEAR key pressed? 02440 BNE SHRIN0 no, go update the screen display. 02450 SHRINK COM SHRFLG else toggle the shrink mode flag. 02460 LDA #$28 initialize left/right boundary limit. 02470 STA LFRTMX 02480 LDA #$42 initialize up/down boundary limit. 02490 STA UPDNMX 02500 TST SHRFLG are we in shrink mode? 02510 LBEQ VIEW0 no, go update screen display. 02520 LDA #4 else, re-initialize left/right boundary limit. 02530 STA LFRTMX 02540 LDA #$2A re-initialize up/down boundary limit. 02550 STA UPDNMX 02560 LDA VUPDN get current up/down position. 02570 CMPA #$2A have we exceeded the boundary limit? 02580 LBLS VIEW0 no, go update screen display. 02590 LDA #$2A else, set current up/down position to boundary. 02600 STA VUPDN 02610 LBRA VIEW0 go update the screen display. 02620 SHRIN0 CMPA #$15 is the shift+left arrow pressed? 02630 BNE SHRIN2 no, go check for shift+right arrow. 02640 STA $FFDF else, enable the upper 32k RAM bank and prepare 02650 * to shift the contents of the /MAC picture buffer 02660 * to the left. 02670 LDX #MACBUF point to the /MAC picture buffer. 02680 LDD #$6540 number of bytes to shift. 02690 SHRIN1 LDU 1,X fetch two bytes of picture data. 02700 STU ,X++ move the two bytes & bump the pointer twice. 02710 SUBD #1 decrement the byte shift counter. 02720 BNE SHRIN1 if all bytes not shifted, then continue. 02730 LEAX -2,X else, prepare to update the display. 02740 BRA SHRIN4 go finish preparations & update the display. 02750 SHRIN2 CMPA #$5D is the shift+right arrow pressed? 02760 BNE SHRIN5 no, go check for the 1 key (contrast adjust). 02770 STA $FFDF else, enable the up00750 *CLEAR THE /MAC PICTURE BUFFER. 00760 CLRMAC LDX #MACBUF point start of buffer. 00770 ORCC #$50 disable irq and firq. 00780 STA $FFDF enable the upper 32k RAM bank. 00790 CLRMA0 CLR ,X clear the byte. 00800 COM ,X+ complement byte and increment pointer. 00810 CMPX #HIRAM+1 all of RAM cleared? 00820 BLO CLRMA0 no, continue. 00830 STA $FFDE yes, enable upper 32k ROM bank. 00840 ANDCC #$AF enable irq and firq. 00850 RTS 00860 *FETCH AND PRINT THE /MAC PICTURE NAME. 00870 MACNAM CLR COUNTR clear name length counter. 00880 CLR COUNTR+1 00890 LDX #$05E0 point to bottom line of screen. 00900 STX SCRPOS put it in screen position variable. 00910 MACNA1 BSR MACNA4 skip first byte of file. 00920 BSR MACNA4 skip second byte, which puts us at the name. 00930 MACNA2 BSR MACNA4 fetch a character from picture name. 00940 CMPA #$80 00950 BHS MACNA3 00960 CMPA #0 have we reached end of picture name? 00970 BEQ MACNA3 yes, branch. 00980 STA $FFDE else, enable upper 32k ROM bank, 00990 JSR [CHROUT] and print character to screen. 01000 STA $FFDF enable upper 32k RAM bank. 01010 BRA MACNA2 continue fetching picture name. 01020 MACNA3 RTS 01030 MACNA4 INC COUNTR+1 bump name length counter. 01040 BSR GETCHR fetch character from file. 01050 RTS 01060 *FETCH A CHARACTER FROM AN INPUT FILE. 01070 GETCHR STA $FFDE enable upper 32k ROM (BASIC) bank. 01080 LDA #1 point to the input file buffer #1. 01090 STA DEVNUM put in device number variable. 01100 JSR CHRINP call the BASIC routine to fetch a character. 01110 ORCC #$50 disable irq & firq. 01120 STA $FFDF enable upper 32k RAM bank. 01130 CLR DEVNUM restore device number to screen. 01140 RTS return. 01150 *SKIP PAST THE NON-PICTURE DATA. 01160 SKIP LDD #$0280 number of bytes to skip. 01170 SUBD COUNTR minus length of picture name. 01180 TFR D,X 01190 SKIP0 BSR GETCHR go fetch character from file. 01200 LEAX -1,X decrement the skip character counter. 01210 BNE SKIP0 if all bytes not skipped, continue. 01220 RTS 01230 *DECOMPRESS THE /MAC PICTURE. 01240 DECOMP PSHS CC preserve cc. 01250 LDX #MACBUF point to /MAC buffer. 01260 STX BUFPOS store it. 01270 BSR CLRMAC clear /MAC buffer. 01280 BSR MACNAM load & display picture name. 01290 BSR SKIP skip non-picture data. 01300 LDA #$FB 01310 STA $FF02 prep pia for [BREAK] test. 01320 DECOM0 BSR GETCHR go fetch character from file. 01330 TST EOF test if End Of File. 01340 BNE DECOM4 yes, end decompression. 01350 LDB $FF00 01360 BITB #$40 is [BREAK] pressed? 01370 BEQ DECOM4 yes, end decompression. 01380 CMPA #$7F compression character > $7F? 01390 BHI DECOM2 yes, branch. 01400 INCA else prepare count value. 01410 STA DECCNT put in decompression counter. 01420 LDX BUFPOS get current position in /MAC buffer. 01430 DECOM1 BSR GETCHR fetch a byte of picture data. 01440 TST EOF test if End Of File. 01450 BNE DECOM4 yes, end decompression. 01460 LDB $FF00 01470 BITB #$40 is [BREAK] pressed? 01480 BEQ DECOM4 yes, end decompression. 01490 COMA complement it. 01500 STA ,X+ put in /MAC buffer & bump pointer. 01510 CMPX #HIRAM+1 have we exceeded available memory? 01520 BHS DECOM4 yes, end decompression. 01530 DEC DECCNT else decrement decompression counter. 01540 BNE DECOM1 if end of count not reached, continue. 01550 STX BUFPOS else store current position of /MAC buffer. 01560 BRA DECOM0 continue decompression. 01570 DECOM2 NEGA negate decompression count value. 01580 INCA prepare count value. 01590 STA DECCNT put in decompression counter. 01600 BSR GETCHR fetch a byte of picture data. 01610 COMA complement it. 01620 LDX BUFPOS get current position in /MAC buffer. 01630 DECOM3 STA ,X+ put data in /MAC buffer & bump pointer. 01640 CMPX #HIRAM+1 have we exceeded available memory? 01650 BHS DECOM4 yes, end decompression. 01660 DEC DECCNT else decrement decompression counter. 01670 BNE DECOM3 if end of count not reached, continue. 01680 STX BUFPOS else store current position of /MAC buffer. 01690 BRA DECOM0 continue decompression. 01700 *END OF DECOMPRESSION ROUTINE. 01710 DECOM4 CLR $FF40 turn drive motors off. 01720 BRK LDA $FF00 01730 BITA #$40 is [BREAK] pressed? 01740 BEQ BRK yes, wait until released. 01750 *initialize the variables for the viewing portion of the program: 01760 CLR VLFRT view left/right position. 01770 CLR VUPDN view up/down position. 01780 STA $FFDE enable the upper 32k ROM bank. 01790 LDA #$FE 01800 STA CNTRST shrink mode contrast value. 01810 CLR SHRFLG shrink mode flag; $00=normal, $FF=shrink. 01820 LDA #$28 01830 STA LFRTMX view left/right boundary limit.Z&%:POKE150,18'printer baud rate.&M ((49158)256(49159)1):6&w4:50,&H2AFC::O1&H2AFC:M"MACMENU"&A$"":5:O1597: F&HF4 &HFB:A$A$((F)):F:A$A$"/":F&HFC &HFE:A$A$((F)): F:A$A$":"((&HFF))'=@448,A$;:@480,(31,32);:"I",#1,A$:O196::4,1:1,1:O1222:2'MO1&H2AFC:'e4:(33021)502'm32'u2() :macmenu, macintosh /mac picture viewer with printout capability for the tandy dmp-105 and compatible 9-pin dot matrix printers. version 01.01.00, by:( :robert (coco@yourdvd.net) 79 lilly lane, pell city, al 35125-3099 shareware copyright (c) 07 march 1995. all rights reserved. 64K.( :polished up a bit:)Y:april 2007 if you find this useful feel free to paypal a buck or so to coco@yourdvd.nete, pell city, al 35125-3099 shareware copyright (c) 07 march 1995. all rights reserved. 64K.( :polished up a bit:)Y:april 2007 m*3jPoc%9vw$' ޭ 9 w9ކovPo9v0&943j󍗍 p&E@'>""L p&/@'(C$ & @LC󧀌$ & @@'ކ(vBw54PUW'^&' ځ & w$ ́&' & v$ P& p& M& m& &5 &'(vBw 'zv*w*#j*c&ߎ3je@&0 ]&ߎe@&,1%14"+@H=XIXIXI3j03 &5޺2f76462l76462l76462l76462l7646f2n3* &9 G_HHi & &0 &3P &94t3jm&ӎڦ'7L'GM'm&* A'a& C'c& 4 Z&50 %l %''2vwwǎw%4~Z&.vpZ& i0c50 Z&Җvw =>01?&'`^'7 'F 'i'P& فp& 0$ 3/ 0nv'UJvw$ wNvL$Vvwv$ w =3j4@9v Z&05`%94o5J& ٍ0O' 90Lo' ' '3Q'q'0$ 3# 0qno|0 ERROR! - NO /MAC FILES ON THE DISKETTE. PLACE A DISKETTE CONTAINING /MAC FILES IN THE DRIVE AND PRESS [ENTER]. Q = QUIT, 0-3 = CHANGE DRIVE.A DISK DRIVE READ ERROR HAS OCCURRED. PRESS [ENTER]. Q = QUIT, 0-3 = CHANGE DRIVE.MACMENU ".MAC" PICTURE VIEWER. (C) 6 MAR 1995. arrows:select enter:load break:abort 0-3:disk TANDY DMP-105 PRINTER VERSION 01.01.00 'P'p'N'n'' 0{j0ƆC 0h0Ȏ3j҆fэVq@'z' 0 ڍ0@Pߍ*6}9@oj3A1?&9P@1?&9H@Ԇ֦Hv֧ '0H DC &z' 0 9@1?& 9'P'p'N'n'' 0C 0҆эS@'z' 0 ܾ0`Z&ҍ1?&Nn9 ھҿԆ֦Hv֧ '0 DC &z' 0 9 o0 ' 90' o9@'9@' *START*DONE3iRESPR13GRESPR03;NORMAL3JSETPR132SETPR03&GRAFIX33PM4PRC3PM4PRA2PM4PR92PM4PR82܆PM4PR72؆PM4PR52ƆPM4PR42"%&')*+,-MACMENU BAS ]MACMENU BIN!MACMENU ASM#|MACMENU A00MACMENU A01$MACMENU A02(LSTARTREKMacPM4PR32PM4PR22PM4PR12PM4PRD3PM4PR62ʆPM4PR02uPM4P002hPM4PRB2PM4NEG2`PM4POS2VMACPRG2'MACPRE2MACPRC2MACPRB1MACPRA1MACPR91MACPR41RESPRT37MACPR71ȖMACPR31MACPR21BREAK03[MACPRF2 MACPR81֖MACPR61MACPR11aSETPRT3MACPR01SMACPRD2MACPR51BREAK3NMACNEG1DMACPOS11DSKMSG/NOMAC3/4NOMAC2/.NOMAC1/NOMAC0/ ERRMSG/TTITLE1/TITLE0.TITLEM0FEXIT0.ބEXIT.لCLS1.фCLS0.ͅDIR0K.DIR0G.DIR0D.eDIR0C._NUMCHK.YPPRIN0.NPPRIN1.SPPRINT.JQUIT/ADIR0J.DIR0H.DIR0F.sDIR0B.,DIR0A.(DIR09.DIR08-DIR0E.oDIR07-DIR06-DIR0I.DIR05-ԖNOMACS/TITLE.DIR02-MACEX2-MACEX1-MACEX0-MACEXT-DIR04-ǕDIR03-DIR01-yDSKERR/IDIR00-lCLS.ʆREADIR-SDIREAD-QVIEW7-*VIEW6-VIEW5-VIEW4-VIEW2,VIEW3-SHRIN3,SHRIN5,SHRIN4,SHRIN1,SHRIN2,SHRINK,RSHRIN0,yCLEAR,NSPACE,HMACPRT1MPRIN0,=MPRIN1,BMPRINT,9PM4PRT28PPRN0,.PPRN1,3PPRNT,*RIGHT,LEFT,DOWN,UP+INKEY1+INKEY0+VIEW1,ąVIEW0+܄VIEW+ڃBRK+DECOM3+DECOM1+DECOM2+DECOM4+DECOM0+nDECOMP+\SKIP0+USKIP+NGETCHR+ 00130 *79 LILLY LANE, PELL CITY, AL 35125-3099 U.S.A. ALL RIGHTS RESERVED. 00140 *POLISHED UP: 14 APRIL 2007. 00150 *SHAREWARE: IF YOU FIND THIS SOFTWARE USEFUL, FEEL FREE TO PAYPAL 00160 *A DOLLAR (OR MORE) TO: COCO@YOURDVD.NET. THANKS - ROBERT. 00170 *THIS IS THE VERSION FOR THE TANDY DMP-105 AND COMPATIBLE 9-PIN DOT 00180 *MATRIX PRINTERS. VERSION 01.01.00. 00190 *EQUATES: 00200 DEVNUM EQU $6F 00210 EOF EQU $70 00220 RSTFLG EQU $71 00230 LFRTMX EQU $76 00240 DSPCT0 EQU $76 00250 UPDNMX EQU $77 00260 DSPCT1 EQU $77 00270 COUNTR EQU $76 00280 CURPOS EQU $88 00290 SCRPOS EQU $88 00300 BEGGRP EQU $BA 00310 BUFPOS EQU $F3 00320 FILCNT EQU $F3 00330 FILNAM EQU $F4 00340 COLUMN EQU $F5 00350 VLFRT EQU $F6 00360 VUPDN EQU $F7 00370 TEMPS EQU $F8 00380 VUCNT EQU $FA 00390 DECCNT EQU $FB 00400 CNTRST EQU $FC 00410 SHRFLG EQU $FD 00420 SHRBYT EQU $FE 00430 ROW EQU $FF 00440 KEYBUF EQU $152 00450 LINCT0 EQU $1D1 00460 LINCT1 EQU $1D1 00470 TEMPX0 EQU $1D2 00480 TEMPX1 EQU $1D4 00490 STORE EQU $1D6 00500 COUNT0 EQU $1D7 00510 COUNT1 EQU $1D7 00520 PM4BUF EQU $1DA 00530 SECBUF EQU $1DA 00540 VIDRAM EQU $400 00550 VIDEND EQU VIDRAM+$200 00560 PRTBUF EQU $E00 00570 WRKBUF EQU $1040 00580 DELAY EQU $3000 00590 NAMBUF EQU $336A 00600 POLCAT EQU $A000 00610 CHROUT EQU $A002 00620 CHRINP EQU $A176 00630 DCNVEC EQU $C004 00640 DSKVAR EQU $C006 00650 MACBUF EQU $336A 00660 ENDMAC EQU $FDE9 00670 HIRAM EQU $FDFF 00680 RESETV EQU $FFFE 00690 *BEGIN ASSEMBLY AT $2AFC 00700 ORG $2AFC 00710 *INCLUDE THE REMAINING SOURCE .ASM FILES (THE EDTASM BUFFER IS 00720 *TOO SMALL TO HOLD THE COMPLETE SOURCE AT ONCE.) 00730 START EQU CLRMAC 00740 INCLUDE MACMENU.A00 03760 INCLUDE MACMENU.A01 06840 INCLUDE MACMENU.A02 09730 DONE EQU * 09740 END START 03770 ** 03780 *ROUTINE TO READ THE DISK DIRECTORY. 03790 ** 03800 DIREAD PSHS CC preserve the condition code register. 03810 READIR LBSR CLS clear the screen. 03820 LDX DSKVAR point to the DSKCON variables. 03830 LDA #$2 read sector opcode. 03840 STA ,X put in DCOPC. 03850 LDD #$1103 point to directory, track 17 ($11), sector $03. 03860 STD 2,X put them in DCTRK & DCSEC. 03870 LDD #SECBUF point to sector buffer. 03880 STD 4,X put in DCBPT. 03890 LDU #NAMBUF point to the file-name buffer. 03900 CLR FILCNT clear the file-name counter. 03910 DIR00 JSR [DCNVEC] call DSKCON. 03920 TST 6,X check for drive errors. 03930 LBNE DSKERR go do disk drive error routine. 03940 LDX #SECBUF point to the sector buffer. 03950 DIR01 LDA ,X get first character. 03960 BEQ DIR03 current file has been killed. 03970 INCA check for end of directory. 03980 BEQ DIR04 the end of the directory has been reached. 03990 MACEXT LDA 8,X check for /MAC extension, point to the first 04000 * character of the extension. 04010 CMPA #$4D is it an M? 04020 BEQ MACEX0 yes, go check second character. 04030 CMPA #$6D is it an m? 04040 BNE DIR03 no, go check next file-name. 04050 MACEX0 LDA 9,X check the second character. 04060 CMPA #$41 is it an A? 04070 BEQ MACEX1 yes, go check the third character. 04080 CMPA #$61 is it an a? 04090 BNE DIR03 no, go check next file-name. 04100 MACEX1 LDA 10,X check the third character of the extension. 04110 CMPA #$43 is it a C? 04120 BEQ MACEX2 yes, go increment the number of files counter. 04130 CMPA #$63 is it a c? 04140 BNE DIR03 no, go check next file-name. 04150 MACEX2 INC FILCNT if the current file is a /MAC file, then 04160 * increment the file-name counter. 04170 PSHS X preserve the current buffer pointer. 04180 LDB #$0B number of bytes in the file-name (8) + extension 04190 * (3) = 11 ($0B). 04200 DIR02 LDA ,X+ get a byte and bump pointer. 04210 STA ,U+ put byte in file-name buffer & bump pointer. 04220 DECB decrement the # of bytes to transfer counter. 04230 BNE DIR02 if not done, go continue. 04240 LDX DSKVAR point to DSKCON variables. 04250 LDA 1,X get the drive number. 04260 STA ,U+ put it at the end of the file-name. 04270 PULS X restore the buffer pointer. 04280 DIR03 LEAX $20,X point to the next directory entry. 04290 CMPX #SECBUF+$100 are we at the end of the sector buffer? 04300 BLO DIR01 no, go fetch the next file-name from buffer. 04310 LDX DSKVAR point to the DSKCON variables. 04320 INC 3,X increment the sector number. 04330 LDA 3,X get the current sector number. 04340 CMPA #$C have we reached the end of the directory? 04350 BLO DIR00 no, continue reading the directory. 04360 DIR04 LBSR TITLE 04370 LDB FILCNT get the number of file-names. 04380 LBEQ NOMACS branch if no /MAC files on the disk. 04390 CLR DSPCT0 04400 CLR DSPCT1 04410 DIR05 LDA DSPCT1 04420 LBSR DIR0I 04430 LDX #VIDRAM+16 04440 LDB FILCNT 04450 SUBB DSPCT1 04460 CMPB #$11 04470 BLO DIR06 04480 LDB #$10 04490 DIR06 PSHS B 04500 STX CURPOS 04510 LDB #8 04520 DIR07 LDA ,U+ 04530 LBSR DIR0E 04540 DECB 04550 BNE DIR07 04560 LDA #$2E 04570 LBSR DIR0E 04580 LDB #3 04590 DIR08 LDA ,U+ 04600 BSR DIR0E 04610 DECB 04620 BNE DIR08 04630 LDA #$20 04640 BSR DIR0E 04650 LDA ,U+ 04660 ADDA #$30 04670 BSR DIR0E 04680 PULS B 04690 LEAX $20,X 04700 DECB 04710 BNE DIR06 04720 DIR09 LDA DSPCT0 04730 SUBA DSPCT1 04740 LDB #$20 04750 MUL 04760 ADDD #VIDRAM+15 04770 TFR D,X 04780 LDA #$3E 04790 STA ,X 04800 LDY #DELAY 04810 DIR0A LEAY -1,Y 04820 BNE DIR0A 04830 DIR0B JSR [POLCAT] 04840 BEQ DIR0B 04850 LDB #$60 04860 STB ,X 04870 LDB #$FF 04880 CMPA #$5E up arrow? 04890 BEQ DIR0F yes. 04900 CMPA #$A down arrow? 04910 BEQ DIR0H yes. 04920 CMPA #$D [ENTER]? 04930 BEQ DIR0J yes. 04940 CMPA #3 [BREAK]? 04950 LBEQ QUIT yes. 04960 PPRINT CMPA #$50 is the P key pressed? 04970 BNE PPRIN1 no, go check for the p key. 04980 PPRIN0 LBSR PM4PRT else go dump the PMODE 4 screen to the printer. 04990 BRA DIR0B go back to scanning the keyboard. 05000 PPRIN1 CMPA #$70 is the p key pressed? 05010 BNE NUMCHK no, go scheck for the M key. 05020 BRA PPRIN0 else go dump the PMODE 4 screen to the printer. 05030 NUMCHK CMPA #$30 >=0? 05040 BHS DIR0C yes. 05050 BRA DIR09 no. 05060 DIR0C CMPA #$33 <=3? 05070 BLE DIR0D yes. 05080 BRA DIR09 no. 05090 DIR0D LDX DSKVAR point to the DSKCON variables. 05100 SUBA #$30 convert the numeric keypress from ASCII>binary. 05110 STA 1,X put in DCDRV. 05120 LBRA READIR go read the directory of the new drive. 05130 DIR0E JMP [CHROUT] output character and return. 05140 DIR0F LDA DSPCT0 05150 BEQ DIR09 05160 STB KEYBUF+3 05170 DECA 05180 STA DSPCT0 05190 CMPA DSPCT1 05200 BHS DIR0G 05210 DEC DSPCT1 05220 DIR0G LBRA DIR05 05230 DIR0H LDA DSPCT0 05240 INCA 05250 CMPA FILCNT 05260 LBHS DIR09 05270 STB KEYBUF+4 05280 STA DSPCT0 05290 LDA DSPCT1 05300 ADDA #$F 05310 CMPA DSPCT0 05320 BHS DIR0G 05330 INC DSPCT1 05340 BRA DIR0G 05350 DIR0I LDB #$C 05360 MUL 05370 LDU #NAMBUF 05380 PSHS U 05390 ADDD ,S++ 05400 TFR D,U 05410 RTS 05420 DIR0J LDA DSPCT0 05430 BSR DIR0I 05440 LDY #FILNAM 05450 STY SECBUF 05460 LDB #$B 05470 DIR0K LDA ,U+ 05480 STA ,Y+ 05490 DECB 05500 BNE DIR0K 05510 LDA ,U+ 05520 ADDA #$30 05530 STA ,Y+ 05540 PULS CC,PC 05550 CLS LDX #VIDRAM 05560 CLS0 STX CURPOS 05570 LDA #$60 05580 CLS1 STA ,X+ 05590 CMPX #VIDEND 05600 BLO CLS1 05610 RTS 05620 EXIT LDX DSKVAR 05630 LDA #3 05640 EXIT0 PSHS A 05650 CLR ,X 05660 STA 1,X 05670 JSR [DCNVEC] 05680 PULS A 05690 DECA 05700 CMPA #$FF 05710 BNE EXIT0 05720 BRA CLS 05730 TITLE BSR CLS 05740 LEAX TITLEM,PCR 05750 TITLE0 LDA ,X+ 05760 BEQ TITLE1 05770 JSR [CHROUT] 05780 BRA TITLE0 05790 TITLE1 RTS 05800 NOMACS BSR CLS 05810 LEAX ERRMSG,PCR 05820 CLR DEVNUM 05830 NOMAC0 LDA ,X+ 05840 BEQ NOMAC1 05850 JSR [CHROUT] 05860 BRA NOMAC0 05870 NOMAC1 JSR [POLCAT] 05880 BEQ NOMAC1 05890 CMPA #$0D 05900 LBEQ READIR 05910 CMPA #$51 05920 BEQ QUIT 05930 CMPA #$71 05940 BEQ QUIT 05950 CMPA #$30 05960 BHS NOMAC2 05970 BRA NOMAC1 05980 NOMAC2 CMPA #$33 05990 BLS NOMAC3 06000 BRA NOMAC1 06010 NOMAC3 SUBA #$30 06020 LDX DSKVAR 06030 STA 1,X 06040 LBSR CLS 06050 LBRA READIR 06060 QUIT BSR EXIT 06070 CLR RSTFLG 06080 JMP [RESETV] 06090 DSKERR CLR DEVNUM 06100 LBSR CLS 06110 LEAX DSKMSG,PCR 06120 BRA NOMAC0 06130 ERRMSG FCC "ERROR! - NO /MAC FILES ON THE" 06140 FCB $D 06150 FCC "DISKETTE. PLACE A DISKETTE" 06160 FCB $D 06170 FCC "CONTAINING /MAC FILES IN THE" 06180 FCB $D 06190 FCC "DRIVE AND PRESS [ENTER]." 06200 FDB $0D0D 06210 FCC "Q = QUIT, 0-3 = CHANGE DRIVE." 06220 FCB $00 06230 DSKMSG FCC "A DISK DRIVE READ ERROR HAS" 06240 FCB $0D 06250 FCC "OCCURRED. PRESS [ENTER]." 06260 FDB $0D0D 06270 FCC "Q = QUIT, 0-3 = CHANGE DRIVE." 06280 FCB $0 06290 TITLEM FCC /MACMENU ".MAC"/ 06300 FCB $D 06310 FCC "PICTURE VIEWER." 06320 FCB $D 06330 FCC "(C) 6 MAR 1995." 06340 FCB $D 06350 FCC " " 06360 FCB $D 06370 FDB $8080 06380 FDB $8080 06390 FDB $8080 06400 FDB $8080 06410 FDB $8080 06420 FDB $8080 06430 FDB $8080 06440 FDB $800D 06450 FCC "arrows:" 06460 FDB $8080 06470 FCC "select" 06480 FCB $0D 06490 FCC "enter" 06500 FCB $80 06510 FCC ":" 06520 FDB $8080 06530 FCC "load" 06540 FDB $8080 06550 FCB $D 06560 FCC "break" 06570 FCB $80 06580 FCC ":" 06590 FDB $8080 06600 FCC "abort" 06610 FDB $800D 06620 FCC "0-3" 06630 FDB $8080 06640 FCB $80 06650 FCC ":" 06660 FDB $8080 06670 FCC "disk" 06680 FDB $8080 06690 FCB $D 06700 FDB $8080 06710 FDB $8080 06720 FDB $8080 06730 FDB $8080 06740 FDB $8080 06750 FDB $8080 06760 FDB $8080 06770 FDB $800D 06780 FCC "TANDY DMP-105" 06790 FCB $D 06800 FCC "PRINTER VERSION" 06810 FCB $D 06820 FCC " 01.01.00" 06830 FDB $0D00 06850 ** 06860 *ROUTINE TO PRINT OUT THE CONTENTS OF THE /MAC PICTURE BUFFER. 06870 ** 06880 MACPRT JSR [POLCAT] scan keyboard for a character. 06890 BEQ MACPRT if no key pressed, continue the scan. 06900 CMPA #$50 is the P key pressed? 06910 BEQ MACPOS yes, go do a photo-positive dump. 06920 CMPA #$70 is the p key pressed? 06930 BEQ MACPOS yes, go do a photo-positive dump. 06940 CMPA #$4E is the N key pressed? 06950 BEQ MACNEG yes, go do a photo-negative dump. 06960 CMPA #$6E is the n key pressed? 06970 BEQ MACNEG yes, go do a photo-negative dump. 06980 CMPA #3 is the [BREAK] key pressed? 06990 LBEQ BREAK yes, go exit. 07000 BRA MACPRT if not P,p,N,n then continue key scan. 07010 MACPOS LEAX MACPR5,PCR adjust the print-out routine to do a 07020 LDD #$6AC4 photo-positive dump. $6AC4 = the op-codes for 07030 STD ,X the 'DEC ,U' commands. 07040 LEAX MACPRD,PCR 07050 LDA #$43 $43 = the op-codes for the COMA command. 07060 STA ,X 07070 BRA MACPR0 go do the photo-positive dump. 07080 MACNEG LEAX MACPR5,PCR adjust the print-out routine to do a 07090 LDD #$1212 photo-negative dump. $1212 = the op-codes for 07100 STD ,X two 'NOP' commands. NOP out the 'DEC ,U'. 07110 LEAX MACPRD,PCR 07120 STA ,X NOP out the 'COMA' command. 07130 ** 07140 *THIS IS THE ACTUAL /MAC BUFFER PRINT-OUT ROUTINE. 07150 ** 07160 MACPR0 LBSR SETPRT go set the printer to the elite+graphics mode. 07170 LDX #MACBUF get start of /MAC picture buffer. 07180 STX TEMPX0 preserve it. 07190 LDA #$66 $66*$07=$2CA (714) = number of lines per screen. 07200 * Actually, there are 720, but we are only going to 07210 * dump 714 lines at first. 07220 STA LINCT0 put it in line counter. 07230 MACPR1 BSR MACPR6 go move 504 bytes from the /MAC picture buffer to 07240 * the work buffer. 07250 BSR MACPR8 go reformat the data (576 pixels or columns 07260 * across), by 7 lines (rows) down, into 576 07270 * Tandy DMP-105 bytes. 07280 LBSR MACPRF go dump the 576 bytes to the printer. 07290 LDA #$FB 07300 STA $FF02 prep pia for [BREAK] test. 07310 LDA $FF00 07320 BITA #$40 is [BREAK] pressed? 07330 LBEQ BREAK0 yes, go exit. 07340 DEC LINCT0 decrement the line counter. 07350 BEQ MACPR2 if all $2CA (714) lines have been dumped, then 07360 * go dump the last six rows ($1B0 [432]) bytes. 07370 LDX TEMPX0 else, get the current position within the /MAC 07380 * picture buffer. 07390 LEAX $1F8,X bump the pointer. 07400 STX TEMPX0 put it back in storage. 07410 BRA MACPR1 go continue the screen dump. 07420 MACPR2 BSR MACPR3 go clear the work buffer. 07430 LDX TEMPX0 get current position in /MAC buffer. 07440 LEAX $1F8,X bump the pointer. 07450 LDY #$1B0 initialize counter to move the last $1B0 (432) 07460 * bytes of the /MAC picture into the work buffer. 07470 LDU #WRKBUF point to the work buffer. 07480 ORCC #$50 disable the irq and firq interrupts. 07490 STA $FFDF enable the upper 32k RAM bank. 07500 BSR MACPR7 go transfer the data. 07510 BSR MACPR8 go reformat the data into DMP bytes. 07520 LBSR MACPRF go dump the data to the printer. 07530 LBSR RESPRT go restore the printer to the normal+text mode. 07540 RTS return. 07550 MACPR3 LDU #WRKBUF point to the work buffer. 07560 LDY #$1F8 number of bytes to clear. 07570 MACPR4 CLR ,U clear the current location. 07580 MACPR5 DEC ,U decrement the current location to $FF. This 07590 * instruction will be NOPped out for a photo- 07600 * negative dump. 07610 LEAU 1,U bump the buffer pointer. 07620 LEAY -1,Y decrement the byte counter. 07630 BNE MACPR4 if not done, then continue. 07640 RTS else, return. 07650 MACPR6 ORCC #$50 disable the irq and firq interrupts. 07660 STA $FFDF enable the upper 32k RAM bank. 07670 LDY #$1F8 number of bytes to transfer into the work buffer. 07680 LDX TEMPX0 get the current position within the /MAC buffer. 07690 LDU #WRKBUF point to the work buffer. 07700 MACPR7 LDA ,X+ get a byte from the /MAC buffer and bump pointer. 07710 STA ,U+ put it in the work buffer and bump pointer. 07720 LEAY -1,Y decrement the byte move counter. 07730 BNE MACPR7 if not done, then continue. 07740 STA $FFDE else enable the upper 32k ROM bank. 07750 ANDCC #$AF enable the irq and firq interrupts. 07760 RTS return. 07770 MACPR8 LDA #$48 bytes per line in a /MAC picture. 07780 STA COUNT0 put it in the counter variable. 07790 LDU #PRTBUF point to the printer data buffer. 07800 LDX #WRKBUF point to the data to be reformatted for output to 07810 * the printer. 07820 STX TEMPX1 preserve it. 07830 MACPR9 LDA #8 8 pixels per byte, 1 per bit. 07840 STA COLUMN 07850 MACPRA LDA #7 the printer accepts seven bits of data as graphic 07860 * data, with bit eight always set high. 07870 STA ROW 07880 CLR STORE clear location where the DMP byte is composed. 07890 MACPRB LDA ,X fetch a byte of picture data from work buffer. 07900 ASLA bit 7 to carry flag. 07910 ROR STORE carry flag into store. 07920 STA ,X put the shifted byte back into the work buffer. 07930 DEC ROW decrement the row counter. 07940 BEQ MACPRC if seven lines have been shifted into store, then 07950 * branch. 07960 LEAX 72,X point to next line down. 07970 BRA MACPRB go do next line. 07980 MACPRC LDA STORE get DMP byte. 07990 LSRA move bits 1-7 to 0-6. 08000 MACPRD COMA reverse b/w data. this instruction will be 08010 * replaced with a NOP for a photo-negative dump. 08020 ORA #$80 set bit 7 high to indicate graphics data. 08030 STA ,U+ put in printer buffer and bump the pointer. 08040 LDX TEMPX1 restore /MAC picture pointer. 08050 DEC COLUMN has one /MAC picture byte been processed? [eight 08060 * pixels by seven lines]. 08070 BNE MACPRA no, go do next pixel by seven lines. 08080 DEC COUNT0 have 72 /MAC bytes (576 pixels) by seven lines 08090 * been processed? 08100 BEQ MACPRE yes, go return 08110 LDX TEMPX1 no, fetch /MAC picture pointer. 08120 LEAX 1,X bump the pointer. 08130 STX TEMPX1 put it back in storage. 08140 BRA MACPR9 go do next /MAC byte by seven lines. 08150 MACPRE RTS done, so return. 08160 MACPRF LDX #PRTBUF point to the printer buffer. 08170 LDY #$240 number of bytes to dump to printer. 08180 MACPRG LDA ,X+ get a byte and bump pointer. 08190 JSR [CHROUT] send it to the printer. 08200 LEAY -1,Y decrement the byte counter. 08210 BNE MACPRG if all of buffer not printed, go do next byte. 08220 LDA #$0D else print a carriage return+line feed. 08230 JSR [CHROUT] 08240 RTS return. 08250 ** 08260 *ROUTINE TO PRINT OUT THE CONTENTS OF THE PMODE 4 SCREEN. 08270 ** 08280 PM4PRT JSR [POLCAT] scan keyboard for a character. 08290 BEQ PM4PRT if no key pressed, continue the scan. 08300 CMPA #$50 is the P key pressed? 08310 BEQ PM4POS yes, go do a photo-positive dump. 08320 CMPA #$70 is the p key pressed? 08330 BEQ PM4POS yes, go do a photo-positive dump. 08340 CMPA #$4E is the N key pressed? 08350 BEQ PM4NEG yes, go do a photo-negative dump. 08360 CMPA #$6E is the n key pressed? 08370 BEQ PM4NEG yes, go do a photo-negative dump. 08380 CMPA #3 is [BREAK] pressed? 08390 LBEQ BREAK yes, go exit. 08400 BRA PM4PRT if not P,p,N,n then continue key scan. 08410 PM4POS LEAX PM4PRB,PCR adjust the print-out routine to do a 08420 LDA #$43 photo-positive dump. $43 = COMA. 08430 STA ,X 08440 BRA PM4P00 go do the photo-positive dump. 08450 PM4NEG LEAX PM4PRB,PCR adjust the print-out routine to do a 08460 LDA #$12 photo-negative dump. $12 = NOP. 08470 STA ,X 08480 ** 08490 *THIS IS THE ACTUAL ROUTINE TO PRINT OUT THE PMODE 4 SCREEN. 08500 ** 08510 PM4P00 LBSR SETPRT go place printer in the elite+graphics mode. 08520 LDX BEGGRP get start of PMODE memory. 08530 STX TEMPX0 store it. 08540 LDA #$1B $1B*$07=$BD (189) = number of lines per screen, 08550 * (actually, there are 192, but we are only dumping 08560 * the first 189 to start with). 08570 STA LINCT1 put it in line counter. 08580 PM4PR0 BSR PM4PR6 go reformat 256 pixels (columns) across, by 7 08590 * lines (rows) down into 256 DMP bytes. 08600 LBSR PM4PRD go dump the 256 byte buffer to the printer. 08610 LDA #$FB 08620 STA $FF02 prep pia for [BREAK] test. 08630 LDA $FF00 08640 BITA #$40 is [BREAK] pressed? 08650 LBEQ BREAK0 yes, go exit. 08660 DEC LINCT1 decrement line counter. 08670 BEQ PM4PR1 if all 189 lines done, then go do last three. 08680 LDX TEMPX0 more lines to do, so get screen memory pointer. 08690 LEAX $E0,X increment it (7 lines * 32 bytes per line = 224 = 08700 * $E0). 08710 STX TEMPX0 put it back. 08720 BRA PM4PR0 go do next 7 lines. 08730 PM4PR1 LDX TEMPX0 move the remaining three lines 08740 LEAX $E0,X of the graphics screen to the 08750 LDY BEGGRP top of the PMODE graphics RAM. 08760 LDB #$60 number of bytes to move. 08770 PM4PR2 LDA ,X+ get a byte and bump pointer. 08780 STA ,Y+ put it in PMODE area and bump pointer. 08790 DECB decrement the byte move counter. 08800 BNE PM4PR2 if not done, then continue. 08810 LDX BEGGRP point to the new location of the last 3 lines. 08820 STX TEMPX0 store pointer. 08830 BSR PM4PR6 go reformat the last three lines. 08840 LDX #PM4BUF point to the reformatted data. 08850 LDY #$100 initialize the buffer length counter. 08860 PM4PR3 LDA ,X get the data from the buffer. 08870 ANDA #$87 clear bits 3-6 to eliminate them. 08880 PM4PR4 STA ,X+ put the data back in the buffer & bump pointer. 08890 LEAY -1,Y decrement the counter. 08900 BNE PM4PR3 if entire buffer not done, go continue. 08910 BSR PM4PRD all done, so go dump the buffer to the printer. 08920 PM4PR5 LBSR RESPRT done, so go restore printer to normal+text mode. 08930 RTS return. 08940 PM4PR6 LDA #$20 perform reformat on 32 ($20) bytes across (256 08950 * pixels). 08960 STA COUNT1 put in counter. 08970 LDU #PM4BUF point to buffer where the 256 dmp bytes will be 08980 * stored. 08990 LDX TEMPX0 point to start of graphics memory. 09000 STX TEMPX1 09010 PM4PR7 LDA #$08 columns (8 per byte, 1 per bit). 09020 STA COLUMN 09030 PM4PR8 LDA #$07 rows (7 lines per dmp byte, 1 line per bit). 09040 STA ROW 09050 CLR STORE clear area where dmp byte is composed. 09060 PM4PR9 LDA ,X get pmode byte. 09070 ASLA bit 7 to carry flag. 09080 ROR STORE carry flag into store. 09090 STA ,X put shifted byte back in pmode memory. 09100 DEC ROW decrement row counter. 09110 BEQ PM4PRA if 0 then 7 lines (rows) have been shifted into 09120 * STORE. 09130 LEAX $20,X else point to next row. 09140 BRA PM4PR9 go do next line. 09150 PM4PRA LDA STORE get dmp byte. 09160 LSRA move bits 1-7 to 0-6. 09170 PM4PRB COMA reverse b/w data. this will be replaced with a 09180 * instruction for a photo-negative dump. 09190 ORA #$80 set bit 7 high to indicate to printer that it's 09200 * graphics data. 09210 STA ,U+ put in buffer and increment pointer. 09220 LDX TEMPX1 restore pmode pointer. 09230 DEC COLUMN has 1 pmode byte (8 pixels) by 7 lines been 09240 * processed? 09250 BNE PM4PR8 no - continue. 09260 DEC COUNT1 have 32 pmode bytes (256 pixels) by 7 lines been 09270 * processed? 09280 BEQ PM4PRC yes - go return. 09290 LDX TEMPX1 no - increment pmode byte pointer. 09300 LEAX 1,X 09310 STX TEMPX1 put it back in storage. 09320 BRA PM4PR7 got do next pmode byte by 7 lines. 09330 PM4PRC RTS done so return. 09340 PM4PRD LDX #PM4BUF point to the printer buffer. 09350 LDY #$100 initialize the buffer length counter. 09360 LBRA MACPRG go dump the buffer to the printer. 09370 SETPRT LDA #$FE two's complement value for -2. 09380 STA DEVNUM set DEVNUM=#-2 (printer). 09390 LEAX GRAFIX,PCR point to printer codes. 09400 SETPR0 LDA ,X+ fetch value and increment pointer. 09410 CMPA #$FF is it the end of data marker? 09420 BEQ SETPR1 yes - go return. 09430 JSR [CHROUT] no - output code to printer. 09440 BRA SETPR0 go back for next value. 09450 SETPR1 RTS done, so return. 09460 GRAFIX FDB $1B17 $1B $17 = codes to select ELITE printing mode. 09470 FDB $12FF $12 = code to select graphics mode. $FF = end 09480 * of codes marker. 09490 RESPRT LEAX NORMAL,PCR point to printer codes. 09500 RESPR0 LDA ,X+ fetch code and increment pointer. 09510 CMPA #$FF is it the end of code marker? 09520 BEQ RESPR1 yes, go restore DEVNUM=0=SCREEN. 09530 JSR [CHROUT] no - output code to printer. 09540 BRA RESPR0 go get next code. 09550 RESPR1 CLR DEVNUM clear DEVNUM=0 (screen). 09560 RTS return. 09570 NORMAL FDB $1E1B printer codes: $1E = end graphics mode. 09580 FDB $13FF $1B13 = select standard character size and $FF = 09590 * end of codes marker. 09600 *[BREAK] KEY HANDLER ROUTINES. 09610 BREAK LDA #$FB 09620 STA $FF02 09630 LDA $FF00 09640 BITA #$40 09650 BEQ BREAK wait until [BREAK] key is released. 09660 RTS 09670 BREAK0 LDA #$FB 09680 STA $FF02 09690 LDA $FF00 09700 BITA #$40 09710 BEQ BREAK0 wait until [BREAK] key is released. 09720 BRA RESPRT go restore printer and return. #$0D 05900 LBEQ READIR 05910 CMPA #$51 05920 BEQ QUIT 05930 CMPA #$71 05940 BEQ QUIT 05950 CMPA #$30 05960 BHS NOMAC2 05970 BRA NOMAC1 05980 NOMAC2 CMPA #$33 05990 BLS NOM