×   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

Copy FWB to FWA

Submitted by Steve Fewell

Routine: acopyb
Name: Copy FWB to FWA
Starting Address: &8349
Entry criteria: None
Exit
: Copies the value of the FWB to the FWA.

Description:
Sets every byte of the FWA to a copy to the corresponding FWB byte as follows:

Byte Description

FWB

FWA

Sign &3B   ---> &2E
Overflow 00      ---> &2F
Exponent &3C   ---> &30
Mantissa 1 &3D   ---> &31
Mantissa 2 &3E   ---> &32
Mantissa 3 &3F   ---> &33
Mantissa 4 &40   ---> &34
Mantissa 5 / Rounding &41   ---> &35

The FWA now holds the same value as the FWB.

Disassembly for the Copy FWB to FWA routine

8349 ; 165 059 A5 3B LDA &3B
834B . 133 046 85 2E STA &2E
834D d/ 100 047 64 2F STZ &2F
834F < 165 060 A5 3C LDA &3C
8351 0 133 048 85 30 STA &30
8353 = 165 061 A5 3D LDA &3D
8355 1 133 049 85 31 STA &31
8357 > 165 062 A5 3E LDA &3E
8359 2 133 050 85 32 STA &32
835B ? 165 063 A5 3F LDA &3F
835D 3 133 051 85 33 STA &33
835F @ 165 064 A5 40 LDA &40
8361 4 133 052 85 34 STA &34
8363 A 165 065 A5 41 LDA &41
8365 5 133 053 85 35 STA &35
8367 ` 096 60 RTS

 


 Back to 8BS
Or