#!/usr/sbin/blassic ' test routine for graphic display connected to PIC 16F877A as i2c slave ' /home/graham/primitive/blassic_graphic_primitive.bas ' 1 line(x1 y1 x2 y2 color(0/1)) ' 2 rectangle (x1 y1 x2 y2 fill(0/1) color(0/1) ' 3 bar(x1 y1 x2 y2 width color(0/1) - - - fails, why? ' 4 circle(x y radius fill(0/1) color(0/1)) ' 5 text to screen (x y ASCIIasDecimal size color(0/1)) -e.g. send 65 for A ' 6 pixel (x y color(0/1)) ' 7 wipe all screen to black or white (color(0/1)) LABEL GoAgain 'clear screen to black SHELL "/home/graham/primitive/glcd_primitives 81 7 0 0 0 0 0 0" PAUSE 1000 ' write Hello SHELL "/home/graham/primitive/glcd_primitives 81 5 64 56 72 1 1 0" PAUSE 1500 SHELL "/home/graham/primitive/glcd_primitives 81 5 70 56 101 1 1 0" PAUSE 1500 SHELL "/home/graham/primitive/glcd_primitives 81 5 76 56 108 1 1 0" PAUSE 1500 SHELL "/home/graham/primitive/glcd_primitives 81 5 82 56 108 1 1 0" PAUSE 1500 SHELL "/home/graham/primitive/glcd_primitives 81 5 88 56 111 1 1 0" PAUSE 1000 ' draw an line SHELL "/home/graham/primitive/glcd_primitives 81 1 0 0 127 63 1 0" PAUSE 1000 ' draw an open rectangle SHELL "/home/graham/primitive/glcd_primitives 81 2 10 30 30 60 0 1" PAUSE 1000 ' draw an open circle SHELL "/home/graham/primitive/glcd_primitives 81 4 90 30 10 0 1 0" PAUSE 1000 ' draw a pixel just below screen centre SHELL "/home/graham/primitive/glcd_primitives 81 6 64 34 1 0 0 0" GOTO GoAgain SYSTEM