2021-11-05 22:25:07 +00:00
|
|
|
%import textio
|
2021-11-09 18:31:19 +00:00
|
|
|
%import floats
|
2021-11-13 11:56:59 +00:00
|
|
|
%zeropage dontuse
|
2021-10-27 21:48:02 +00:00
|
|
|
|
2021-10-30 13:15:11 +00:00
|
|
|
main {
|
2021-11-06 18:09:33 +00:00
|
|
|
|
2021-11-09 23:17:56 +00:00
|
|
|
sub start() {
|
2021-11-14 01:38:59 +00:00
|
|
|
float[] farr = [1.111,2.222,3.333,4.444,5.555,6.666]
|
2021-11-13 11:56:59 +00:00
|
|
|
float f2 = 9.999
|
2021-11-14 01:38:59 +00:00
|
|
|
ubyte xx=1
|
|
|
|
ubyte yy=2
|
2021-11-13 11:56:59 +00:00
|
|
|
|
2021-11-14 01:38:59 +00:00
|
|
|
floats.print_f(farr[3])
|
2021-11-13 11:56:59 +00:00
|
|
|
txt.nl()
|
2021-11-14 01:38:59 +00:00
|
|
|
floats.print_f(farr[xx+yy])
|
2021-11-13 11:56:59 +00:00
|
|
|
txt.nl()
|
2021-11-09 23:17:56 +00:00
|
|
|
}
|
2021-11-08 18:06:26 +00:00
|
|
|
|
|
|
|
|
2021-11-08 20:44:06 +00:00
|
|
|
; if not iteration_in_progress or not num_bytes
|
|
|
|
; return
|
2021-11-06 17:52:54 +00:00
|
|
|
|
2021-11-07 14:40:05 +00:00
|
|
|
; word xx=0
|
|
|
|
; word[] xarr = [1,2,3]
|
|
|
|
; ubyte ai
|
|
|
|
;
|
|
|
|
; if not @($c000) {
|
|
|
|
; txt.print("xx is zero\n")
|
|
|
|
; }
|
|
|
|
;
|
|
|
|
; while not xarr[ai] {
|
|
|
|
; xx ++
|
|
|
|
; }
|
|
|
|
;
|
|
|
|
; do {
|
|
|
|
; xx--
|
|
|
|
; } until not xarr[ai]
|
|
|
|
;
|
|
|
|
; if not xarr[ai] {
|
|
|
|
; txt.print("xx is zero\n")
|
|
|
|
; }
|
2021-11-06 13:47:11 +00:00
|
|
|
|
2021-11-09 18:31:19 +00:00
|
|
|
; ubyte yy=$30
|
2021-11-06 22:25:32 +00:00
|
|
|
; ubyte zz=9
|
|
|
|
; sys.memset(xx+200, yy*2, ~yy)
|
|
|
|
;
|
2021-11-09 18:31:19 +00:00
|
|
|
;
|
|
|
|
; if yy & %10000 {
|
|
|
|
; yy++
|
|
|
|
; }
|
2021-11-06 22:25:32 +00:00
|
|
|
;
|
|
|
|
; @($c030) = 10
|
|
|
|
; @(~xx) *= 2
|
|
|
|
; txt.print_ub(@($c030))
|
|
|
|
;
|
|
|
|
; float f1 = 1111.11
|
|
|
|
; float f2 = 2222.22
|
|
|
|
; float[] fa = [2222.22, 3333.33]
|
|
|
|
;
|
|
|
|
; swap(f1, fa[1])
|
|
|
|
; floats.print_f(f1)
|
|
|
|
; txt.nl()
|
|
|
|
; floats.print_f(fa[1])
|
2021-11-05 22:25:07 +00:00
|
|
|
|
2021-05-12 22:35:22 +00:00
|
|
|
}
|