;UMAP.COM›;›;Mac65 source code in atascii form›;› *=$2000;start of entire program›;›;note the drive numbers!›;change these to something you like.›BRIT.MAP .BYTE "D9:BRIT.MAP",155›UFN .BYTE "D9:*.UFN",155›› .INCLUDE #D:beg.M65››CLPe› LDA #0› LDY #127›??CLPeL› STA Pe,Y› DEY› BPL ??CLPeL› RTS››DoPoint› LDA #37› STA $342,x› LDA Ir3› STA $34C,x› LDA IR3+1› STA $34D,x› LDA IR4› STA $34E,x› JMP CIO›› .MACRO POINT› LDX #%1*16› JSR DoPoint› .ENDM››Move11› LDY #0› LDX #11›?@M› LDA (IR1),y› STA (IR0),y› INY› DEX› BNE ?@M› RTS››IIR0@32› CLC› LDA IR0› ADC #32› STA IR0› BCC ?QEX › INC IR0+1› CLC›?QEX RTS››IIR1@32› CLC› LDA IR1› ADC #32› STA IR1› BCC ?xCB› INC IR1+1› CLC›?xCB RTS››IIR@32› JSR IIR0@32› JMP IIR1@32››IIR@1132› CLC› LDA IR0› ADC #11› STA IR0› BCC ?GIr1› INC IR0+1›?GIr1› JMP IIR1@32››IIR@3211› JSR IIR0@32› CLC› LDA IR1› ADC #11› STA IR1› BCC ?DnII› INC IR1+1›?DnII CLC› RTS›› .LOCAL››SPLT› TAX› AND #15› TAY› TXA› LSR A› LSR A› LSR A› LSR A› RTS›› .INCLUDE #D:inc.M65›› .MACRO CLOSE› LDX #%1*16› JSR Clos› .ENDM››IOERs .SBYTE 43,"I/O Error #"››IOERROR› LDX EStack› TXS› LDA md› CMP smd› BNE ??IE› JSR GetBl›??IE› LDA #<IOERs› STA IR0› LDA #>IOERs› STA IR0+1› JSR WriteL2› LDA sf› LDA IR6› JSR WriteLB› LDA #255›??kyp CMP keyp› BEQ ??kyp› STA keyp› Close 2› JSR ClrL2› LDA Cmd› CMP #'R› BNE ?Jsv› JMP LoadEnd›?Jsv JMP SaveEnd››Clos lda #12› sta $342,x› JMP CIO››Opn lda #3› STA $342,x› LDA #0› STA $34B,x› LDA Ir0› STA $344,x› LDA Ir0+1› STA $345,x› JMP CIO›  › .MACRO OPEN› LDX #%1*16› .IF %2<32› LDA #%2› .ELSE› LDA %2› .ENDIF› STA $34A,x› JSR Opn› .ENDM››rw .BYTE 0››DoOpen› JSR Strr› LDA #4› sta rw› LDA Cmd› CMP #'R› BEQ ?DoOsk› LDA #8› STA rw›?DoOsk Close 2› LDY #3›?l_p› LDA (IR7),Y› INY› CMP #155› BNE ?l_p› DEY› DEY› LDX #3›?REP LDA NUMS,X› CLC› ADC #32› STA (IR7),Y› DEY› DEX› BNE ?REP › LDY #1› LDA dvn› STA (IR7),Y› LDA IR7› STA IR0› LDA IR7+1› STA IR0+1› Open 2,rw› CPY #1› BNE ?JERR› RTS›?JERR STY IR6› JMP IOERROR›› .LOCAL››ReadBrit› JSR ?FI0› LDA sf› BEQ ?RBE› LDA dvn› STA Brit+1› Close 2› LDA #<Brit› STA IR0› LDA #>Brit› STA IR0+1› Open 2,4› CPY #1› BEQ ??OKRB › STY IR6› JSR ?FI0› JMP IOERROR›??OKRB› LDA #64› STA i› LDA #<Sc› STA Ir0› LDA #>Sc› STA Ir0+1› LDA #<1024› STA Ir1› LDA #>1024› STA IR1+1›?rprb BGET 2› BPUT 1› DEC i› BNE ?RPRB› Close 2› JMP ?FI0›?RBE› LDA #<17› STA Sec› LDA #>17› STA Sec+1› LDA #'R› STA Cmd› LDA #64› STA i› LDA #<SC› STA IR0› LDA #>Sc› STA IR0+1› LDA #<1024› STA IR1› LDA #>1024› STA IR1+1›?RP1Z LDA #<Sc› STA sc_› LDA #>Sc› STA sc_+1› LDA #8› STA IR7› JSR RWSec› BPut 1› DEC i› BNE ?RP1Z›?FI0 Close 1› LDA #<BRIT.MAP› STA IR0› LDA #>BRIT.MAP› STA IR0+1› Open 1,12› RTS››WriteBrit› LDA #0› STA IR3› STA IR3+1› STA IR4› Point 1› LDA sf› BEQ ??e0› LDA dvn› STA Brit+1› Close 2› LDA #<Brit› STA IR0› LDA #>Brit› STA IR0+1› Open 2,8› CPY #1› BEQ ??OKWB › STY IR6› JMP IOERROR›??OKWB› LDA #<Sc› STA Ir0› LDA #>Sc› STA IR0+1› LDA #<1024› STA Ir1› LDA #>1024› STA Ir1+1› LDA #64› STA i›??Bi› BGet 1› BPut 2› DEC i› BNE ??Bi› Close 2› RTS›??e0› LDA #17› STA Sec› LDA #0› STA Sec+1› LDA #<Sc› sta Ir0› LDA #>Sc› STA IR0+1› LDA #<1024› STA IR1› LDA #>1024› STA IR1+1› LDA #64› STA i›??Wrlp› BGet 1› LDA #<Sc› STA sc_› LDA #>Sc› STA sc_+1› LDA #'P› STA Cmd› LDA #8› STA IR7› JSR RWSec› DEC i› BNE ??Wrlp› RTS››Iicnn› LDA icnn› ASL A› CLC› ADC #<[scadr+32+155*40]› STA IR0› LDA #>[scadr+32+155*40]› ADC #0› STA IR0+1› LDY #0› LDX #4›?IILP› LDA (IR0),Y› EOR #255› STA (IR0),Y› INY› LDA (IR0),Y› EOR #255› STA (IR0),Y› TYA› CLC› ADC #39› TAY› DEX› BNE ?IILP› RTS››Inv_› LDA smd› BNE ?Math› LDA #<[scadr+663]› STA IR0› LDA #>[scadr+663]› JMP ?FI2›?Math› CLC› TAY› LDA #<[scadr+343]› ADC m640L,y› STA IR0› LDA #>[scadr+343]› ADC m640H,y›?FI2› STA IR0+1› LDX #7›?REPI_1 LDY #13›?REPI_ LDA #255› EOR (IR0),Y› STA (IR0),Y› DEY› BPL ?REPI_› CLC› LDA #40› ADC IR0› STA IR0› BCC ?SKI_› INC IR0+1›?SKI_ DEX› BPL ?REPI_1› RTS››DispMenu› LDY smd› BNE ?CDM›??RT› RTS›?CDM› CLC› LDA #<[scadr+357]› ADC m640L,y› STA gsc› LDA #>[scadr+357]› ADC m640H,y› STA gsc+1› LDA cnt,Y› JSR WriteB› LDY smd› CPY #6› BEQ ??RT› CLC› LDA gsc› ADC #<303› STA gsc› LDA gsc+1› ADC #>303› STA gsc+1› LDA cnt,y› CMP cmax,y› BEQ ?NOSKz› BCS ?DOSKz›?NOSKz › LDA pcntLL,y› STA IR1› LDA PcntLH,y› STA IR1+1› LDA pcntHL,y› sta IR2› LDA PcntHH,y› STA IR2+1› LDA cnt,y› TAY› LDA (Ir1),y› sta IR0› lda (Ir2),y› sta IR0+1› JMP WriteCl›?DOSKz› LDA #<FiEx› STA Ir0› LDA #>FiEx› STA IR0+1› JMP WriteNA›› .LOCAL››Menu› LDA #<Menudata› STA Ir0› LDA #>Menudata› STA Ir0+1› LDA #<[scadr+22]› sta gsc› LDA #>[scadr+22]› sta gsc+1› LDA #22› STA i›?LPM› JSR WriteNA› clc› LDA ir4› ADC Ir0› STA IR0› BCC ?SKb› INC IR0+1›?SKb› clc› LDA gsc› adc #<320› STA gsc› lDA gsc+1› ADC #>320› STA gsc+1› DEC i› BNE ?LPM› LDX #6›?4lp› LDA #254› STA [scadr+33+156*40],X› LDA #3› STA [scadr+33+157*40],X› LDA #127› STA [scadr+32+156*40],X› LDA #96› STA [scadr+32+157*40],X› DEX› DEX› BPL ?4lp› LDY #6› LDA #0›??lp STA cnt,y› DEY› BPL ??lp› STA md› STA icn› STA sf› LDA #6› STA smd›?FR0› JSR DispMenu› DEC SMD› BNE ?FR0› RTS››m40L .BYTE 0,<40,<80,<120,<160,<200,<240,<280› .BYTE <320,<360,<400,<440,<480,<520,<560,<600›m40gH .BYTE +>gr8,>0,>40,>80,>120,>160,>200,>240,>280› .BYTE +>gr8,>320,>360,>400,>440,>480,>520,>560,>600››DoIcn› LDA #<[scadr+28+21*320]› STA gsc› LDA #>[scadr+28+21*320]› STA gsc+1› LDA icn› LDY icnn› STA icnt,Y› JSR WriteB›› LDA #160› STA IR0›?Dlp› LDA #<icnt› STA ?yld+1›?ilp› LDY IR0› LDA m40sL,Y› STA ?stor0+1› STA ?stor1+1› LDA m40sH,Y› STA ?stor0+2› STA ?stor1+2› TYA› AND #15› ORA #160› STA ?get0+2› ORA #176› STA ?get4096+2› LDX #32›?yld LDY icnt›?get0 LDA $FF00,Y›?stor0 STA $FFFF,X› INX›?get4096 LDA $FF00,Y›?stor1 STA $FFFF,X› INC ?yld+1› INX› CPX #40› BCC ?yld› INC IR0› LDA IR0› CMP #176› BEQ ?DoneDisp› JMP ?Dlp›?DoneDisp›› .LOCAL› LDA #0› STA IR0› LDA icn› SEC› SBC #9› STA IR0+1› LDA IR0›?ilp› TAY› LDA m40L,Y› STA ?stor0+1› STA ?stor1+1› LDA m40gH,Y› STA ?stor0+2› STA ?stor1+2› TYA› ORA #160› STA ?get0+2› ORA #176› STA ?get4096+2› LDX #0› LDY IR0+1›?get0 LDA $FF00,Y›?stor0 STA $FFFF,X› INX›?get4096 LDA $FF00,Y›?stor1 STA $FFFF,X› INY› INX› CPX #40› BCC ?get0› INC IR0› LDA IR0› CMP #16› BEQ ?DoneDisp› JMP ?ilp›?DoneDisp› RTS›› .LOCAL››?DLB .BYTE 112,112,112,79,<scadr,>scadr›?DLC .BYTE 79,0,144›?DLD .BYTE 66,<L2,>L2,79,<L1,>L1,79,<gr8,>gr8›?DLE .BYTE 65,<DL8,>DL8››?DL0B .BYTE 112,112,112,66,<gr0,>gr0›?DL0E .BYTE 65,<DL0,>DL0››Init› LDA #0› STA dma› STA dma2› Close 6› LDY #0› TYA›?@@ STA $8000,Y› INY› BNE ?@@› INC ?@@+2› LDX ?@@+2› CPX #$A0› BNE ?@@› LDA #<DL8› STA dl› LDA #>DL8› STA dl+1› LDY #5›?@ LDA ?DLB,Y› STA DL8,Y› DEY› BPL ?@› LDY #101› LDA #15›?@0 STA DL8+6,Y› STA DL8+107,Y› DEY› BPL ?@0› LDY #2›?@1› LDA ?DLC,Y› STA DL8+81,Y› DEY› BPL ?@1› LDY #8›?@2 LDA ?DLD,Y› STA DL8+183,Y› DEY› BPL ?@2› LDY #2›?@3 LDA ?DLE,Y› STA DL8+207,Y› DEY› BPL ?@3› LDY #29› LDA #2›?@4 STA DL0,Y› DEY› BNE ?@4› LDY #5›?@5 LDA ?DL0B,Y› STA DL0,Y› DEY› BPL ?@5› LDY #2›?@6 LDA ?DL0E,Y› STA DL0+29,Y› DEY› BPL ?@6› LDA #255› STA L1+18› STA L1+19› LDA #12› STA fg› LDA #0› STA bg› STA TextMode› STA sic› STA vis› TAY›?ILP STA 1536,Y› INY› BNE ?ILP› Close 1› LDA #<UFN› STA IR0› LDA #>UFN› STA IR0+1› Open 1,4› CPY #1› BEQ ??Ci› TYA› JMP DoQuit›??Ci› LDA #<PA› STA IR0› LDA #>PA› STA IR0+1› LDA #<8192› STA IR1› LDA #>8192› STA IR1+1› BGet 1› Close 1› LDA #<BRIT.MAP› STA IR0› LDA #>BRIT.MAP› STA IR0+1› Open 1,4› CPY #1› BEQ ??Di› TYA› JMP DoQuit›??Di› Close 1› LDA #<BRIT.MAP› STA IR0› LDA #>BRIT.MAP› STA IR0+1› OPEN 1,12› JSR Menu› LDA #0› STA crmd› STA vdel› STA oyv› STA ps0› STA Ttyp› STA icnn› LDY #3›?pcl STA 53248,y› DEY› BPL ?pcl› STA smd› JSR Inv_› JSR Iicnn› LDA #'1› STA dvn› LDY #3›?icnt TYA› STA icnt,Y› DEY› BPL ?icnt› LDA #1› STA ocrmd› STA gprior› LDA #4› STA pmb› LDA #16› STA pc0› LDA #2› STA gractl› LDA #42› sta dma› RTS›› .LOCAL››PosCur› LDA crmd› CMP ocrmd› BEQ ?CONT› STA ocrmd› LDA #255› STA ox› STA oy›?CONT› LDA rx› CMP ox› BEQ ?SKIP› sta ox› ASL A› ASL A› LDX crmd› BNE ?NEQ› ASL A› CLC› ADC #48› BNE ?PSKIP›?NEQ› CLC› ADC #76›?PSKIP STA p0x›?SKIP› LDA ry› CMP oy› BNE ?CNT› RTS›?CNT› STA oy› LDA crmd› BNE ?ocr› LDA #255› STA IR0› LDA #8› STA IR0+1› LDA #0› STA IR1› LDA #16› BNE ?FI›?ocr› LDA #240› STA IR0› LDA #4› STA IR0+1› LDA #255› STA IR1› LDA #44›?FI STA IR1+1› ldy oyv› ldx #8› lda #0›?REP sta 1536,y› iny› dex› bne ?rep› lda ry› asl a› asl a› bit IR1› bmi ??SK› asl a›??SK adc IR1+1› sta oyv› tay› lda IR0› ldx IR0+1›?rep2 sta 1536,y› iny› dex› bne ?rep2› RTS›› .LOCAL››GLP› LDA #16› STA i›?lpG2› LDA Ir5› BNE ?DoBPut› BGet 1› JMP ?SkBPut›?DoBPut› BPut 1›?SkBPut› CLC› LDA IR0› ADC #32› STA IR0› BCC ?cc2› INC Ir0+1›?cc2› DEC i› BNE ?lpG2› RTS››DoBl› STA IR3+1› LDA #0› STA IR3› STA IR4› Point 1› LDA #<Sc› STA Ir0› LDA #>Sc› STA Ir0+1› LDA #16› STA IR1› LDA #0› STA IR1+1› JSR GLP› CLC› LDA IR3+1› ADC #16› STA IR3+1› Point 1› JSR GLP› LDA oq› STA IR3+1› inc IR3+1› AND #$F› CMP #$F› BNE ?KOK› LDA oq› AND #$F0› STA IR3+1›?KOK Point 1› LDA #<[Sc+16]› stA Ir0› LDA #>[Sc+16]› STA Ir0+1› JSR GLP› CLC› LDA IR3+1› ADC #16› STA IR3+1› Point 1› JMP GLP››GetBl› LDA #0› STA IR5› LDA my› ASL A› ASL A› ASL A› ASL A› CLC› ADC mx› STA oq› JMP DoBl››PutBl› LDA #255› STA IR5› LDA oq› JMP DoBl›› .LOCAL››Rot› STA IR0› STA IR1› STA IR2› STA IR3› LDY #>[Pa+3840]› STY IR2+1› DEY› STY IR0+1› LDY #>[Pa+3840+4096]› STY IR3+1› DEY› STY IR1+1› LDY #0› LDX #15› LDA (Ir2),Y› STA IR4› LDA (IR3),Y› STA IR4+1›?RotLP› LDA (Ir0),Y› STA (Ir2),Y› LDA (IR1),Y› STA (IR3),Y› DEC IR0+1› DEC IR1+1› DEC IR2+1› DEC IR3+1› DEX› BNE ?RotLP› LDA IR4› STA (IR2),y› LDA IR4+1› STA (IR3),y› RTS››Flag› STA IR0+1› LDA rnd› AND #3› BNE ?NoX› RTS›?NoX STX IR0› LDY #0› LDA (IR0),Y› TAX› INC IR0+1› LDA (IR0),Y› STA Ir1› TXA› STA (IR0),Y› DEC Ir0+1› LDA Ir1› STA (Ir0),Y› LDX Ir0› CPX #16› BEQ ?DFl› CPX #18› BNE ?NFl›?DFl LDA IR0+1› CMP #>[pa+4096+512]› BEQ ?NFl› CLC› ADC #16› STA IR0+1› BNE ?NoX›?NFl RTS››?FPaH .BYTE >[pa+256],>[pa+768],>[pa+4096+256]› .BYTE >[pa+512],>[pa+512]›?FNm .BYTE 14,10,11,16,18››DoChr› LDA #0› JSR Rot› LDA #1› JSR Rot› LDA #2› JSR Rot› LDA #76› JSR Rot› LDY #4› STY IR4›?DCLP LDY IR4› LDA ?FPaH,Y› LDX ?FNm,Y› JSR Flag› DEC IR4› BPL ?DCLP› LDA #>Pa› STA IR0+1› STA IR1+1› STA IR2+1› STA IR3+1› LDY #68› STY IR0› INY› STY IR2› INY› STY IR1› INY› STY IR3› LDY #0› LDX #32›?DCLP1› LDA rnd› AND #170› STA (IR0),y› INC IR0+1› STA IR4› LSR A› STA (IR1),y› INC IR1+1› ORA IR4› STA IR4› LDA rnd› AND #170› ORA IR4› STA (IR2),y› INC IR2+1› LDA (IR3),Y› EOR #255› STA (IR3),y› INC IR3+1› DEX› BNE ?DCLP1› LDA #>[pa+$700]› STA IR0+1› LDA #>[pa+$1700]› STA IR1+1› LDA #75› STA IR0› STA IR1› LDX #6›?DCLP2› LDA rnd› AND #21› STA Ir2› LDA (Ir0),y› AND #224› ORA IR2› STA (IR0),y› LDA rnd› AND #64› STA IR2› LDA (Ir1),y› AND #63› ORA IR2› STA (IR1),y› INC IR1+1› INC IR0+1› DEX› BNE ?DCLP2› RTS›› .LOCAL››CPlot› ASL A› ADC #0› CLC› ADC m640L,Y› STA IR0› LDA m640H,Y› ADC #>scadr› STA IR0+1› LDA #<scadr› ADC IR0› STA IR0› BCC ?CPsk› INC IR0+1›?CPsk› LDA #0› TAY› STA IR1+1› TXA› asl a› asl a› rol IR1+1› asl a› rol IR1+1› STA IR1› LDA IR1+1› ADC #>57344› STA Ir1+1›?LPCP› LDA (Ir1),y› STA (IR0),y› CLC› LDA IR0› ADC #39› STA IR0› BCC ?CPsk2› INC IR0+1›?CPsk2 INY› CPY #8› BNE ?LPCP› RTS››DoShowPe› ASL A› ASL A› ASL A› ASL A› STA j› LDX #8› STX i› LDA #16› STA IR7›?DSPlp› LDX j› LDA Pe+64,X› LDY Pe+72,X› LDX IR7› CLC› JSR CPlot› INC j› INC IR7› DEC i› BNE ?DSPlp› RTS››ShowM3› LDA #15› STA i›?SM3lp› LDX i› LDA Pe+64,x› LDY Pe+80,x› LDX #'M-32› SEC› JSR CPlot› DEC i› BPL ?SM3lp› LDA #2› JMP DoShowPe››ShowM4› LDA Ptyp› CMP #2› BNE ?SMELSE› LDA per› ASL A› ASL A› TAY› STY IR7› LDA Pe+1,Y› JSR SPLT› LDX #'T-32› SEC› JSR CPlot› LDY IR7› LDA Pe+2,Y› JSR SPLT› LDX #'1-32› CLC› JSR CPlot› LDY IR7› LDA Pe+3,Y› JSR SPLT› LDX #'2-32› CLC› JMP CPlot›?SMELSE› LDA s_dir› JMP DoShowPe›› .LOCAL››m40sL› .BYTE <33824,<33864,<33904,<33944,<33984,<34024,<34064,<34104,<34144,<34184,<34224,<34264,<34304,<34344,<34384,<34424› .BYTE <34464,<34504,<34544,<34584,<34624,<34664,<34704,<34744,<34784,<34824,<34864,<34904,<34944,<34984,<35024,<35064› .BYTE <35104,<35144,<35184,<35224,<35264,<35304,<35344,<35384,<35424,<35464,<35504,<35544,<35584,<35624,<35664,<35704› .BYTE <35744,<35784,<35824,<35864,<35904,<35944,<35984,<36024,<36064,<36104,<36144,<36184,<36224,<36264,<36304,<36344› .BYTE <36384,<36424,<36464,<36504,<36544,<36584,<36624,<36664,<36704,<36744,<36784,<36824,<36864,<36904,<36944,<36984› .BYTE <37024,<37064,<37104,<37144,<37184,<37224,<37264,<37304,<37344,<37384,<37424,<37464,<37504,<37544,<37584,<37624› .BYTE <37664,<37704,<37744,<37784,<37824,<37864,<37904,<37944,<37984,<38024,<38064,<38104,<38144,<38184,<38224,<38264› .BYTE <38304,<38344,<38384,<38424,<38464,<38504,<38544,<38584,<38624,<38664,<38704,<38744,<38784,<38824,<38864,<38904› .BYTE <38944,<38984,<39024,<39064,<39104,<39144,<39184,<39224,<39264,<39304,<39344,<39384,<39424,<39464,<39504,<39544› .BYTE <39584,<39624,<39664,<39704,<39744,<39784,<39824,<39864,<39904,<39944,<39984,<40024,<40064,<40104,<40144,<40184› .BYTE <40224,<40264,<40304,<40344,<40384,<40424,<40464,<40504,<40544,<40584,<40624,<40664,<40704,<40744,<40784,<40824›m40sH› .BYTE >33824,>33864,>33904,>33944,>33984,>34024,>34064,>34104,>34144,>34184,>34224,>34264,>34304,>34344,>34384,>34424› .BYTE >34464,>34504,>34544,>34584,>34624,>34664,>34704,>34744,>34784,>34824,>34864,>34904,>34944,>34984,>35024,>35064› .BYTE >35104,>35144,>35184,>35224,>35264,>35304,>35344,>35384,>35424,>35464,>35504,>35544,>35584,>35624,>35664,>35704› .BYTE >35744,>35784,>35824,>35864,>35904,>35944,>35984,>36024,>36064,>36104,>36144,>36184,>36224,>36264,>36304,>36344› .BYTE >36384,>36424,>36464,>36504,>36544,>36584,>36624,>36664,>36704,>36744,>36784,>36824,>36864,>36904,>36944,>36984› .BYTE >37024,>37064,>37104,>37144,>37184,>37224,>37264,>37304,>37344,>37384,>37424,>37464,>37504,>37544,>37584,>37624› .BYTE >37664,>37704,>37744,>37784,>37824,>37864,>37904,>37944,>37984,>38024,>38064,>38104,>38144,>38184,>38224,>38264› .BYTE >38304,>38344,>38384,>38424,>38464,>38504,>38544,>38584,>38624,>38664,>38704,>38744,>38784,>38824,>38864,>38904› .BYTE >38944,>38984,>39024,>39064,>39104,>39144,>39184,>39224,>39264,>39304,>39344,>39384,>39424,>39464,>39504,>39544› .BYTE >39584,>39624,>39664,>39704,>39744,>39784,>39824,>39864,>39904,>39944,>39984,>40024,>40064,>40104,>40144,>40184› .BYTE >40224,>40264,>40304,>40344,>40384,>40424,>40464,>40504,>40544,>40584,>40624,>40664,>40704,>40744,>40784,>40824››hdy .BYTE $FF,$FF›hdx .BYTE $FF,0,1,1,1,0,$FF,$FF,$FF,0›m11 .BYTE 0,11,22,33,44,55,66,77,88,99,110››Spike› STA IR0› STY IR0+1›?DOs› CLC› LDA IR0› ADC hdx,X› CMP #11› BCS ?Esz› STA IR0› CLC› LDA IR0+1› ADC hdy,X› CMP #11› BCS ?Esz› STA IR0+1› TAY› LDA m11,Y› CLC› ADC IR0› TAY› LDA hbuf2,Y› STA hbuf1,Y› CMP #127› BEQ ?Esz› CMP #6› BEQ ?Esz› CMP #8› BEQ ?Esz› CMP #73› BNE ?DOs›?Esz RTS››Vis_› LDX #120› LDA #126›?vh STA hbuf1,X› DEX› BPL ?vh› LDA #1› STA IR1› LDY ry› LDA m11,Y› CLC› ADC rx› TAX› LDA hbuf2,X› STA hbuf1,X›?DOvo› LDA rx› STA IR2› LDA ry› STA IR2+1›?Dovi› LDX IR1› CLC› LDA IR2› ADC hdx,X› CMP #11› BCS ?ODvi› STA IR2› CLC› LDA IR2+1› ADC hdy,X› CMP #11› BCS ?ODvi› STA IR2+1› TAY› LDA m11,Y› CLC› ADC IR2› TAX› LDA hbuf2,X› STA hbuf1,X› CMP #127› BEQ ?ODvi› CMP #6› BEQ ?ODvi› CMP #8› BEQ ?ODvi› CMP #73› BEQ ?ODvi› LDX IR1› DEX› LDA IR2› LDY IR2+1› JSR Spike› INX› INX› LDA IR2› LDY IR2+1› JSR Spike› JMP ?DOvi›?ODvi› INC IR1› LDA IR1› CMP #9› BCS ?dnv› JMP ?DOvo›?dnv RTS››Display› LDA 704›?DSDG CLC› ADC #16› BEQ ?DSDG› STA 704› JSR DoChr› LDA #0› STA IR0+1› LDA j› ASL A› ASL A› ASL A› ASL A› ROL IR0+1› ASL A› ROL IR0+1› CLC› ADC i› STA ?cil+1;lk› LDA IR0+1› ADC #>Sc› STA ?cil+2› LDX #0›?cyl› LDY #0›?cil LDA $FFFF,Y› STA hbuf2,X› INX› INY› CPY #11› BNE ?cil› CLC› LDA ?cil+1› ADC #32› STA ?cil+1› BCC ?dn?› INC ?cil+2›?dn? CPX #121› BCC ?cyl›› LDA vis› BEQ ?nvis› LDA md› CMP #2› BCS ?nvis› JSR Vis_;;IF ((md=0) OR (md=1)) AND (vis=1) THEN›;Do Visibility check› JMP DoDisp_›?nvis› LDX #120›?mbh LDA hbuf2,X› STA hbuf1,X› DEX› BPL ?mbh››DoDisp_› LDA #0› STA IR0›?Dlp› STA ?yld+1›?ilp› LDY IR0› LDA m40sL,Y› STA ?stor0+1› STA ?stor1+1› LDA m40sH,Y› STA ?stor0+2› STA ?stor1+2› TYA› AND #15› ORA #160› STA ?get0+2› ORA #176› STA ?get4096+2› LDX #0›?yld LDY hbuf1›?get0 LDA $FF00,Y›?stor0 STA $FFFF,X› INX›?get4096 LDA $FF00,Y›?stor1 STA $FFFF,X› INC ?yld+1› INX› CPX #22› BCC ?yld› INC IR0› LDA IR0› CMP #176› BEQ ?DoneDisp› AND #15› BEQ ?ilp› LDA ?yld+1› SEC› SBC #11› JMP ?Dlp›?DoneDisp› LDA sic› BEQ ?DoIcn› LDA md› CMP #3› BNE ?Nmd3› JSR ShowM3› JMP ?DoIcn›?Nmd3 CMP #4› BNE ?DoIcn› JSR ShowM4›?DoIcn JSR DoIcn› RTS›› .LOCAL››M_Fount› STA Ir0› STX IR0+1› LDY #5› LDA (IR0),Y› STA IR1›?MDo› DEY› LDA (IR0),Y› INY› STA (IR0),Y› DEY› BNE ?MDo› LDA IR1› STA (Ir0),y› RTS››Mod_› LDA #<gf_› LDX #>gf_› JSR M_Fount› LDA #<pf_› LDX #>pf_› JSR M_Fount› LDA #<pf2_› LDX #>pf2_› JSR M_Fount› LDA #<cf_› LDX #>cf_› JSR M_Fount› LDA #<poi_› STA IR0› LDA #>poi_› STA IR0+1› LDA #<fir_› STA IR1› LDA #>fir_› STA IR1+1› LDA #<lig_› STA IR2› LDA #>lig_› STA IR2+1› LDA #<sl_› STA IR3› LDA #>sl_› STA IR3+1› LDY #0›?ylp› LDA rnd› AND #170› STA (Ir0),Y› STA Ir4› LSR A› STA (Ir1),Y› ORA Ir4› STA Ir4› LDA rnd› AND #170› ORA Ir4› STA (Ir2),Y› LDA (Ir3),Y› EOR #255› STA (IR3),Y› INY› CPY #8› BNE ?ylp› RTS ››Ind_› LDX #0›??ind CMP ToV,X› BEQ ?dn› INX› CPX #22› BNE ??ind›?dn› RTS››dd .SBYTE 34,"00"››DoDngIcn› LDA #<[scadr+24+21*320]› STA gsc› LDA #>[scadr+24+21*320]› STA gsc+1› SEC› LDA icn› SBC #22› BCS ?elsie› LDA #3› STA Blnk› LDA #<Blnk› STA IR0› LDA #>Blnk› STA IR0+1› JSR Write› JMP ?FIDDI›?elsie› STA IR7› LDA cnt+4› ASL A› ASL A› ASL A› ASL A› ORA IR7› STA IR7› LDA cnt+4› CMP #7› BNE ??fii› LDA xx› AND #254› ASL A› ASL A› ASL A› CLC› ADC IR7› STA IR7›??fii› LDA IR7› JSR WriteB›?FIDDI› LDA #<[scadr+23+20*320]› STA IR0› LDA #>[scadr+23+20*320]› STA IR0+1› LDX icn› CPX #22› BCC ?jdi› LDX #22›?jdi LDA chadL,X› STA ?ilp+1› LDA chadH,X› STA ?ilp+2› LDY #0› LDX #0›?ilp LDA $FFFF,X› STA (IR0),Y› CLC› LDA IR0› ADC #40› STA IR0› BCC ??CCilp› INC IR0+1›??CCilp INX› CPX #8› BNE ?ilp› LDA #<[scadr+25+20*320]› STA gsc› LDA #>[scadr+25+20*320]› STA gsc+1› LDA icn› CMP #22› BCC ?ELSEDDI› SEC› SBC #22› STA IR0› LDA #10› STA IR1› JSR BDiv› CLC› LDA IR2› ADC #16› STA dd+1› LDA IR0› ADC #16› STA dd+2› LDA #<dd› STA IR0› LDA #>dd› STA IR0+1› JMP Write›?ELSEDDI› LDA #2› STA Blnk› LDA #<Blnk› STA IR0› LdA #>Blnk› STA IR0+1› JMP Write››DispDng› JSR Mod_› LDA #0› STA IR3+1› LDA xx› asl A› ASL A› ASL A› ASL A› ASL A› ASL A› ROL IR3+1› ADC #<Sc› STA IR3› LDA Ir3+1› ADC #>Sc› STA IR3+1› LDA #<[scadr+2247]› STA IR1› LDA #>[scadr+2247]› STA IR1+1› LDA #7› STA j›??ypDO› CLC› LDA IR1› STA Ir0› ADC #<320› STA IR1› LDA IR1+1› STA IR0+1› ADC #>320› STA IR1+1› LDA #7› STA i› LDA #0› STA IR6›??xpDO› LDY IR6› LDA (IR3),Y› JSR Ind_› INC IR6› LDA chadL,X› STA ?Lrep+1› LDA chadH,X› STA ?Lrep+2› LDA IR0+1› STA IR2+1› LDA IR0› STA IR2› INC IR2› BNE ??nir2› INC IR2+1›??nir2› ldy #0›?Lrep lda $FFFF,Y› sta (IR0),y› clc› lda IR0› adc #39› sta IR0› bcc ?nir0› inc IR0+1›?nir0 iny› cpy #8› bne ?Lrep› LDA IR2› STA IR0› LDA IR2+1› STA IR0+1› DEC i› BPL ??xpDO› CLC› LDA IR3› ADC #8› STA IR3› BCC ??ccd› INC IR3+1›??ccd› DEC j› BPL ??ypDO› JMP DoDngicn›› .INCLUDE #D:incpe.M65›› .INCLUDE #D:end.M65››