diff options
author | Juan J. Martinez <jjm@usebox.net> | 2020-12-30 19:07:31 +0000 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2020-12-30 19:23:41 +0000 |
commit | 2682bc5d1d864341aaeb42a449db73c3ecd16d70 (patch) | |
tree | 9116764364b4ee0ce7f6037305077807b57776de /src/ubox/ubox_wait.z80 | |
download | ubox-msx-lib-2682bc5d1d864341aaeb42a449db73c3ecd16d70.tar.gz ubox-msx-lib-2682bc5d1d864341aaeb42a449db73c3ecd16d70.zip |
Initial import1.0
Diffstat (limited to 'src/ubox/ubox_wait.z80')
-rw-r--r-- | src/ubox/ubox_wait.z80 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/ubox/ubox_wait.z80 b/src/ubox/ubox_wait.z80 new file mode 100644 index 0000000..49fd0be --- /dev/null +++ b/src/ubox/ubox_wait.z80 @@ -0,0 +1,23 @@ +.globl _ubox_wait +.globl ubox_isr_wait_ticks +.globl ubox_isr_wait_tick + +_ubox_wait:: + ld hl, #ubox_isr_wait_tick + ld a, (ubox_isr_wait_ticks) + ld c, a + +wait_loop: + ld a, (hl) + cp c + jr nc, wait_done + halt + jr wait_loop + +wait_done: + xor a + di + ld (hl), a + ei + ret + |