prog8/examples/test.p8

63 lines
1.3 KiB
Plaintext
Raw Normal View History

2021-10-30 13:15:11 +00:00
%import textio
2021-10-31 15:50:15 +00:00
%zeropage dontuse
2021-10-27 21:48:02 +00:00
2021-10-30 13:15:11 +00:00
main {
sub start() {
const ubyte TEST = 10
ubyte y1
y1 = TEST + 1 as byte
}
}
mainzzzzzz {
2021-10-30 21:15:18 +00:00
ubyte globalvar1
ubyte globalvar2 = 99
sub start() {
2021-10-30 13:15:11 +00:00
uword xx0
ubyte xx = 100
uword qq =$1234+xx
2021-10-31 15:50:15 +00:00
uword ww
ww=$1234+xx
2021-10-30 21:15:18 +00:00
2021-10-31 15:50:15 +00:00
; ubyte cv
; sys.memset($1000+xx, 10, 255) ; TODO uses stack eval now to precalc parameters
;xx = xx & %0001 ; doesn't use stack... because it uses AugmentableAssignmentAsmGen
;yy = xx & %0001 ; doesn't use stack... because it uses AugmentableAssignmentAsmGen
ubyte yy = xx & %0001 ; TODO uses stack eval....
2021-10-31 15:50:15 +00:00
; if xx & %0001 { ; TODO why does this use stack? because it uses asmgen.assignExpressionToRegister eventually line 253 in AssignmentAsmGen no augmentable-assignment.
; xx--
; }
2021-10-30 21:15:18 +00:00
; if xx+1 { ; TODO why does this use stack? see above
; xx++
; }
;
; if xx { ; doesn't use stack...
; xx++
; }
;
; xx = xx+1 ; doesn't use stack...
;
; if 8<xx {
; }
;
; do {
; xx++
; } until xx+1
;
; while xx+1 {
; xx++
; }
2021-10-27 21:48:02 +00:00
}
}