aboutsummaryrefslogtreecommitdiff
path: root/asm/delay.asm
diff options
context:
space:
mode:
authorThomas Albers Raviola <thomas@thomaslabs.org>2024-11-21 15:55:03 +0100
committerThomas Albers Raviola <thomas@thomaslabs.org>2024-11-21 15:55:03 +0100
commit6d4ad089c5b758ad8af4f68bf385a26ec4e9653a (patch)
tree2fd65006b57d646b53e121aef42bba5ee5852840 /asm/delay.asm
Initial commit
Diffstat (limited to 'asm/delay.asm')
-rw-r--r--asm/delay.asm13
1 files changed, 13 insertions, 0 deletions
diff --git a/asm/delay.asm b/asm/delay.asm
new file mode 100644
index 0000000..f04f046
--- /dev/null
+++ b/asm/delay.asm
@@ -0,0 +1,13 @@
+ .module delay
+
+__delay_ms::
+ ld b, a
+1$:
+ ld hl, #400
+2$:
+ dec hl
+ ld a, h
+ or l
+ jr nz, 2$
+ djnz 1$
+ ret