projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51fdb44
)
Optimized call_tbl a bit
author
Lukas Krickl
<lukas@krickl.dev>
Mon, 25 Nov 2024 12:44:11 +0000
(13:44 +0100)
committer
Lukas Krickl
<lukas@krickl.dev>
Mon, 25 Nov 2024 12:44:11 +0000
(13:44 +0100)
src/sys.s
patch
|
blob
|
history
diff --git
a/src/sys.s
b/src/sys.s
index 7502077488ceb21a22cf693fe76786acad8f85c5..18314b059bd86536b6e711eab94e2608ad66355f 100644
(file)
--- a/
src/sys.s
+++ b/
src/sys.s
@@
-23,18
+23,16
@@
disableinterrutpts:
; [hl]: pointer to function ptr table
; Note: do not call, just jp
call_tbl:
-
sla
a ; * 2
+
add a,
a ; * 2
ld d, 0
ld e, a
add hl, de ; hl + index * 2
- ; hl = ptr to
update routin
e
+ ; hl = ptr to
routine tabl
e
; => load functon ptr into hl
ld a, [hl+]
- ld d, a
- ld a, [hl]
- ld l, d
- ld h, a
+ ld h, [hl]
+ ld l, a
; hl = function value
jp hl