Re: REM <SHIFT+L>

From: Stephen Judd (judd_at_merle.acns.nwu.edu)
Date: 1998-09-30 01:25:55

Hola Olaf, (say that five times fast!)

> > shift-M shift-N etc. list just fine; the problem only occurs with
> > shift-L, and the reason is quite interesting.
> 
> Note that on Basic 1 and 4, the listing problem occurs also with the
> last token + 1, and those tables have different sizes, not precisely 255
> bytes. On basic 4.0, $DB does the trick, on basic 1, $CB would do it.

By extension, the similar tokens on the 128 would be either $FE $27
or else $CE $0B.  I tried these, but they didn't work, so BASIC7.0
must have fixed up this problem.

> > command used with the CMD command.  And what _it_ does is call
> > $E10C, which calls $FFD2 and branches to an error if the carry is
> > set.  But send a zero to $FFD2 and he sets the carry flag on exit, 
> > causing $E10C to branch to the error routine.
> 
> Would not the above BNE :PLOOP fail after printing a 0, so that it
> falls through to the code for FOR? FFD2 usually clears the carry; off
> the top of my head there would be no reason why it would be set for
> printing a 00 byte.

Yes, exactly right.  FOR then looks for the variable, and generates
a syntax error.  I have now verified this; I must have been more deluded
than usual, earlier.

In immediate mode, TXTPTR is set to $02xx.  I tried to find a way
to trick LIST into executing FOR, but things like LISTI=1TO10:NEXT
don't work because, of course, LIST checks for succeeding arguments
(or, if you like, LIST needs to see a statement terminator, either
a colon or a 00).

Learn something new every day!

By the way, does anyone remember the little contest RUN had, embedding 
tokens into REMs to generate riddles or stories to be read by listing?
For example,

10 REM WHAT'S AN APPLECOSTA?
20 REM {C=-V}T A {INSERT CTRL-0}E

I never forgot that one :)

-Steve
-
This message was sent through the cbm-hackers mailing list.
To unsubscribe: echo unsubscribe | mail cbm-hackers-request@dot.tcm.hut.fi.

Archive generated by hypermail 2.1.1.