2017-12-30 12:34:52 +00:00
|
|
|
output prg,basic
|
2017-12-30 23:48:00 +00:00
|
|
|
|
2017-12-31 03:10:27 +00:00
|
|
|
;reg_preserve off ; @todo global option off/on default off? NOT AN OPTION -> change the default to OFF
|
2017-12-30 12:34:52 +00:00
|
|
|
|
2017-12-30 23:48:00 +00:00
|
|
|
import "c64lib"
|
|
|
|
|
|
|
|
~ main {
|
2017-12-31 14:50:50 +00:00
|
|
|
|
|
|
|
var .float float1 = 123.456
|
2017-12-30 12:34:52 +00:00
|
|
|
start
|
2017-12-31 14:50:50 +00:00
|
|
|
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
|
|
|
|
|
2017-12-31 02:19:06 +00:00
|
|
|
A = $11
|
|
|
|
X = $22
|
|
|
|
Y = $33
|
|
|
|
|
2017-12-31 03:10:27 +00:00
|
|
|
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)
|
2017-12-31 02:19:06 +00:00
|
|
|
;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')
|
2017-12-30 23:48:00 +00:00
|
|
|
|
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
|
|
|
}
|