I finished porting the famous Palo Alto Tiny Basic to my CPU's assembly/System.
In the process I added some CPU instructions and corrected a few bugs.
Lion is now a home computer with a basic, a tiny one!
I aslo added sound, just 3 channels, variable frequency, duration
I added some instructions to the standard language:
operator % computes the division remainder
POS Y,X sets the printing position, X=0..63 Y=0..30
WAITK waits for a key press and returns the ascii code
RND(n) returns random number 1..n
PLOT X, Y, [mode] plots a point, mode 1 = set, mode 0 = clear, mode 2 = not
LINE X1,Y1,X2,Y2 plots a line from X1,Y1 to X2,Y2
CIRCLE X1,Y1,R plots a circle of radius R at X,Y
BEEP frequency,time,channel time=0..7 channel=0..2
CLS clear screen
SLIST lists to serial port
---------------------------------------------------------------------
MODE 0 commands
Color Y,X,Color_Code and affects the color of character at Y,X
Screen color_code Change screen color to color_code
MODE 1 commands
Fcolor 0..15 sets foreground color
Bcolor 0..15 sets background color