aboutsummaryrefslogtreecommitdiff
path: root/dla.s
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2022-10-25 02:43:44 -0400
committerB. Watson <urchlay@slackware.uk>2022-10-25 02:43:44 -0400
commit8088993af2f38f33a134f15f50e80a3a56115006 (patch)
tree909230bb86b3a40ab43096c693a969ea441fadb5 /dla.s
parentf1c630523239c550dc920eb14ab4652da7ca4343 (diff)
downloaddla-asm-8088993af2f38f33a134f15f50e80a3a56115006.tar.gz
Cleanup FR1
Diffstat (limited to 'dla.s')
-rw-r--r--dla.s11
1 files changed, 4 insertions, 7 deletions
diff --git a/dla.s b/dla.s
index 94cd4f1..691387f 100644
--- a/dla.s
+++ b/dla.s
@@ -274,20 +274,17 @@ menuloop:
; floating point constants:
; 3600.0 is $41,$36,$00,$00,$00,$00
; 3000.0 is $41,$30,$00,$00,$00,$00
+ ldx #FR1
+ jsr ZF1
lda #$41 ; excess-64 base-100 exponent and sign (bit 7 = 0 means positive)
sta FR1
- ldx #$36 ; NTSC
+ ldx #$36 ; 1st mantissa BCD byte, NTSC
lda PAL
and #$0e
bne ntsc
- ldx #$30 ; PAL
+ ldx #$30 ; 1st mantissa BCD byte, PAL
ntsc:
stx FR1+1
- lda #0
- sta FR1+2
- sta FR1+3
- sta FR1+4
- sta FR1+5
jsr FDIV ; FR0 = FR0 / FR1
jsr FASC ; render as ASCII