Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
documentations:basic_keywords [2015/03/14 09:04] – [Lines] pulkomandy | documentations:basic_keywords [2015/03/15 07:41] (current) – pulkomandy | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== BASIC file format ====== | + | |
- | + | ====== Keyword list ====== | |
- | ===== Header ===== | + | |
- | + | ||
- | BASIC sources aren't stored in plain ASCII. To allow faster loading and parsing, they are stored in bytecode format. The file is in standard DECB format, with a single block of type 0xFF. Since internal structures use absolute addresses, it is important to keep that header to know the loading address of the BASIC program. | + | |
- | + | ||
- | ^Offset^Description^ | + | |
- | |0|File type = 0xFF| | + | |
- | |1|File size| | + | |
- | |3|Load address| | + | |
- | + | ||
- | ===== Lines ===== | + | |
- | + | ||
- | A BASIC program is a packed linked list of program lines. | + | |
- | + | ||
- | ^Offset^Description^ | + | |
- | |0|Address of next line| | + | |
- | |2|Line number in hex| | + | |
- | |4|NULL-terminated line data| | + | |
- | + | ||
- | The end of the listing is marked with a NULL next line pointer. | + | |
- | + | ||
- | The line data is a mix of tokens and ASCII characters. The tokens are used to encode all the keywords and functions, but everything else (numbers, strings, comments) is stored in ASCII. | + | |
- | ====== Keyword | + | |
^Keyword^Description^ | ^Keyword^Description^ |