×   Main Menu ALL The 8BS News Manuals (New menu) Links Worth a Look Tools Disc and Basic Webring Site Map 8BS Guestbook Old Guest Book Me The Barnsley Rovers   
8-Bit Software

The BBC and Master Computer Public Domain Library

AA93 NOT

Submitted by Steve Fewell

Description:

Call the Evaluate value routine (&96B4) which will evaluate the next value at BASIC text
pointer B location, or the expression at that location if the value begins with an open bracket ("(")
and convert the result to an Integer value (or generate a Type mismatch error if the value was a String).

Starting at the Most significant byte of the IWA (&2D), EOR (exclusive-OR) each byte of the IWA with
&FF (&2D through to &2A). This will reverse the value in the IWA.
Set A to #&40 (meaning that the current value is an Integer) and exit.


Disassembly for the NOT routine

AA93   032 180 150 20 B4 96 JSR &96B4 Get value and convert it to Integer
AA96   162 003 A2 03 LDX#&03
AA98 * 181 042 B5 2A LDA &2A,X
AA9A I 073 255 49 FF EOR#&FF
AA9C * 149 042 95 2A STA &2A,X
AA9E   202 CA DEX
AA9F   016 247 10 F7 BPL -9 --> &AA98
AAA1   128 237 80 ED BRA -19 --> &AA90 Exit with A=&40   [LDA#&40 : RTS]

 


 Back to 8BS
Or