×   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

9DE1 '<=' operator

Submitted by Steve Fewell

Description:

Increment the Text Pointer B offset (so that the next character is the character
after the '=').

Call &9CC9 to Compare the current value with the second value and set the flags
according to which value is greater, or whether the values are equal.

If the zero flag is set then the values are equal, so set the IWA to TRUE.
Otherwise, if the carry flag is clear then the first value is less than the second,
so set the IWA to TRUE; otherwise, the first value is not less than or equal to the second,
so set the IWA to FALSE.
Exit with A = #&40 (as we are currently handling an Integer value).


Disassembly for the '<=' Operator routine

9DE1   230 027 E6 1B INC &1B
9DE3   032 201 156 20 C9 9C JSR &9CC9 Compare Values
9DE6   240 217 F0 D9 BEQ -39 --> &9DC1 Set TRUE
9DE8   144 215 90 D7 BCC -41 --> &9DC1 Set TRUE
9DEA   128 214 80 D6 BRA -42 --> &9DC2 Set FALSE

 


 Back to 8BS
Or