prog8/examples/test.p8

50 lines
1.1 KiB
Plaintext
Raw Normal View History

2020-09-19 20:10:33 +00:00
;%import c64lib
;%import c64graphics
2020-09-19 21:00:47 +00:00
;%import c64textio
2020-09-19 20:10:33 +00:00
;%import c64flt
;%option enable_floats
%target cx16
%import cx16textio
2020-09-16 21:04:18 +00:00
%zeropage basicsafe
2020-08-27 17:47:50 +00:00
main {
2020-09-16 21:04:18 +00:00
sub start() {
2020-09-19 14:54:52 +00:00
2020-09-19 22:17:33 +00:00
const uword cvalue = 155
const uword cvalue2 = 5555
uword wvalue = 155
uword wvalue2 = 5555
; TODO ALL multiplications below should yield a word result
uword x
ubyte bb = 9
x = bb * cvalue ; TODO wrong result, must be word
txt.print_uw(x)
2020-09-19 21:00:47 +00:00
txt.chrout('\n')
2020-09-19 22:17:33 +00:00
x = bb * cvalue2
txt.print_uw(x)
txt.chrout('\n')
x = bb * wvalue
txt.print_uw(x)
txt.chrout('\n')
x = bb * wvalue2
txt.print_uw(x)
2020-09-19 21:00:47 +00:00
txt.chrout('\n')
2020-09-19 14:54:52 +00:00
2020-09-19 22:17:33 +00:00
x = cvalue * bb ; TODO wrong result, must be word
txt.print_uw(x)
txt.chrout('\n')
x = cvalue2 * bb
txt.print_uw(x)
txt.chrout('\n')
x = wvalue * bb
txt.print_uw(x)
txt.chrout('\n')
x = wvalue2 * bb
txt.print_uw(x)
txt.chrout('\n')
2020-09-16 21:04:18 +00:00
}
2020-08-27 17:47:50 +00:00
}