8-Bit Software Online Conversion

Printer Command - Listing

10REM Code for new star command 20REM Command : *PRINTER 30REM Operation : Resets Printer 40: 50Name$="PRINTER" 60OSBYTE=&FFF4:OSWRCH=&FFEE:OSNEWL=&F FE7 70ZPage=&F2:CLIV=&208 80Start=&1900-&200 90PROCAssemble 100@%=&90A 110PRINT" *SAVE "Name$;" "÷Start;" "÷P %;" FF"÷ExAddr;" FF"÷Start 120END 130: 140DEFPROCAssemble 150Cmd=Start 160$Cmd=Name$ 170FORPass%=0TO3STEP3 180P%=Start+LEN(Name$) 190[OPT Pass% 200.NewCLI STX ZPage:STY ZPage+1 210LDX#0:LDY#0 220JSR FetchChar 230CMP#&2A:BNE CompCmd 240INY:JSR FetchChar"* 250.CompCmd LDA(ZPage),Y:AND#95 260CMP Cmd,X:BNE NotThisCmd 270INY:INX:CPX#LEN(Name$) 280BCC CompCmd 290LDA(ZPage),Y:CMP#13:BEQ ThisCmd 300INY:CMP#32:BEQ ThisCmd 310.NotThisCmd LDX ZPage:LDY ZPage+1 320JMP(OldCLIV) 330.FetchChar LDA(ZPage),Y:CMP#32 340BNE ExitFetchChar 350INY:BNE FetchChar 360.ExitFetchChar RTS 370.OldCLIV NOP:NOP 380.ExAddr LDA CLIV:STA OldCLIV 390LDA CLIV+1:STA OldCLIV+1 400LDA#NewCLIMOD256:STA CLIV 410LDA#NewCLIDIV256:STA CLIV+1 420TYA:PHA 430LDA#180:LDX#0:LDY#255:JSR OSBYTE 440CPX#(ExAddrDIV256)+1:BCS OSHWMSet 450LDX#(ExAddrDIV256)+1:LDY#0:JSR OSBY TE 460.OSHWMSet PLA:TAY 470: 480.ThisCmd 490LDA#6 500JSR&FFF4 510LDA#1 520JSR&FFEE 530LDA#27 540JSR&FFEE 550LDA#1 560JSR&FFEE 570LDA#72 580JSR&FFEE 590LDA#1 600JSR&FFEE 610LDA#70 620JSR&FFEE 630LDA#1 640JSR&FFEE 650LDA#18 660JSR&FFEE 670LDA#1 680JSR&FFEE 690LDA#20 700JSR&FFEE 710LDA#1 720JSR&FFEE 730LDA#50 740JSR&FFEE 750LDA#1 760JSR&FFEE 770LDA#84 780JSR&FFEE 790LDA#10 800JSR&FFEE 810LDA#13 820JSR&FFEE 830LDA#80 840JSR&FFEE 850LDA#114 860JSR&FFEE 870LDA#105 880JSR&FFEE 890LDA#110 900JSR&FFEE 910LDA#116 920JSR&FFEE 930LDA#101 940JSR&FFEE 950LDA#114 960JSR&FFEE 970LDA#32 980JSR&FFEE 990LDA#83 1000JSR&FFEE 1010LDA#101 1020JSR&FFEE 1030LDA#116 1040JSR&FFEE 1050LDA#117 1060JSR&FFEE 1070LDA#112 1080JSR&FFEE 1090LDA#10 1100JSR&FFEE 1110LDA#13 1120JSR&FFEE 1130RTS 1140] 1150NEXT 1160ENDPROC