2023-03-22 21:00:21 +00:00
|
|
|
%import textio
|
|
|
|
%zeropage basicsafe
|
2022-10-22 11:33:35 +00:00
|
|
|
main {
|
2023-04-09 19:08:35 +00:00
|
|
|
sub start() {
|
|
|
|
cx16.r1=0
|
|
|
|
for cx16.r0 in 0 to 10 {
|
|
|
|
cx16.r1++
|
2023-04-07 20:03:13 +00:00
|
|
|
}
|
2023-04-09 19:08:35 +00:00
|
|
|
txt.print_uw(cx16.r1)
|
2023-03-18 23:24:05 +00:00
|
|
|
}
|
2022-12-04 15:02:58 +00:00
|
|
|
}
|
2023-04-09 19:08:35 +00:00
|
|
|
|
|
|
|
;main33 {
|
|
|
|
;
|
|
|
|
; sub calc(ubyte x, ubyte y) -> uword {
|
|
|
|
; %ir {{
|
|
|
|
; loadcpu.b r42,A
|
|
|
|
; loadcpu.w r42,XY
|
|
|
|
; }}
|
|
|
|
; repeat x+y {
|
|
|
|
; x++
|
|
|
|
; }
|
|
|
|
; when x {
|
|
|
|
; 1 -> y++
|
|
|
|
; 3 -> y++
|
|
|
|
; else -> y++
|
|
|
|
; }
|
|
|
|
; y--
|
|
|
|
; return x as uword * y
|
|
|
|
; }
|
|
|
|
; sub start() {
|
|
|
|
; txt.print_uw(calc(22, 33))
|
|
|
|
; }
|
|
|
|
;}
|