The following machine code routine enables Basic programs to
be listed with indented FOR-NEXT loops, considerably clarifying
The example shows that a Basic program may be listed in the
normal way, and by leaving Basic via the MONITOR command and
executing the indent routine at 0C80H (EC80), an indented
listing is produced clearly showing the program structure.
The routine is fully relocatable.
The routine may be interupted using ESC, and the number of
lines displayed may be set by the LINES command as usual.
The amount of indenting may be altered by changing the entry
at 0CBBH and 0CC9H.
The routine only picks up FOR and NEXT at the beginning of
lines. Messy structures like:
170 A=0 : FOR I=1 TO 10 : PRINT "*";
180 NEXT I : PRINT
will cause problems. The purpose of the routine is to produce
good, visually structured listings to well structured programs.
The program is written for Nascom ROM Basic Version 4.7
running under Nas-Sys 1 but it should work with Nas-Sys 3 as