introduced graphics module wrapper for cx16 to make even more programs compatible

This commit is contained in:
Irmen de Jong 2020-09-22 02:21:16 +02:00
parent 0d5c78e875
commit aa8191d0a1

View File

@ -31,17 +31,17 @@ graphics {
sub circle(uword xcenter, ubyte ycenter, ubyte radius) {
cx16.r0 = xcenter - radius/2
cx16.r1 = ycenter - radius/2
cx16.r2 = radius
cx16.r3 = radius
cx16.GRAPH_draw_oval(false) ; TODO currently seems to crash
cx16.r2 = radius*2
cx16.r3 = radius*2
cx16.GRAPH_draw_oval(false) ; TODO currently is not implemented on cx16, does a BRK
}
sub disc(uword xcenter, ubyte ycenter, ubyte radius) {
cx16.r0 = xcenter - radius/2
cx16.r1 = ycenter - radius/2
cx16.r2 = radius
cx16.r3 = radius
cx16.GRAPH_draw_oval(true) ; TODO currently seems to crash
cx16.r2 = radius*2
cx16.r3 = radius*2
cx16.GRAPH_draw_oval(true) ; TODO currently is not implemented on cx16, does a BRK
}
sub plot(uword plotx, ubyte ploty) {