83Plus:BCALLs:4F54

From WikiTI
Revision as of 03:38, 19 December 2006 by Brandonw (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Synopsis

Unofficial Name: GetBytePaged

BCALL Address: 4F54

Gets a byte from a specific page and address.

Inputs

  • HL = offset into page where byte is located (4000h-7FFFh).
  • A = page where byte is located.

Outputs

  • B = byte.

Destroys

  • A

Notes

For whatever reason, this routine preserves HL, but not A.

In theory, it works for any ROM or RAM page, but the OS uses it to quickly read a byte from Flash ROM.

Example

Get first byte of page 03h:

 ld a,03h
 ld hl,4000h
 B_CALL GetBytePaged
 ;B contains byte