Re: Tested the expansion menory...

From: Steve Judd (sjudd_at_ffd2.com)
Date: 2001-10-16 22:28:46

Hola,

On Tue, 16 Oct 2001, MagerValp wrote:

> ?40960AND255
> 
> ?ILLEGAL QUANTITY  ERROR
> READY.

Interesting.  The reason of course is that the AND routine uses signed
integers, which I never really realized.  So this has a practical
application: computing tables involving signed numbers using BASIC.  Like,

?255 AND -10
 246

means that you can do something like

	x=int(64*cos(t)+0.5) and 255:poke t,x

to generate signed byte tables (instead of "if x<0 then x=256+x" or
whatever).

(I dunno, maybe everyone already knew this).

cu,

-S


       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail 2.1.1.