mirror of
https://github.com/rigreco/UniDisk.git
synced 2025-03-12 21:31:45 +00:00
56 lines
847 B
NASM
56 lines
847 B
NASM
* @com.wudsn.ide.asm.hardware=APPLE2
|
|
************************************
|
|
* BASIC TO FAC TO FP1 *
|
|
* X=NUMBER *
|
|
* CALL 768,X *
|
|
************************************
|
|
org $300
|
|
|
|
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 X ->FAC
|
|
|
|
** FPC to FP1 conversion (conversion not yet) **
|
|
|
|
lda FAC
|
|
dec A
|
|
sta FP1
|
|
|
|
clc
|
|
lda FAC+1
|
|
ror
|
|
;eor #$F0 ; Not Hi Byte
|
|
sta FP1+1
|
|
|
|
lda FAC+2
|
|
ror
|
|
sta FP1+2
|
|
|
|
lda FAC+3
|
|
ror
|
|
sta FP1+3
|
|
|
|
; lda #0
|
|
; sta E
|
|
|
|
lda FAC+4
|
|
ror
|
|
sta E
|
|
|
|
; lda FAC+4
|
|
; sta SIGN
|
|
|
|
;rts
|
|
brk |