1
0
mirror of https://github.com/KarolS/millfork.git synced 2026-04-20 18:16:35 +00:00

6809: implement * and : operators

This commit is contained in:
Karol Stasiak
2020-06-04 17:07:19 +02:00
parent b91f259971
commit 7ba01f83e3
5 changed files with 159 additions and 8 deletions
+30
View File
@@ -0,0 +1,30 @@
#if not(ARCH_6809)
#warn m6809_math module should be used only on 6809-like targets
#endif
noinline asm word __mul_u16u16u16(word register(x) x, word register(d) d) {
pshs d,x
exg d,x
lda ,s
mul
tfr d,x
ldd 1,s
mul
abx
tfr x,d
tfr b,a
ldb #0
tfr d,x
puls d
lda 1,s
mul
leax d,x
tfr x,d
leas 2,s
rts
}
noinline asm word __divmod_u16u16u16u16(word register(x) x, word register(d) d) {
}
+2
View File
@@ -4,6 +4,8 @@
#warn stdlib_6809 module should be only used on 6809-compatible targets
#endif
import m6809/m6809_math
word nmi_routine_addr @$FFFC
word reset_routine_addr @$FFFE
word irq_routine_addr @$FFF8