prog8/todo.ill
2017-12-31 16:07:52 +01:00

57 lines
1.4 KiB
Plaintext

output prg,basic
;reg_preserve off ; @todo global option off/on default off? NOT AN OPTION -> change the default to OFF
import "c64lib"
~ main {
var .float float1 = 123.456
start
c64.MOVFM(#float1)
c64.FPRINTLN()
float1++
c64.MOVFM(#float1)
c64.FPRINTLN()
float1-=1
c64.MOVFM(#float1)
c64.FPRINTLN()
float1--
c64.MOVFM(#float1)
c64.FPRINTLN()
;float1+=0.5
;c64.MOVFM(#float1)
;c64.FPRINTLN()
;float1+=2235.55
;c64.MOVFM(#float1)
;c64.FPRINTLN()
;float1-=999.55
;c64.MOVFM(#float1)
;c64.FPRINTLN()
;float1-=33333.456
;c64.MOVFM(#float1)
;c64.FPRINTLN()
return
A = $11
X = $22
Y = $33
c64scr.clear_screen !(81, 5, $04) ; @todo new syntax to specify registers to save (! = all three A,X,Y)
;c64scr.clear_screen !A (81, 5, $04) ; @todo new syntax to specify registers to save (only A)
;c64scr.clear_screen !AX (81, 5, $04)
;c64scr.clear_screen !AXY (81, 5, $04)
c64scr.print_byte_hex(1,A)
c64.CHROUT(' ')
c64scr.print_byte_hex(1,X)
c64.CHROUT(' ')
c64scr.print_byte_hex(1,Y)
c64scr.print_word_decimal(1222)
c64.CHROUT('\n')
return
}