100 REM TEST FOR BASIC GRAPHICS COMMANDS ON COMMANDER X16
120 REM DRAWS A PICTURE. LOOK AT IT.
190:
200 SCREEN128
210 CLS
220 RECT 0,0,319,239,1      :REM WHITE BACKGROUND
230 FRAME 2,2,317,237,2     :REM RED OUTLINE
290:
300 FORI=0TO15
310 LINE 270+3*I, 5, 270+3*I, 50, I : REM COLOR VERTICAL LINES
320 LINE 270, 5+3*I, 315, 5+3*I, I  : REM COLOR HORIZONTAL LINES
340 LINE 220+3*I, 5, 265, 50-3*I, 0 : REM BLACK DIAGONAL LINES
350 LINE 220, 5+3*I, 265-3*I, 50, 0 : REM MORE BLACK DIAGONAL LINES
360 NEXT
390:
400 FORX=0TO15
410 FORY=0TO15
420 RECT 235+X*5, 55+Y*5, 239+X*5, 59+Y*5, 16*Y+X : REM COLOR BLOCKS
430 NEXT
440 NEXT
490:
500 CHAR 5,75,0,"TEXT IN GRAPHICS SCREEN, BLACK"
510 CHAR 5,90,2,"TEXT IN GRAPHICS SCREEN, RED"
520 CHAR 6,106,0,"TEXT IN GRAPHICS SCREEN, STRANGE"
530 CHAR 5,105,5,"TEXT IN GRAPHICS SCREEN, STRANGE"
540 COLOR 5
550 LOCATE 16,2
560 PRINT "GREEN PLAIN TEXT"
590:
600 LOCATE 28,2
610 PRINT "ANY KEY TO EXIT"
690:
700 REM HOPALONG FRACTAL CREDITS:
710 REM   DISCOVERED BY BARRY MARTIN, ASTON UNIVERSITY
720 REM   PRESENTED IN SCIENTIFIC AMERICAN IN 1986 BY A.K. DEWDNEY
730 REM   PARAMETERS TAKEN FROM MARTIN LANTER, LANTERSOFT
740 A=2:B=1:C=0
750 X=0:Y=0
800 XX=250+X*20:YY=170+Y*20
810 IFXX>=210ANDXX<=310ANDYY>=150ANDYY<=230THENPSETXX,YY,0
820 X2=Y-SGN(X)*SQR(ABS(B*X-C))
830 Y2=A-X:X=X2:Y=Y2
840 GETK$:IFK$=""THEN800
850 SCREEN0
860 END

