mirror of
https://github.com/irmen/prog8.git
synced 2024-09-07 03:54:27 +00:00
Merge branch 'master' into labeledchunks
# Conflicts: # examples/test.p8
This commit is contained in:
commit
cc5fc0b892
@ -393,9 +393,10 @@ asmsub kbdbuf_clear() {
|
|||||||
asmsub mouse_config2(ubyte shape @A) clobbers (A, X, Y) {
|
asmsub mouse_config2(ubyte shape @A) clobbers (A, X, Y) {
|
||||||
; -- convenience wrapper function that handles the screen resolution for mouse_config() for you
|
; -- convenience wrapper function that handles the screen resolution for mouse_config() for you
|
||||||
%asm {{
|
%asm {{
|
||||||
|
pha ; save shape
|
||||||
sec
|
sec
|
||||||
jsr cx16.screen_mode ; set current screen mode and res in A, X, Y
|
jsr cx16.screen_mode ; set current screen mode and res in A, X, Y
|
||||||
lda #1
|
pla ; get shape back
|
||||||
jmp cx16.mouse_config
|
jmp cx16.mouse_config
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
@ -715,7 +715,8 @@ And this is a loop over the values of the array ``fibonacci_numbers``::
|
|||||||
|
|
||||||
uword number
|
uword number
|
||||||
for number in fibonacci_numbers {
|
for number in fibonacci_numbers {
|
||||||
; do something with number
|
; do something with number...
|
||||||
|
break ; break out of the loop early
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,18 +3,5 @@
|
|||||||
|
|
||||||
main {
|
main {
|
||||||
sub start() {
|
sub start() {
|
||||||
cx16.r0 = 42
|
|
||||||
goto foobar
|
|
||||||
my_label:
|
|
||||||
txt.print_uwhex(cx16.r0, true)
|
|
||||||
txt.spc()
|
|
||||||
cx16.r0--
|
|
||||||
if cx16.r0
|
|
||||||
goto my_label
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
foobar:
|
|
||||||
txt.print("yeooo\n")
|
|
||||||
goto my_label
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user