
 1000  *---------------------------------
 1010  *      SAMPLE PLOTTING PROGRAM
 1020  *---------------------------------
 1030  AS.LASTCLR .EQ $1C
 1040  *---------------------------------
 1050  AS.HGR2    .EQ $F3D8 SET UP HI-RES PAGE 2
 1060  AS.HCLR    .EQ $F3F2 CLEAR HI-RES SCREEN
 1070  AS.BKGND   .EQ $F3F6 CLEAR HI-RES SCREEN TO LAST COLOR
 1080  AS.HPOSN   .EQ $F411 MOVE CURSOR TO (Y,X),(A)
 1090  AS.HPLOT   .EQ $F457 PLOT A DOT AT (Y,X),(A)
 1100  AS.HLIN    .EQ $F53A DRAW A LINE FROM LAST POINT TO (X,A),(Y)
 1110  AS.SETHCOL .EQ $F6EC SET HI-RES COLOR
 1120  MON.TEXT   .EQ $FB2F
 1130  *---------------------------------
 1140  HI.RES.DEMO
 1150         JSR AS.HGR2
 1160         LDX #0       FOR COLOR = 0 TO 7
 1170  .1     STX COLOR
 1180         JSR AS.SETHCOL
 1190         STA AS.LASTCLR
 1200         JSR AS.BKGND   CLEAR SCREEN TO SOLID COLOR
 1210         LDA COLOR
 1220         EOR #7       COMPLEMENTARY COLOR
 1230         TAX
 1240         JSR AS.SETHCOL
 1250         JSR DRAW.SQUARE
 1260         LDX COLOR      NEXT COLOR
 1270         INX
 1280         CPX #8
 1290         BCC .1
 1300         JSR MON.TEXT
 1310         RTS
 1320  *---------------------------------
 1330  DRAW.SQUARE
 1340         LDA #10      FOR SIZE=10 TO 190 STEP 10
 1350  .1     STA SIZE
 1360         LSR          SIZE/2
 1370         STA SIZE2
 1380         LDA #0
 1390         STA XSTART+1
 1400         STA XSTOP+1
 1410         SEC          XSTART=140-SIZE/2
 1420         LDA #140
 1430         SBC SIZE2
 1440         STA XSTART
 1450         CLC          XSTOP=XSTART+SIZE
 1460         ADC SIZE
 1470         STA XSTOP
 1480         SEC
 1490         LDA #95      YSTART=95-SIZE/2
 1500         SBC SIZE2
 1510         STA YSTART
 1520         CLC          YSTOP=YSTART+SIZE
 1530         ADC SIZE
 1540         STA YSTOP
 1550         LDY XSTART+1 HPLOT XSTART,YSTART
 1560         LDX XSTART
 1570         LDA YSTART
 1580         JSR AS.HPLOT
 1590         LDX XSTOP+1    TO XSTOP,YSTART
 1600         LDA XSTOP
 1610         LDY YSTART
 1620         JSR AS.HLIN
 1630         LDX XSTOP+1    TO XSTOP,YSTOP
 1640         LDA XSTOP
 1650         LDY YSTOP
 1660         JSR AS.HLIN
 1670         LDX XSTART+1   TO XSTART,YSTOP
 1680         LDA XSTART
 1690         LDY YSTOP
 1700         JSR AS.HLIN
 1710         LDX XSTART+1   TO XSTART,YSTART
 1720         LDA XSTART
 1730         LDY YSTART
 1740         JSR AS.HLIN
 1750         CLC
 1760         LDA SIZE     NEXT SIZE
 1770         ADC #10
 1780         CMP #191
 1790         BCC .1
 1800  DELAY.LOOP
 1810         LDY #0       DELAY LOOP SO WE CAN SEE IT
 1820  .1     LDX #0
 1830  .2     DEX
 1840         BNE .2
 1850         LDA $C030    AND HEAR IT
 1860         DEY
 1870         BNE .1
 1880         RTS
 1890  *---------------------------------
 1900  COLOR  .BS 1
 1910  SIZE   .BS 1
 1920  SIZE2  .BS 1
 1930  XSTART .BS 2
 1940  YSTART .BS 1
 1950  XSTOP  .BS 2
 1960  YSTOP  .BS 1

