prog8/examples/test.p8

37 lines
533 B
Plaintext
Raw Normal View History

%import textio
%import test_stack
%zeropage basicsafe
%option no_sysinit
2023-03-17 23:16:18 +00:00
; $1e4 size
main {
sub start() {
2023-03-18 10:04:51 +00:00
uword xx=4000
2023-03-18 17:25:08 +00:00
ubyte a=11
ubyte b=22
ubyte c=33
; cx16.r0 = peekw(xx+a+b+c)
; cx16.r1 = peekw(xx+a+b+c+42)
; pokew(xx+a+b+c, xx)
; pokew(xx+a+b+c+42, xx)
2023-03-18 17:25:08 +00:00
if a and a & $40 == 0
cx16.r0++
2023-03-17 23:16:18 +00:00
; if cx16.r0L in "derp" {
; xx++
; }
;
; xx = xx+(3*func(xx)+xx*2*cx16.r0L)
; txt.print_uw(xx)
}
2023-03-17 23:16:18 +00:00
; sub func(uword value) -> uword {
; value ++
; return value
; }
}