prog8/examples/test.p8

29 lines
512 B
Plaintext
Raw Normal View History

%zeropage basicsafe
%option enable_floats
%import c64flt
2019-03-29 01:13:28 +00:00
~ main {
float[] fa = [1.1,2.2,3.3]
ubyte[] uba = [10,2,3,4]
byte[] ba = [-10,2,3,4]
uword[] uwa = [100,20,30,40]
word[] wa = [-100,20,30,40]
2019-02-21 00:31:33 +00:00
sub start() {
2019-04-04 19:02:24 +00:00
float a
a=avg([1,2,3,4])
c64flt.print_f(a)
c64.CHROUT('\n')
a=avg([100,200,300,400])
c64flt.print_f(a)
c64.CHROUT('\n')
a=avg([1.1,2.2,3.3,4.4])
c64flt.print_f(a)
c64.CHROUT('\n')
2019-04-20 11:24:42 +00:00
}
}