prog8/examples/testprints.p8

74 lines
1.6 KiB
Plaintext
Raw Normal View History

2019-09-22 23:58:01 +00:00
%zeropage basicsafe
main {
sub start() {
c64scr.print("print uw0:")
c64scr.print_uw0(53204)
c64.CHROUT(' ')
c64scr.print_uw0(3204)
c64.CHROUT(' ')
c64scr.print_uw0(204)
c64.CHROUT(' ')
c64scr.print_uw0(14)
c64.CHROUT(' ')
c64scr.print_uw0(4)
c64.CHROUT(' ')
c64scr.print_uw0(0)
c64.CHROUT('\n')
c64scr.print("print uw:")
c64scr.print_uw(53204)
c64.CHROUT(' ')
c64scr.print_uw(3204)
c64.CHROUT(' ')
c64scr.print_uw(204)
c64.CHROUT(' ')
c64scr.print_uw(14)
c64.CHROUT(' ')
c64scr.print_uw(4)
c64.CHROUT(' ')
c64scr.print_uw(0)
c64.CHROUT('\n')
c64scr.print("print w:")
c64scr.print_w(23204)
c64.CHROUT(' ')
c64scr.print_w(3204)
c64.CHROUT(' ')
c64scr.print_w(204)
c64.CHROUT(' ')
c64scr.print_w(14)
c64.CHROUT(' ')
c64scr.print_w(4)
c64.CHROUT(' ')
c64scr.print_w(0)
c64.CHROUT('\n')
c64scr.print_w(-23204)
c64.CHROUT(' ')
c64scr.print_w(-3204)
c64.CHROUT(' ')
c64scr.print_w(-204)
c64.CHROUT(' ')
c64scr.print_w(-14)
c64.CHROUT(' ')
c64scr.print_w(-4)
c64.CHROUT(' ')
c64scr.print_w(-0)
c64.CHROUT('\n')
2020-03-12 23:50:50 +00:00
check_eval_stack()
}
sub check_eval_stack() {
if X!=255 {
c64scr.print("stack x=")
c64scr.print_ub(X)
c64scr.print(" error!\n")
}
2019-09-22 23:58:01 +00:00
}
}