83Plus:BCALLs:4009: Difference between revisions

From WikiTI
Jump to navigationJump to search
mNo edit summary
→Synopsis: changed "store" to "load", since 'store' usually means writes to memory
 
Line 5: Line 5:
'''BCALL Address:''' 4009
'''BCALL Address:''' 4009


Stores the value at (HL) to register HL.
Loads the value at (HL) into register HL.


=== Inputs ===
=== Inputs ===

Latest revision as of 01:16, 10 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