2017-12-30 12:34:52 +00:00
|
|
|
output prg,basic
|
2017-12-30 23:48:00 +00:00
|
|
|
zp clobber, restore
|
|
|
|
|
2017-12-30 20:36:42 +00:00
|
|
|
;reg_preserve off ; @todo global option off/on default off?
|
2017-12-30 12:34:52 +00:00
|
|
|
|
2017-12-30 23:48:00 +00:00
|
|
|
import "c64lib"
|
|
|
|
|
|
|
|
~ ZP {
|
|
|
|
var .float fl1 = 3.1415927
|
|
|
|
var .float fl2 = 99.999999
|
|
|
|
var .float fl3 = 100000
|
|
|
|
}
|
|
|
|
|
2017-12-30 12:34:52 +00:00
|
|
|
|
2017-12-30 23:48:00 +00:00
|
|
|
~ main {
|
|
|
|
var .float fl1 = 3.1415927
|
|
|
|
var .float fl2 = 99.999999
|
|
|
|
var .float fl3 = 10
|
2017-12-30 12:34:52 +00:00
|
|
|
|
|
|
|
start
|
2017-12-30 23:48:00 +00:00
|
|
|
fl1 = 111111.22222
|
|
|
|
fl2 = 0
|
|
|
|
fl3 = 1
|
|
|
|
fl3 = -1
|
|
|
|
fl3 = 0.5
|
|
|
|
fl3 = -0.5
|
|
|
|
|
|
|
|
X=6
|
|
|
|
loop1
|
|
|
|
A=X
|
|
|
|
c64util.print_byte_hex(0, A)
|
|
|
|
c64.CHROUT!(" ")
|
|
|
|
X--
|
|
|
|
if_pos goto loop1
|
|
|
|
|
|
|
|
Y=6
|
|
|
|
loop2
|
|
|
|
A=Y
|
|
|
|
c64util.print_byte_hex(0, A)
|
|
|
|
c64.CHROUT!(" ")
|
|
|
|
Y--
|
|
|
|
if_neg goto stop
|
|
|
|
goto loop2
|
|
|
|
|
|
|
|
stop
|
|
|
|
|
2017-12-30 12:34:52 +00:00
|
|
|
return
|
2017-12-30 20:36:42 +00:00
|
|
|
|
2017-12-30 12:34:52 +00:00
|
|
|
}
|