As always, the keyboard won't work until you press the CTRL key once.
Use the LOAD command to cycle through available programs, or LOAD "$" to get a directory.
Star Trek is a port of a very old BASIC strategy game. adapted for a 32-column screen and color. Warp factor 1 should take you to the next quadrant, and fractional warp factors will take you to other sectors in the quadrant. Use phasers to attack without aiming. Use torpedoes to destroy ships if you have line-of-sight. Fractional course settings are allowed too. And I forget how docking at starbases works.
The previous ELIZA and 10 PRINT demos are there also.
Views: 1561 - Submitted: 2 years ago - Programs forked from this
SET a, bsets a to b
ADD a, bsets a to a+b, sets O to 0x0001 if there's an overflow, 0x0 otherwise
SUB a, bsets a to a-b, sets O to 0xffff if there's an underflow, 0x0 otherwise
MUL a, bsets a to a*b, sets O to ((a*b)>>16)&0xffff
DIV a, bsets a to a/b, sets O to ((a<<16)/b)&0xffff. if b==0, sets a and O to 0 instead.
MOD a, bsets a to a%b. if b==0, sets a to 0 instead.
SHL a, bsets a to a<>b)&0xffff
SHR a, bsets a to a>>b, sets O to ((a<<16)>>b)&0xffff
AND a, bsets a to a&b
BOR a, bsets a to a|b
XOR a, bsets a to a^b
IFE a, bperforms next instruction only if a==b
IFN a, bperforms next instruction only if a!=b
IFG a, bperforms next instruction only if a>b
IFB a, bperforms next instruction only if (a&b)!=0
JSR apushes the address of the next instruction to the stack, then sets PC to a
BRKstops execution (non-standard)
POP / [SP++]
PEEK / [SP]
PUSH / [--SP]