diff options
| author | B. Watson <urchlay@slackware.uk> | 2025-02-25 21:31:11 -0500 | 
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2025-02-25 21:31:11 -0500 | 
| commit | d0c008b68a7e2a12308a888e918d7467998260a9 (patch) | |
| tree | e780d6077e0725f5f8d309a11ac6d39d761f7cec | |
| parent | 9a96d6a2b17079f0666401a88bf999f9c3a6a5f1 (diff) | |
| download | bw-atari8-tools-d0c008b68a7e2a12308a888e918d7467998260a9.tar.gz | |
listamsb: tweak a warning, expand DIAGNOSTICS in man page.
| -rw-r--r-- | listamsb.1 | 20 | ||||
| -rw-r--r-- | listamsb.c | 2 | ||||
| -rw-r--r-- | listamsb.rst | 20 | 
3 files changed, 37 insertions, 5 deletions
@@ -84,10 +84,26 @@ BASIC file.  .INDENT 0.0  .IP \(bu 2  not an AMSB file: first byte not $00 +.sp +Pretty self\-explanatory: if the file doesn\(aqt begin with a \fI$00\fP byte, +it\(aqs not a tokenized AMSB file.  .IP \(bu 2  not an AMSB file: too big (\fIN\fP bytes), won\(aqt fit in Atari memory +.sp +The file can\(aqt be a tokenized AMSB file because there was no way +for it to be created. It must be some other kind of file that begins +with a \fI$00\fP byte.  .IP \(bu 2  not an AMSB file: program size too small (\fIN\fP). Atari BASIC file? +.sp +The program header claims the file is 0, 1, 3, or 4 bytes long. This +is impossible, so this isn\(aqt an AMSB file. A lot of Atari BASIC +programs begin with three \fI$00\fP bytes, so that might be what this is. +.IP \(bu 2 +program length is 2, no code in file (SAVE after NEW) +.sp +Probably, someone did a SAVE when there was no program in memory. It +could also mean this isn\(aqt an AMSB file at all.  .UNINDENT  .SS Warnings  .sp @@ -109,11 +125,11 @@ line number out range  The program contains a line number that\(aqs greater than \fI63999\fP\&. How  did that happen?  .IP \(bu 2 -line \fIN\fP has character \fIC\fP outside of a string, maybe not an AMSB file? +line \fIN\fP has character \fIC\fP outside of a string. maybe Atari BASIC?  .sp  This happens when ATASCII codes 0 to 31 (\fI$1f\fP) appear in the program.  AMSB can create files like this, but at runtime, it\(aqs a syntax error. -It could also mean it\(aqs not really an AMSB file. +More likely, it means this is an Atari BASIC file.  .IP \(bu 2  actual program size doesn\(aqt match program size in header  .sp @@ -206,7 +206,7 @@ int next_line(void) {  			if(byte < 0x20) {  				/* ATASCII graphics outside of a string */  				fprintf(stderr, "%s: line %d has character %d outside of a string, " -						"maybe not an AMSB file?\n", +						"maybe Atari BASIC?\n",  						self, lineno, byte);  				warnings++;  			} diff --git a/listamsb.rst b/listamsb.rst index ad0c897..acf3718 100644 --- a/listamsb.rst +++ b/listamsb.rst @@ -69,10 +69,26 @@ BASIC file.  - not an AMSB file: first byte not $00 +  Pretty self-explanatory: if the file doesn't begin with a *$00* byte, +  it's not a tokenized AMSB file. +  - not an AMSB file: too big (*N* bytes), won't fit in Atari memory +  The file can't be a tokenized AMSB file because there was no way +  for it to be created. It must be some other kind of file that begins +  with a *$00* byte. +  - not an AMSB file: program size too small (*N*). Atari BASIC file? +  The program header claims the file is 0, 1, 3, or 4 bytes long. This +  is impossible, so this isn't an AMSB file. A lot of Atari BASIC +  programs begin with three *$00* bytes, so that might be what this is. + +- program length is 2, no code in file (SAVE after NEW) + +  Probably, someone did a SAVE when there was no program in memory. It +  could also mean this isn't an AMSB file at all. +  Warnings  -------- @@ -93,11 +109,11 @@ continues processing.    The program contains a line number that's greater than *63999*. How    did that happen? -- line *N* has character *C* outside of a string, maybe not an AMSB file? +- line *N* has character *C* outside of a string. maybe Atari BASIC?    This happens when ATASCII codes 0 to 31 (*$1f*\) appear in the program.    AMSB can create files like this, but at runtime, it's a syntax error. -  It could also mean it's not really an AMSB file. +  More likely, it means this is an Atari BASIC file.  - actual program size doesn't match program size in header  | 
