This repository has been archived by the owner on May 21, 2024. It is now read-only.
forked from boriel-basic/zxbasic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request boriel-basic#612 from boriel/bugfix/O3_optimizer_a…
…nd_peek Bugfix/o3 optimizer and peek
- Loading branch information
Showing
3 changed files
with
66 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
org 32768 | ||
.core.__START_PROGRAM: | ||
di | ||
push ix | ||
push iy | ||
exx | ||
push hl | ||
exx | ||
ld hl, 0 | ||
add hl, sp | ||
ld (.core.__CALL_BACK__), hl | ||
ei | ||
jp .core.__MAIN_PROGRAM__ | ||
.core.__CALL_BACK__: | ||
DEFW 0 | ||
.core.ZXBASIC_USER_DATA: | ||
; Defines USER DATA Length in bytes | ||
.core.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_END - .core.ZXBASIC_USER_DATA | ||
.core.__LABEL__.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_LEN | ||
.core.__LABEL__.ZXBASIC_USER_DATA EQU .core.ZXBASIC_USER_DATA | ||
_dataSprite: | ||
DEFB 00, 00 | ||
.core.ZXBASIC_USER_DATA_END: | ||
.core.__MAIN_PROGRAM__: | ||
ld hl, (_dataSprite) | ||
ld de, 26 | ||
add hl, de | ||
push hl | ||
ld hl, (_dataSprite) | ||
add hl, de | ||
ld a, (hl) | ||
ld hl, (24328 - 1) | ||
add a, h | ||
pop hl | ||
ld (hl), a | ||
ld bc, 0 | ||
.core.__END_PROGRAM: | ||
di | ||
ld hl, (.core.__CALL_BACK__) | ||
ld sp, hl | ||
exx | ||
pop hl | ||
pop iy | ||
pop ix | ||
exx | ||
ei | ||
ret | ||
;; --- end of user code --- | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#define spriteStatus (dataSprite) | ||
#define spriteTimer (dataSprite+26) | ||
|
||
dim d1 as ubyte | ||
dim dataSprite as Uinteger | ||
|
||
const variablesGlobales as UInteger= 24326 | ||
const tictac as UInteger= (variablesGlobales+2) | ||
|
||
poke spriteTimer,peek(spriteTimer)+peek(tictac) | ||
d1=peek(spriteTimer)+peek (tictac) |