diff options
author | Daniel Harding <33dannye@gmail.com> | 2020-05-09 15:40:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-09 15:40:25 -0500 |
commit | 53bab0a246719227b1558dfce636e7d0b21d6db0 (patch) | |
tree | c314fc99467d6c65cc4f46b0848cde3746396517 /src/macros/code.asm | |
parent | 8fb0069491e06d994e4d1ce122b4758eb2c6ef5f (diff) | |
parent | 29ed945c4adce0b6bc45be3964f95393d8248390 (diff) |
Merge pull request #68 from anmart/master
they are of arbitrary length, many are 1 bit though
_Originally posted by @anmart in https://github.com/pret/poketcg/pull/68/files_
Diffstat (limited to 'src/macros/code.asm')
-rw-r--r-- | src/macros/code.asm | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/macros/code.asm b/src/macros/code.asm index 55f4b63..8921a04 100644 --- a/src/macros/code.asm +++ b/src/macros/code.asm @@ -26,6 +26,42 @@ else endc ENDM +; runs SetEventFlagValue with the next value as the flag, c as the new value +set_flag_value: MACRO + call SetStackFlagValue + db \1 +ENDM + +; runs ZeroOutEventFlag with the next value as the flag +zero_flag_value: MACRO + call ZeroStackFlagValue + db \1 +ENDM + +; a second version of the above with no real differences +zero_flag_value2: MACRO + call ZeroStackFlagValue2 + db \1 +ENDM + +; runs MaxOutEventFlag with the next value as the flag +max_flag_value: MACRO + call MaxStackFlagValue + db \1 +ENDM + +; runs GetEventFlagValue with the next value as the flag. returns value in a +get_flag_value: MACRO + call GetStackFlagValue + db \1 +ENDM + ; the rst $38 handler is a single ret instruction ; probably used for testing purposes during development debug_ret EQUS "rst $38" + +; Returns to the pointer in bc instead of where the stack was. +retbc: MACRO + push bc + ret +ENDM |