4 OPEN1,8,2,"PLOT.OBJ,P,W" 10 SYS9*4096:.OPT O1:*=$C000 15 .ASC "PROGRAM:" 20 ZP1 = 251:ZP2 = 252:ZP3 = 253:ZP4 = 254 22 LO = 167:HI = 168 24 CL0 = 53281:CL1 = 53282 25 CL2 = 53283:CL3 = 53284 30 FRMNUM = $AD8A:CKCOM = $AEFD 700 JMP PLOT; PLOT-COMMAND 702 JMP L960; PUNKT SETZEN AUS LINE ETC 704 JMP ADR2; BYTE SETZEN 800 ; *** EINGABEN *** 810 PLOT JSR FRMNUM:JSR $BC9B:LDA $65:STA XL:LDA $64:STA XH 830 JSR $E200:STX YB:JSR $E200:STX MODUS:JMP L968 952 ; *** EINSPRUNG AUS LINE ETC ** 954 ; *** DATEN IN A,X,Y,STACK ** 960 L960 STA XL:STX XH:STY YB:PLA:STA MODUS 964 ; *** HGR ODER MULTI-PLOT *** 968 L968 LDA 53270:AND #16:BEQ L1412:JMP MCPLOT 970 L1412 JMP HGRPLOT 1000 ; ADRESSE BERECHNEN 1001 ; 1003 ADR2 STA XL:STX XH:STY YB:PLA:STA MODUS:PLA:STA BYTE:JSR ADRESSE 1005 LDA 53270:AND #16:BEQ L1006:JMP MCPOINT 1006 L1006 JMP HGRPOINT 1009 ; AUS PLOT-COMMAND 1010 ADRESSE LDA 53270:AND #16:BEQ L336 1015 ASL XL:ROL XH 1020 L336 LDA YB:AND #248:LSR A:LSR A:TAY 1025 LDA XL:AND #248:CLC:ADC TAB320,Y:STA ZP1:LDA YB:AND #7:ORA ZP1:STA ZP1 1030 PHP:LDA 56576:AND #3:EOR #3:CLC:ROR:ROR:ROR:ORA #32:PLP 1035 ADC XH:ADC TAB320+1,Y:STA ZP2 1040 LDA 53270:AND #16:BEQ L1350:LSR XH:ROR XL 1045 L1350 RTS 1100 ; *** BYTE AUS RAM HOLEN *** 1102 ; ************************** 1110 GETPEEK SEI:LDA #$34:STA 1:LDY #0:LDA (ZP1),Y:LDX #$37:STX 1:CLI:RTS 1300 ; **************** 1302 ; *** HGR-PLOT *** 1310 HGRPLOT JSR ADRESSE:LDA XL:AND #7:TAX 1320 LDY #0:LDA WERTTAB,X:STA BYTE 1370 ; ************ 1380 ; PUNKT SETZEN 1390 HGRPOINT JSR COLOUR 1400 L356 JSR GETPEEK:LDY MODUS:BEQ MOD0:DEY:BEQ MOD1:DEY:BEQ MOD2:RTS 1410 MOD0 STA PEEK:LDA BYTE:EOR #255:AND PEEK:STA (ZP1),Y:RTS 1420 MOD1 ORA BYTE:STA (ZP1),Y:RTS 1430 MOD2 EOR BYTE:STA (ZP1),Y:RTS 1440 ; FARBRAM ZU PUNKT SETZEN 1450 ; *********************** 1460 COLOUR LDA ZP2:AND #31:STA ZP4:LDA ZP1 1470 LSR ZP4:ROR A:LSR ZP4:ROR A:LSR ZP4:ROR A:STA ZP3 1480 LDA 56576:AND #3:EOR #3:CLC:ROR:ROR:ROR:ORA #8:CLC:ADC ZP4:STA ZP4 1490 LDY #0:LDA MODUS:BNE L1495 1492 LDA CL0:AND #15:STA VAR:LDA (ZP3),Y:AND #240:ORA VAR:STA (ZP3),Y:RTS 1495 L1495 LDA CL1:ASL A:ASL A:ASL A:ASL A:STA VAR 1496 LDA (ZP3),Y:AND #15:ORA VAR:STA (ZP3),Y:RTS 1600 ; ****************** 1605 ; *** MULTI PLOT *** 1610 MCPLOT JSR ADRESSE:LDA XL:AND #3:TAY:LDA WERTTAB+4,Y:STA BYTE 1615 ; *** MULTICOLOR POINT SETZEN *** 1620 MCPOINT LDA BYTE:TAY:LDA MTAB,Y:STA BYTE 1625 SEI:LDX #$35:STX 1:LDY MODUS:BNE L432:;FARBE0 1630 EOR #$FF:AND (ZP1),Y:STA (ZP1),Y:JMP L444 1635 L432 DEY:BNE L436;FARBE1 1640 EOR #$FF:AND (ZP1),Y:STA PEEK 1645 LDA BYTE:AND #$55:ORA PEEK:STA (ZP1),Y:JMP L444 1650 L436 DEY:BNE L440;FARBE2 1655 EOR #$FF:AND (ZP1),Y:STA PEEK 1660 LDA BYTE:AND #$AA:ORA PEEK:STA (ZP1),Y:JMP L444 1665 L440 DEY:BNE L452;FARBE3 1670 ORA (ZP1),Y:STA (ZP1),Y:JMP L444 1685 ; *** INVERSE MC *** 1690 L452 LDX #4 1695 L458 LDA BYTE:AND INVTAB,X:BEQ L460:JSR L480 1700 L460 DEX:BNE L458:JMP L491 1705 L480 LDY #0:EOR #$FF:AND (ZP1),Y:STA PEEK 1710 LDA (ZP1),Y:AND INVTAB,X:CLC:ADC #$55:AND INVTAB,X:STA MODUS 1715 ORA PEEK:STA PEEK 1720 LDA MODUS:LSR A:LSR A:ORA MODUS:LSR A:LSR A:ORA MODUS:LSR A:LSR A 1725 ORA MODUS:AND #3:STA MODUS:JSR MCFARBE:L487 LDA #4:STA MODUS 1730 LDA PEEK:STA (ZP1),Y:RTS 1740 ; *** MCPLOT VERLASSEN *** 1745 L444 JSR MCFARBE 1750 L491 LDA #$37:STA 1:CLI:RTS 1755 ; ************************* 1760 ; *** MC FARBRAM SETZEN *** 1765 ; ************************* 1770 MCFARBE LDY MODUS:BEQ L1722:LDA ZP2:AND #31:STA ZP3+1:LDA ZP1 1775 LSR ZP3+1:ROR A:LSR ZP3+1:ROR A:LSR ZP3+1:ROR A:STA ZP3 1780 LDA 56576:AND #3:EOR #3:CLC:ROR:ROR:ROR:ORA #8:ORA ZP3+1:STA ZP3+1 1785 LDY MODUS:DEY:BEQ C1:DEY:BEQ C2:DEY:BEQ C3:LDY #0:RTS 1790 C1 LDA (ZP3),Y:AND #15:STA VAR:LDA CL1:ASL A:ASL A:ASL A:ASL A 1795 ORA VAR:STA (ZP3),Y:RTS 1800 C2 LDA CL2:AND #15:STA VAR:LDA (ZP3),Y:AND #240:ORA VAR:STA (ZP3),Y:RTS 1805 C3 LDA ZP3+1:AND #3:ORA #$D8:STA ZP3+1:LDA CL3:STA (ZP3),Y 1810 L1722 RTS 1814 ; **************** 1815 ; *** TABELLEN *** 1819 .BYTE $FF 1820 TAB320 .WORD 0,320,640,960,1280,1600,1920 1822 .WORD 2240,2560,2880,3200,3520,3840,4160 1823 .WORD 4480,4800,5120,5440,5760,6080 1824 .WORD 6400,6720,7040,7360,7680 1830 WERTTAB .BYTE 128,64,32,16,8,4,2,1 1840 MTAB .BYTE 0,3,12,15,48,51,60 1842 .BYTE 63,192,195,204,207,240,243,252,255 1850 INVTAB .BYTE 0,192,48,12,3 2000 ; LOCAL VARIABLE 2002 BYTE .BYTE 0 2003 PEEK .BYTE 0 2005 MODUS .BYTE 0 2006 XL .BYTE 0 2007 XH .BYTE 0 2008 YB .BYTE 0 2009 VAR .BYTE 0 2100 .END:CLOSE1