Difference between revisions of "83Plus:BCALLs:4009"
From WikiTI
(Created LdHLInd) |
(→Synopsis: changed "store" to "load", since 'store' usually means writes to memory) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:83Plus:BCALLs:By Name:Utility|LdHLInd]] [[Category:83Plus:BCALLs:By Name|LdHLInd]] [[Category:83Plus:BCALLs:By Address|4009 - LdHLInd]] | ||
== Synopsis == | == Synopsis == | ||
'''Official Name:''' LdHLInd | '''Official Name:''' LdHLInd | ||
Line 4: | Line 5: | ||
'''BCALL Address:''' 4009 | '''BCALL Address:''' 4009 | ||
− | + | Loads the value at (HL) into register HL. | |
=== Inputs === | === Inputs === | ||
Line 16: | Line 17: | ||
== Comments == | == Comments == | ||
− | Useful utility call. | + | Useful utility call. Equivalent code located in example. |
== Example == | == Example == | ||
Line 24: | Line 25: | ||
ld h,(hl) | ld h,(hl) | ||
ld l,a | ld l,a | ||
+ | ret</nowiki> | ||
+ | There is also an equivalent version which uses DE instead of A: | ||
+ | <nowiki>LdHLInd: | ||
+ | ld e,(hl) | ||
+ | inc hl | ||
+ | ld d,(hl) | ||
+ | ex de,hl | ||
ret</nowiki> | ret</nowiki> |
Latest revision as of 17:16, 9 October 2005
Synopsis
Official Name: LdHLInd
BCALL Address: 4009
Loads the value at (HL) into register HL.
Inputs
- HL: pointer to bytes to load
Outputs
- HL: value located at input (HL)
Registers Destroyed
- AF
Comments
Useful utility call. Equivalent code located in example.
Example
LdHLInd: ld a,(hl) inc hl ld h,(hl) ld l,a ret
There is also an equivalent version which uses DE instead of A:
LdHLInd: ld e,(hl) inc hl ld d,(hl) ex de,hl ret