I've only just starting learning vera myself, but it depends what drawing mode you're in. If you want to draw with pixels, you need to go into bitmap screen mode (mode 5, 6 or 7). I'm pretty sure there's no DRAW command in X16 BASIC (just like there isn't in vanilla C64 BASIC), so to draw an arbitrary shape you'd need to turn on individual pixels that make up the shape. Bitmap data memory organisation hasn't been explained yet in the vera 0.8 documentation so further than that I don't know, sorry.I want to draw a shape at a specific on screen cursor location.
In GWBASIC there is the DRAW command and the Locate command.
How can u do that in X16?
This is very good to know.Looking at the KERNAL jump table, PLOT is located at $FFF0.
The X register is the row, and the Y register is the column.
When calling machine language routines with SYS in BASIC, we can pre-load the registers by writing values into memory locations 780-783
780: Accumulator (A)
781: X Register
782: Y Register
783: Program Status Byte, aka Flags.
So we can call any KERNAL routine from BASIC, now that we know how to preload the registers.
POKE 781,X: this writes the column to the X register
POKE 782,Y: this writes the row to the Y register
POKE 783,0: Clear the flags. (PLOT uses the carry flag.)
SYS $FFF0: this actually jumps to the jump table entry for the KERNAL PLOT routine, which moves the cursor to an arbitrary point on the screen.
Arguably a correct statement. And it is listed in the Commodore 64 Programmer's Reference manual, although it's never really called out in the manual as a way to set the cursor location. In fact, the SYS command really should have been better explained and explored more fully in the C64 reference manual.Edit to add: this is the sort of thing that should be on an Important Memory Locations list in the programmers reference manual.