×   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 FWA to FWB

Submitted by Steve Fewell

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

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

Byte Description

FWA

FWB

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

The FWB now holds the same value as the FWA.

Disassembly for the Copy FWA to FWB routine

A40B . 165 046 A5 2E LDA &2E
A40D ; 133 059 85 3B STA &3B
A40F 0 165 048 A5 30 LDA &30
A411 < 133 060 85 3C STA &3C
A413 1 165 049 A5 31 LDA &31
A415 = 133 061 85 3D STA &3D
A417 2 165 050 A5 32 LDA &32
A419 > 133 062 85 3E STA &3E
A41B 3 165 051 A5 33 LDA &33
A41D ? 133 063 85 3F STA &3F
A41F 4 165 052 A5 34 LDA &34
A421 @ 133 064 85 40 STA &40
A423 5 165 053 A5 35 LDA &35
A425 A 133 065 85 41 STA &41
A427 ` 096 60 RTS

 


 Back to 8BS
Or