.RADIX 8 .PABS .XLINK .XSYM .SALL CONFIG= \"Config <1/z,2pol,3/cpml,4/cpmh>?- " Z80= \"Z80 ?- " MONCLK= \"Clock <1comptek/2computime>?- " ; .ife z80,[RSTINT=1] .ife z80-1,[RSTINT=0] ; .IFE CONFIG-2,[ POL88=1 EXTLOC= ^H1800 PARAM= ^H5200 $COM= ^H5000 BEGIN= ^H2000] ; .IFE CONFIG-3,[ EXTLOC= ^H400 PARAM= ^H3400 $COM= ^H100 BEGIN= ^H1000] ; .IFE CONFIG-4,[ EXTLOC= ^H0A400 PARAM= ^H400 $COM= ^H100 BEGIN= ^H8000] ; PRINIT=BEGIN+^D12 ; KRET= ^H0C9 KINP= ^H0DB ; .IFNDEF CALEN,[ CALEN= 0] ; .IFE MONCLK-1,[ CLKBAS= 250] ; .IFE MONCLK-2,[ CALEN= 2 CLKBAS= ^H50 ] ; COMMON=1 ; ;****** boiler plate starts ******* .XLIST $$SAE= ^D1 $$SAS= ^D2 $$SWA= ^D3 $$SRB= ^D4 $$SER= ^D5 $$SLK= ^D6 $$RXQ= ^D7 $$SGT= ^D8 $$SXX= ^D9 $$RQQ= ^D10 $$SNQ= ^D11 $$SRA= ^D12 $$RVA= ^D13 $$SHK= ^D14 $$SPK= ^D15 $$SLF= ^D16 $$RNA= ^D17 $$RNH= ^D18 $$SAT= ^D19 $$SFA= ^D20 $$SDS= ^D21 $$SDD= ^D22 $$SWS= ^D23 $$SAN= ^D24 $$SFS= ^D25 $$SGV= ^D26 $$SSB= ^D27 $$SPA= ^D28 $$SRQ= ^D29 $$SPL= ^D30 $$RAC= ^D31 $$RAD= ^D32 $$RAY= ^D33 $$RAZ= ^D34 $$STO= ^D35 $$STI= ^D36 $$STL= ^D37 $$SPR= ^D38 $$SHR= ^D39 $$SGQ= ^D40 $$SXB= ^D41 $$SXC= ^D42 $$SUP= ^D43 $$SMN= ^D44 $$SDV= ^D45 $$SUB= ^D46 $$SPO= ^D47 $$SRI= ^D48 $$SXL= ^D49 $$SLD= ^D50 ;[DEUQ] ; .SYN RC,JRQC .SYN RZ,JRQZ .SYN RNC,JRQNC .SYN RNZ,JRQNZ .SYN RM,JRQM ; ; ;[DEUM] ; .DEFINE LINKJ[ADR]= [ JMP $COM+3*ADR] ; .DEFINE LINKC[ADR]= [ CALL $COM+3*ADR] ; .DEFINE SKIP1= [ .BYTE 376] .DEFINE .T[A,B,C,ADR]= [.WORD ((B&7)<15)+((C&37)<10)+((A&37)<2)+((B&30)>3) .IFNDEF ADR,[ .WORD 0] .IFDEF ADR,[ .WORD ADR] ] .DEFINE MTAB[TAB]= [ LXI H,TAB] .DEFINE TTAB[M1,M2,ADR]= [ .BYTE (M1 & N137) .BYTE (M2 & N137) .WORD ADR] .DEFINE DINX[REG]= [ INX REG INX REG] .DEFINE DDCX[REG]= [ DCX REG DCX REG] .DEFINE JCLA= [ XRA A] .DEFINE DSUB[SBT]= [ XCHG LHLD SBT CALL MSUB] .DEFINE TSTA= [ ORA A] .DEFINE MJST2[PTR]= [ LHLD PTR+2 XCHG LHLD PTR CALL MST2] .DEFINE MBTEST[TEMP]= [ LDA TEMP TSTA] .DEFINE MMOVE[PTR]= [ LHLD PTR+2 XCHG LHLD PTR] .DEFINE SKIP2[REG]= [.BYTE 001!(((REG)&6)<3)] ; .DEFINE MJSSR[TO,FRM,FRME]=;def [ LHLD FRM MOV B,H MOV C,L LHLD TO XCHG LHLD FRME CALL MSHR SHLD FRME] ; ; ;[DEUZ1] ; .SYN RET,JRQ .IFE Z80,[ .SYN JMP,.JMPR .SYN JNC,.JRNC .SYN JC,.JRC .SYN JNZ,.JRNZ .SYN JZ,.JRZ ; .DEFINE MJSSA[FROM,TO,LNGTH]= [ LXI B,LNGTH LXI H,FROM LXI D,TO ; CALL MSSA] .DEFINE .DJNZ[ADR]= [ DCR B JNZ ADR] ; .DEFINE MDSBCD= [ MOV A,L SUB E MOV L,A MOV A,H SBB D MOV H,A] ] ; ; .IFG Z80,[ .SYN JMPR,.JMPR .SYN JRNC,.JRNC .SYN JRC,.JRC .SYN JRNZ,.JRNZ .SYN JRZ,.JRZ ; .DEFINE MJSSA[FROM,TO,LNGTH]= [ LXI B,LNGTH LXI H,FROM LXI D,TO LDIR] .DEFINE .DJNZ[ADR]= [ DJNZ ADR] .DEFINE MDSBCD= [ JCLA DSBC D] ] ; ; P=PARAM VAR1= P+14 BOOT= P+15 MSCI= P+17 MSRI= P+22 MSCO= P+25 MSPO= P+30 MSLO= P+33 mscsts= P+36 MSCHK= P+41 MSSET= P+44 MSMCK= P+47 MSBDOS= P+52 PSEsym= P+55 PUIsym= P+57 PUOsym= P+61 PULsym= P+63 TAMsym= P+65 POAsym= P+67 POBsym= P+71 POCsym= P+73 PODsym= P+75 PSWsym= P+77 PSYsym= P+101 PWAsym= P+103 tr= P+105 te= P+106 RIX= P+107 BIX= P+110 MCH= P+111 TCE= P+112 CE= P+114 INPsym= P+116 OUTsym= P+120 SPRW3= P+122 LDRCNL= P+123 LDRCNH= P+124 RUBOT= P+125 RUBO1= P+126 RUBO2= P+127 NULCH= P+130 NULCT= P+131 PLIN= P+132 KYN1= P+133 KYN2= P+134 CWSAF= P+135 CWSNF= P+136 CWSEF= P+137 CWSPF= P+140 CWMBF= P+141 CWMAF= P+142 CWMNF= P+143 CWCAS= P+144 CWCQC= P+145 CWUNP= P+146 CWBP1= P+147 CWEP1= P+150 CWBP2= P+151 CWEP2= P+152 CWBMF= P+153 CWEMF= P+154 ENDWC= P+155 FUTUR0= P+156 FUTUR1= P+157 SYN= P+161 CPCM= P+167 SYN1= P+171 SYNR= P+173 SYNR1= P+175 CPRP= P+177 SCEK= P+204 S1= P+211 S2= P+212 S3= P+213 DSYS1= P+215 DSYS2= P+217 DSYS3= P+221 DSYS4= P+223 DEXT= P+225 JMP1TS= P+230 JMP2TS= P+231 TAEsym= P+232 TAHsym= P+234 TALsym= P+236 PWR= P+240 PAE= P+242 PEL= P+244 PFL= P+246 ZERO= P+250 EXFLG= P+251 PG1= P+252 PG1A= P+253 PG2= P+254 PG2A= P+255 BASE= P+256 LT= P+257 CH= P+261 PFI= P+262 PFF= P+264 PFN= P+266 PFT= P+270 T1= P+272 T2= P+274 T3= P+276 PAL2= P+300 PAN2= P+302 PAL= P+304 PAN= P+306 PALPL= P+310 PANPN= P+312 T4= P+314 T5= P+316 T6= P+320 T7= P+322 T8= P+324 T9= P+326 ADS32= P+330 ADS33= P+332 RAND= P+334 CHA1= P+336 CHA2= P+340 PAL21= P+342 SMSW= P+344 NULF= P+345 PNF= P+346 PNFI= P+347 ARG1= P+350 ARG2= P+352 ARG3= P+354 TM1= P+356 MOQOV= P+357 PCNT= P+362 ZCNT= P+363 IOBYT= P+421 SAMBYT= P+422 KTRAK= P+423 DISK1= P+425 DISK2= P+427 DISK3= P+431 DISK4= P+433 DISK5= P+435 DISK6= P+437 DISK7= P+441 CALDA= P+443 SAMJM1= P+446 JMP1AD= P+447 QWSD0= P+451 PLTNX= P+454 PLTNY= P+456 PLTQD= P+460 PLTPN= P+462 PLTCM= P+463 PLTSX= P+464 PLTSY= P+465 PLTWL= P+466 PLTWR= P+470 PLTVM= P+472 TM2= P+473 TC3= P+475 TCECT= P+477 TCEAN= P+501 SERFLG= P+502 PKFLG= P+503 RSTHLD= P+504 USER1= P+513 USER1A= P+514 USER2= P+515 USER2A= P+516 USER3= P+517 USER3A= P+520 USER4= P+521 USER4A= P+522 REGSAV= P+523 ;[CONSTANTS] ; N10=10 N11=11 N12=12 N13=13 N14=14 N15=15 N16=16 N17=17 N20=20 N21=21 N24=24 N30=30 N34=34 N37=37 N40=40 N50=50 N51=51 N60=60 N70=70 N74=74 N76=76 N77=77 N100=100 N110=110 N137=137 N144=144 N133=133 N135=135 N177=177 N200=200 N202=202 N277=277 N300=300 N340=340 N34=34 N377=377 N1K=1000 N1750=1750 N10K=10000 N100K=100000 N2342=23420 ; K400K=200 K500K=240 K600K=300 K700K=340 ; KABM= K600K