2019-02-02 23:14:56 +00:00
|
|
|
%zeropage basicsafe
|
2019-04-21 01:04:13 +00:00
|
|
|
%option enable_floats
|
|
|
|
%import c64flt
|
2019-03-29 01:13:28 +00:00
|
|
|
|
2019-03-19 00:22:26 +00:00
|
|
|
~ main {
|
2019-04-21 01:04:13 +00:00
|
|
|
|
|
|
|
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-03-19 00:22:26 +00:00
|
|
|
|
2019-02-21 00:31:33 +00:00
|
|
|
sub start() {
|
2019-04-04 19:02:24 +00:00
|
|
|
|
2019-04-21 01:04:13 +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
|
|
|
|
|
|
|
|
2019-04-11 22:04:15 +00:00
|
|
|
}
|
|
|
|
}
|