This commit is contained in:
Irmen de Jong 2024-09-20 17:33:00 +02:00
parent 7af8007447
commit 46b94c17d6
3 changed files with 18 additions and 5 deletions

View File

@ -119,6 +119,7 @@ asmsub FREADS24AXY (ubyte lo @ A, ubyte mid @ X, ubyte hi @ Y) clobbers(A,X,Y)
}
asmsub FREADU24AXY(ubyte lo @ A, ubyte mid @ X, ubyte hi @ Y) clobbers(A, X, Y) -> float @FAC1 {
; ---- fac1 = unsigned int24 (A/X/Y contain lo/mid/hi bytes)
%asm{{
FAC = $61
sty FAC+1

View File

@ -91,6 +91,7 @@ asmsub FREADSA (byte value @A) clobbers(A,X,Y) {
}
asmsub FREADU24AXY(ubyte lo @ A, ubyte mid @ X, ubyte hi @ Y) clobbers(A, X, Y) -> float @FAC1 {
; ---- fac1 = unsigned int24 (A/X/Y contain lo/mid/hi bytes)
%asm{{
FAC = $C3
sty FAC+1

View File

@ -1,11 +1,22 @@
%option no_sysinit
%import gfx_lores
%import floats
%import textio
%zeropage basicsafe
main {
sub start() {
gfx_lores.set_screen_mode()
gfx_lores.clear_screen(0)
gfx_lores.line(0,0,319,239,5)
cbm.SETTIM(0,0,0)
float xx = 1.234
floats.print(xx)
txt.nl()
xx= floats.time()
floats.print(xx)
txt.nl()
floats.print(floats.time())
txt.nl()
txt.print("waiting 333 jiffies... ")
sys.wait(333)
floats.print(floats.time())
txt.nl()
}
}