mirror of
https://github.com/rigreco/UniDisk.git
synced 2025-03-14 03:30:56 +00:00
Create BtoFAC.s
This commit is contained in:
parent
db6236961e
commit
3f25039ea8
48
FP-converter/BtoFAC.s
Normal file
48
FP-converter/BtoFAC.s
Normal file
@ -0,0 +1,48 @@
|
||||
* @com.wudsn.ide.asm.hardware=APPLE2
|
||||
************************************
|
||||
* BASIC TO FAC TO FP1 *
|
||||
* Y=NUMBER *
|
||||
* CALL 2048,Y *
|
||||
************************************
|
||||
org $800
|
||||
|
||||
CHKCOM equ $DEBE
|
||||
FRMNUM equ $DD67
|
||||
|
||||
** Woz FP Accumulator 4 Byte + 1 Byte Extra + 1 Byte SIGN**
|
||||
FP1 equ $FA ;Translate F8 --> FA
|
||||
E equ $FE ;Translate FC --> FE
|
||||
SIGN equ $EB
|
||||
|
||||
** Applesoft FP Accumulator 5 Byte + 1 Byte Sign **
|
||||
FAC equ $9D
|
||||
|
||||
***************************
|
||||
|
||||
ENTRY jsr CHKCOM
|
||||
jsr FRMNUM ;VARIABLE->FAC
|
||||
|
||||
** FP1 to FAC conversion (conversion not yet) **
|
||||
|
||||
lda FAC
|
||||
dec A
|
||||
sta FP1
|
||||
|
||||
lda FAC+1
|
||||
eor #$80
|
||||
lsr
|
||||
sta FP1+1
|
||||
|
||||
lda FAC+2
|
||||
sta FP1+2
|
||||
|
||||
lda FAC+3
|
||||
sta FP1+3
|
||||
|
||||
lda FAC+3
|
||||
sta E
|
||||
|
||||
lda FAC+4
|
||||
sta SIGN
|
||||
|
||||
brk
|
Loading…
x
Reference in New Issue
Block a user