2020-03-24 23:32:54 +00:00
|
|
|
%import c64lib
|
2020-03-14 23:47:21 +00:00
|
|
|
%import c64utils
|
2020-04-08 22:12:50 +00:00
|
|
|
%import c64flt
|
2020-04-03 20:44:10 +00:00
|
|
|
%zeropage basicsafe
|
2019-08-09 00:15:31 +00:00
|
|
|
|
2020-03-24 18:37:54 +00:00
|
|
|
|
2020-06-14 00:39:48 +00:00
|
|
|
|
2020-03-24 23:32:54 +00:00
|
|
|
main {
|
2020-06-03 23:43:37 +00:00
|
|
|
|
2020-06-14 00:39:48 +00:00
|
|
|
sub start() {
|
2020-06-17 19:41:38 +00:00
|
|
|
float[] fa=[1.1111,2.2222,3.3333,4.4444]
|
|
|
|
ubyte[] uba = [1,2,3,4]
|
|
|
|
word[] uwa = [1111,2222,3333,4444]
|
|
|
|
ubyte ii = 1
|
|
|
|
ubyte jj = 3
|
|
|
|
|
|
|
|
float f1 = 1.123456
|
|
|
|
float f2 = 2.223344
|
|
|
|
|
|
|
|
swap(f1, f2)
|
|
|
|
|
|
|
|
swap(fa[0], fa[1])
|
|
|
|
swap(uba[0], uba[1])
|
|
|
|
swap(uwa[0], uwa[1])
|
|
|
|
|
|
|
|
ubyte i1
|
|
|
|
ubyte i2
|
|
|
|
swap(fa[i1], fa[i2])
|
|
|
|
swap(uba[i1], uba[i2])
|
|
|
|
swap(uwa[i1], uwa[i2])
|
|
|
|
|
|
|
|
c64flt.print_f(f1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
c64flt.print_f(f2)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
swap(f1,f2)
|
|
|
|
c64flt.print_f(f1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
c64flt.print_f(f2)
|
|
|
|
c64.CHROUT('\n')
|
2020-03-13 01:05:15 +00:00
|
|
|
}
|
2020-06-14 00:39:48 +00:00
|
|
|
|
2020-03-21 17:39:36 +00:00
|
|
|
}
|
2020-03-24 21:02:50 +00:00
|
|
|
|
2020-03-24 23:32:54 +00:00
|
|
|
|