0 frames
Comments. Ignored by the compiler.
chars + 4 frames (chars + 3 frames if no newline)
Write STX / ETX bounded string, with start=1 and end=0 bits (10 bits per frame) to data-string (output data convention).
1 frame
Convert number n into its ASCII character (8bit). Useful for sending ASCII control characters using PRINT.
Write binary / boolean / integer / string to data-string.
Write binary to data-string.
Include raw cyclic tag {0, 1, ;} in the compiled output.
Deletes n bits from data-string. (Borrowed from ZX Spectrum BASIC).
Appends n set bits (1) to data-string, if leftmost data-bit is set.
Appends n unset bits (0) to data-string, if leftmost data-bit is set.
UNIMPLEMENTED
Assign the next bit of input data to variable v. Can only be used one at the beginning of the program. Special variable _ can be used to consume the first input bit which always has to be one to allow a CT program to get started. (Borrowed from the Python convention).
An alias for CLEAR 10, which clears the data-string frame by frame, which if all data is correctly aligned on 0 stop-bits, can allow the program to cycle as many times as needed to clear the entire data-string without triggering any further output or effects.
3 frames + graphics command frame total
CT-BASIC can produce Tektronix 401x graphical output using the following ZX Spectrum borrowed commands:
8 frames
Clear screen. Writes Tektronix 401x control sequence ESC + FF.
4 frames
Draws a line from the last pixel of the previous PLOT or DRAW using relative offsets.
2 frames
Sets the ink (foreground) colour of the line drawing pen.
- Normal (solid)
- Dotted
- Dot-dashed
- Short-dash
- Long-dash
- Defocused, normal
- Defocused, dotted
- Defocused, dot-dashed
9 frames
Plots a point at absolute coordinate x, y.
- x range: 0–1023.
- y range: 0–779.
0, 0 represents the bottom-left corner of the screen.