8-Bit Software

The BBC and Master Computer Public Domain Library

Back to 8BS Or Back to Disassembly


Page Last Altered:

Clear FWB

Submitted by Steve Fewell

Routine: bclear
Name: Clear FWB
Starting Address: &A570
Entry criteria: None
Exit
: Every byte in the FWB contains the value 0 (this indicates the number 0).

Description:
Sets every byte of the FWB (locations &3B to &41) to zero. This uniquely identifies the number zero.

This routine can be jumped in at address A576, in this case all bytes of the FWB are cleared, except for the Sign, Exponent and Mantissa byte 1 (the most significant byte of the mantissa).


Disassembly for the Clear FWB routine

A570 d; 100 059 64 3B STZ &3B
A572 d< 100 060 64 3C STZ &3C
A574 d= 100 061 64 3D STZ &3D
A576 d> 100 062 64 3E STZ &3E
A578 d? 100 063 64 3F STZ &3F
A57A d@ 100 064 64 40 STZ &40
A57C dA 100 065 64 41 STZ &41
A57E ` 096 60 RTS

 


 Back to 8BS
Or