diff options
author | B. Watson <urchlay@slackware.uk> | 2025-02-28 22:07:50 -0500 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2025-02-28 22:07:50 -0500 |
commit | dc1b4554e386a3335376482225a39b919e3a23f8 (patch) | |
tree | 4222149273ae8bcd27f7fceaa9545b6f5eda8eeb /AMSB.txt | |
parent | 1672fa18e2b9f4b0c87256ac6143b9d0bfe7afb0 (diff) | |
download | bw-atari8-tools-dc1b4554e386a3335376482225a39b919e3a23f8.tar.gz |
AMSB.txt: WIP.
Diffstat (limited to 'AMSB.txt')
-rw-r--r-- | AMSB.txt | 34 |
1 files changed, 29 insertions, 5 deletions
@@ -13,10 +13,11 @@ to repair a damaged AMSB file) and hopefully is interesting. Enjoy! -- B. Watson <urchlay@slackware.uk> + Tokenized file format --------------------- -3-byte header: +File begins with a 3-byte header: offset | purpose -------+------------------------------------------------------- @@ -29,7 +30,7 @@ it's not, the file has either been truncated or had junk added to the end. In a LOCKed program, the program length bytes are not encrypted. After the header, the lines of code (encrypted, for LOCKed programs). -each line has a 4-byte header: +Each line has a 4-byte header: offset | purpose -------+------------------------------------------------------- @@ -51,7 +52,8 @@ they're just stored as ASCII characters, as typed. There's no "string constant follows" token like there is in Atari BASIC (well, there is, it's just a double-quote, $22. There's no length byte). Variable names are not tokenized, either, they're just stored as-is (name in ASCII, -including trailing $ for strings, etc). +including trailing $ for strings, etc). Numeric constants are just +stored as ASCII digits, just as you typed them. In fact the only things that are tokenized are BASIC keywords: commands and functions... NOT including user functions defined @@ -72,6 +74,7 @@ depends on what MEMLO was set to when the program was saved (which varies depending on what version of AMSB you have, what DOS you boot, whether or not you have the R: device driver loaded, etc etc). + LOADing Untokenized Files ------------------------- @@ -89,6 +92,7 @@ a text file without line numbers, the code gets executed in direct mode during the load (like Atari BASIC's ENTER command does). This means you could write scripts (batch files) for AMSB. + Program Length Header Mismatch ------------------------------ @@ -110,6 +114,7 @@ If the program length is correct for the actual program (so the three $00 bytes get read), but there's extra data appended to the file, AMSB will never read the extra data at all. + String Limitations ------------------ @@ -146,6 +151,7 @@ documented in the manual, either. Like the | character, you can use CHR$(0) to store a heart in a string and it will work correctly. + Differences Between Versions ---------------------------- @@ -183,8 +189,9 @@ anyway without NOTE. One other difference between versions 1 and 2: version 2 will LOAD and RUN the file D:AUTORUN.AMB at startup, if it exists. -Comment Tokenization --------------------- + +Colon Weirdness +--------------- AMSB allows comments to be started with the ! and ' characters (as well as the traditional REM). For the ! and ' variety, if they @@ -202,6 +209,21 @@ If you did put a colon: ...then there will be *two* colons in the tokenized file, and only one will be LISTed. +The ELSE keyword works the same way. In this line: + +10 IF A THEN PRINT ELSE STOP + +...there is actually a : character just before the token for ELSE. + +Even weirder: you can put as many colons in a row as you like, and +AMSB will treat it like single colon. This line of code is valid +and runs correctly: + +10 PRINT "FOO"::::::PRINT "BAR" + +These colons are displayed normally in LIST output. + + Memory Usage ------------ @@ -217,6 +239,7 @@ AMSB 2 without DOS gives you 29980, but how are you gonna load or save programs without DOS? Nobody wants to use cassette, especially not people who could afford to buy the AMSB II cartridge. + LOCKed Programs --------------- @@ -248,6 +271,7 @@ POKE 168,0 Now AMSB won't consider the program LOCKed, and you can SAVE a regular copy of it (and LIST, edit, etc). + Line Length Limit ----------------- |