prog8/examples/test.p8

47 lines
868 B
Plaintext
Raw Normal View History

2019-08-07 00:02:34 +00:00
%import c64lib
2019-08-10 12:20:42 +00:00
%import c64utils
%import c64flt
2019-08-17 23:39:48 +00:00
%zeropage basicsafe
2019-08-09 00:15:31 +00:00
2019-08-07 00:02:34 +00:00
main {
sub start() {
2019-08-17 13:28:06 +00:00
byte bb
word ww
float fl
bb=-1
c64scr.print_b(sgn(bb))
c64.CHROUT('\n')
bb=0
c64scr.print_b(sgn(bb))
c64.CHROUT('\n')
bb=1
c64scr.print_b(sgn(bb))
c64.CHROUT('\n')
c64.CHROUT('\n')
ww=-1
c64scr.print_b(sgn(ww))
c64.CHROUT('\n')
ww=0
c64scr.print_b(sgn(ww))
c64.CHROUT('\n')
ww=1
c64scr.print_b(sgn(ww))
c64.CHROUT('\n')
c64.CHROUT('\n')
fl=-1.1
c64scr.print_b(sgn(fl))
c64.CHROUT('\n')
fl=0.0
c64scr.print_b(sgn(fl))
c64.CHROUT('\n')
fl=1.0
c64scr.print_b(sgn(fl))
c64.CHROUT('\n')
c64.CHROUT('\n')
}
}