Tony Firshman writes: > I keep quoting Lau's brilliant superHermes documentation, but it is > worth repeating. > > The sH _asm was vast, but is mainly documentation. > He wrote giant introductions, where he had a dialogue (with himself) on > how to approach basic logic, listing out -all- his thoughts. > Brilliant. Not only does a future programmer know what he did ('cos it > is there) but what he rejected. > > Even the version number code was seamlessly integrated, but simply > un-commenting one allocation line in the middle of comment.
On a slight tangent to that, the core of my sb2htm program (which converts a S*Basic program into colour-coded, navigatable html) was based on an OCRed scan of the documentation: Thus 18.4.2 BASIC Token Values The following section defines the token values used for the internal storage of a SuperBASIC program. tkb.space $80 spaces in the listing - two bytes: token, count tkw.keyw $81 all sorts of keywords: tkw.end $8101 END tkw.for $8102 FOR tkw.if $8103 IF tkw.rep $8104 REPeat ... became ... 66 REMark The following section defines the token values used for the internal storage 67 REMark of a SuperBASIC program. 68 : 69 tb% = PEEK(pos) 70 SELect ON tb% 71 = tkb.space :REMark spaces in the listing - two bytes: token count 72 PRINT#cw; FILL$(' ', PEEK(pos + 1)); 73 : 74 = tkb.keyw : REMark all sorts of keywords: 75 tw% = PEEK(pos + 1) 76 SELect ON tw% 77 = tkw.end : PRINT#cw; 'END'; 78 = tkw.for : PRINT#cw; 'FOR'; 79 = tkw.if : PRINT#cw; 'IF'; 80 = tkw.rep : PRINT#cw; 'REPeat'; ... The first thing I tried to do was to get the program to LIST itself (without using the LIST keyword, of course). Shock and horror! It worked first time! Its a very handy piece of code as it can be used for a whole range of utilities that need to scan a S*Basic source file. I'll put it up on my website when I get round to it. Great when documentation can work like that. Per _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm