aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-06-26 00:36:28 -0400
committerB. Watson <urchlay@slackware.uk>2024-06-26 00:36:28 -0400
commite972e632b103aecbf99486e9e901a399b641b241 (patch)
tree62486322fed28cee3224628c2d36e3e3e5596cfc
parent5ea1671fc34f2262cd11e1188f19fc2ed8da3cef (diff)
downloadbw-atari8-tools-e972e632b103aecbf99486e9e901a399b641b241.tar.gz
listbas: tweak code and doc.
-rw-r--r--listbas.c9
-rw-r--r--listbas.rst3
2 files changed, 6 insertions, 6 deletions
diff --git a/listbas.c b/listbas.c
index 2cb9dcc..a278bd7 100644
--- a/listbas.c
+++ b/listbas.c
@@ -148,7 +148,6 @@ CALLBACK(print_op) {
default: break;
}
-
if(tok > last_operator || (!(name = operators[tok])))
fprintf(outfh, "(bad op token $%02x)", tok);
else
@@ -163,11 +162,9 @@ CALLBACK(print_varname) {
for(i = vnstart, count = 0; count < tok; i++) {
if(program[i] & 0x80) count++;
}
- while(1) {
- c = program[i++];
- outchr(c & 0x7f);
- if(c & 0x80) break;
- }
+ do {
+ outchr( (c = program[i++]) & 0x7f);
+ } while (c < 0x80);
}
CALLBACK(print_text) {
diff --git a/listbas.rst b/listbas.rst
index ed6c559..3a8e746 100644
--- a/listbas.rst
+++ b/listbas.rst
@@ -62,6 +62,9 @@ NOTES
- **listbas** doesn't print a banner on startup.
+- **listbas** tells you if the program is protected, and refuses to operate
+ on variable-protected programs.
+
EXIT STATUS
===========