home *** CD-ROM | disk | FTP | other *** search
- 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
-