Skip to content

mgr-inz-rafal/tubac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Tubac

ATARI Turbo Basic Compiler by mgr_inz_rafal.

License

This project is licensed under "THE BEER-WARE LICENSE" (Revision 42).

rchabowski@gmail.com wrote this project. As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.

Yours, mgr inż. Rafał

Scope

This project aims to provide a tool that helps transfer the ATARI Turbo Basic listings into binary code that can be executed directly on the 6502 processor.

Alt text

Supported commands

In addition to the commands listed below compiler fully supports:

  • Arithmetic expressions with parenthesis
  • Integer arrays (single and double dimension)
  • Strings (assignment and comparison with different kind of indexing)

Atari Basic

Command Status Comment
ABS #f03c15
AND #00ff00
ASC #f03c15
ATN #f03c15
BYE #000000 It makes no sense in compiled program.
CLOAD #000000 Compiled program will not allow loading from cassettes without OS.
CHR$ #f03c15
CLOG #f03c15
CLOSE #f03c15
CLR #f03c15
COLOR #f03c15
COM #00ff00
CONT #f03c15
COS #f03c15
CSAVE #000000 Compiled program will not allow saving to cassettes without OS.
DATA #f03c15
DEG #f03c15
DIM #00ff00
DOS #000000 Compiled program will not exit to DOS.
DRAWTO #f03c15
END #00ff00
ENTER #f03c15
EXP #f03c15
FOR #00ff00
GET #f03c15
GOSUB #00ff00
GOTO #00ff00 Only direct jumps to line numbers. GOTO A+8 is not (and will not be) supported. I did it once in the past, just for fun, but it didn't bring any value besides slowing the jumps down tremendously.
GO TO #00ff00 ditto
GRAPHICS #f03c15
IF...THEN #00ff00
INPUT #1589F0 Integers (non-indexed) and strings supported, but only for default I/O channel
INT #f03c15
LEN #00ff00
LET #00ff00
LIST #000000 It doesn't make sense to list compiled program.
LOAD #f03c15
LOCATE #f03c15
LOG #f03c15
LPRINT #f03c15
NEW #000000 Not gonna happen.
NEXT #00ff00
NOT #00ff00
NOTE #f03c15
ON...GOTO #f03c15
ON...GOSUB #f03c15
OPEN #f03c15
OR #00ff00
PADDLE #f03c15
PEEK #00ff00
PLOT #f03c15
POINT #f03c15
POKE #00ff00
POP #f03c15
POSITION #f03c15
PRINT #1589F0 Integers and strings supported, but only for default I/O channel
PTRIG #f03c15
PUT #f03c15
RAD #f03c15
READ #f03c15
REM #f03c15
RESTORE #f03c15
RETURN #00ff00
RND #00ff00
RUN #000000 Nope.
SAVE #f03c15
SETCOLOR #f03c15
SGN #f03c15
SIN #f03c15
SOUND #00ff00 Seems to be producing incorrect sounds... Need to investigate more.
SQR #f03c15
STATUS #f03c15
STEP #00ff00
STICK #00ff00
STRIG #00ff00
STOP #f03c15
STR$ #f03c15
TRAP #f03c15
USR #f03c15
VAL #f03c15
XIO #f03c15

Turbo Basic XL

Command Status Comment
BLOAD #f03c15
BRUN #000000
DELETE #000000
DIR #000000
RENAME #000000
LOCK #000000
UNLOCK #000000
DPOKE #00ff00
DPEEK #00ff00
MOVE #f03c15
-MOVE #f03c15
%PUT #f03c15
%GET #f03c15
CLS #f03c15
PAUSE #f03c15
RENUM #000000 No line numbers - no renumeration.
DEL #f03c15
DUMP #f03c15
TRACE #f03c15
INPUT #f03c15
DSOUND #f03c15
# (line labels) #f03c15
GO# #f03c15
ON...EXEC #f03c15
ON...GO# #f03c15
RAND #f03c15
TIME #f03c15
TIME$ #f03c15
INKEY$ #f03c15
INSTR #f03c15
UINSTR #f03c15
ERR #000000
ERL #000000
REPEAT...UNTIL #00ff00
WHILE...WEND #00ff00
DO...LOOP #00ff00
IF...ELSE...ENDIF #00ff00
PROC...ENDPROC #00ff00
EXEC #00ff00
CIRCLE #f03c15
FCOLOR #f03c15
FILLTO #f03c15
PAINT #f03c15
TEXT #f03c15
HEX$ #f03c15
DEC #f03c15
DIV #f03c15
MOD #f03c15
FRAC #f03c15
TRUNC #f03c15
& #00ff00
! #00ff00
EXOR #00ff00
%0 - %3 (constants) #f03c15

Extension

  • Support for EXEC in the middle of the line
  • Lines are not limited in length

About

Turbo Basic Compiler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages