aboutsummaryrefslogtreecommitdiff
path: root/example.asm
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-05-06 20:55:48 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-05-06 20:55:48 +0100
commit8acb7f4433fdad75f7673a9a06a228aa46ba73c7 (patch)
tree857518b606b2cc66fc2da544a4d7264c421103b1 /example.asm
parent627e526d0a4631f6a65ca18ee6fdad5e0c51e24a (diff)
downloadtr8vm-8acb7f4433fdad75f7673a9a06a228aa46ba73c7.tar.gz
tr8vm-8acb7f4433fdad75f7673a9a06a228aa46ba73c7.zip
Save 2 instructions
Diffstat (limited to 'example.asm')
-rw-r--r--example.asm12
1 files changed, 4 insertions, 8 deletions
diff --git a/example.asm b/example.asm
index 6714543..992823f 100644
--- a/example.asm
+++ b/example.asm
@@ -29,10 +29,8 @@ loop:
ld a, >incx
ld x, <incx
ld y, [a : x]
- inc x
- bo
- inc a
- ; px
+ ld a, >px
+ ld x, <px
ld b, [a : x]
; px + incx
add b, y
@@ -54,10 +52,8 @@ update_y:
ld a, >incy
ld x, <incy
ld y, [a : x]
- inc x
- bo
- inc a
- ; py
+ ld a, >py
+ ld x, <py
ld b, [a : x]
; py + incy
add b, y