Bas2Tap
This program can be used to convert an Oric BASIC program to and from TAPE binary format. Technicaly this means that instead of using the Oric BASIC line based text editor, you can edit an ORIC BASIC program entirely in a comfortable text editor, and then convert it automaticaly to a tape file format that can later be loaded on the emulator -or played on a real Oric-.
To transform a binary file as a texte file:
%OSDK%\bin\Bas2Tap [switches] source_file destination_file
-
With the -t2b switch Bas2Tap converts a binary encoded tape to text format:
-t2b tapefile textfile
-
The -b2t[0|1] switch convert a text file to binary encoded tape format
-b2t0 textfile tapefile => Generate a TAPE file that do not auto run after the loading is finished (you have to manualy use the RUN command) -b2t1 textfile tapefile => Generate a TAPE file that auto run after the loading is finished
-
The -color[0|1] switch set if the REM and ' statements should be colorized or not
By default Bas2Tap will expect the source program to contain line numbers, you can enable the extended BASIC features using one of the commands starting by the # symbol. Here is a list of what you can use:
- #labels
This command enables the mode labels with automatic generation of line numbers. You can mix and match sections of code with or without line numbers as long as the resulting merge content stays logical with line numbers increasing.
Labels have to start on the column zero, and can be followed by one or two colon-separated values, one giving the new reference line number and the other being the increment. The § symbol can be used to get the current line number.
my_label PRINT"The current line number is ";§ anotherLabel:+5 PRINT"Now lines are increasing by multiple of 5" farLabel:32000 PRINT"We are now at line 32000" GOTO my_label
- #optimize
This parameter removes all white spaces and comments to the exported binary file. This makes debugging much harder, but it also can reduce a typical program size by a few kilobytes easily.
- #define name value
Just defines a symbol and gives it a value. Please note that the name can't contain any Oric BASIC instruction name, so things like "CONTAINER" (contains CONT) or "DEEPPIT" (contains PI) are not allowed (but "Container" and "DeepPit" should be fine)
#define Cross 1 #define Circle 2 A=Cross:B=Circle
- ~
The tilde character must be followed by a letter in either upper or lower case. Upper case ones will be exported as the equivalent of CHR$(27)+letter (so can be used to insert attributes, color changes, etc...) while lower case ones will be exported as one byte control code, such as carriage return and cursor down.
PRINT@15,11;"~N~CLOADING" PRINT@15,12;"~N~ALOADING" I$=I$+"a plastic bag~m~j"
No known problem - please signal any issue on the Cross development tools forum.
comments powered by Disqus