Routines |
Prev: BDE7 | Up: Map | Next: BE21 |
Used by the routines at subversion_spell, CHAN_C, lightning_spell, dark_power_spell, INTERO, routine23, COUNTL, routine25, display_object_info, print_creature_attribute and routine65.
enter with object number in D and offset in object data entry in E
|
||||
GETCHR | BE0A | PUSH HL | preserve HL and BC | |
BE0B | PUSH BC | |||
BE0C | LD HL,nothing_pointer | set HL to address of first entry in object address table | ||
BE0F | LD B,$00 | set BC to value in D (row number in object address table) | ||
BE11 | LD C,D | |||
BE12 | DEC C | decrement C, then double it and add result to HL as an offset in object address table | ||
BE13 | SLA C | |||
BE15 | ADD HL,BC | |||
BE16 | LD C,(HL) | load address of object data from the table into BC | ||
BE17 | INC HL | |||
BE18 | LD B,(HL) | |||
BE19 | LD H,$00 | set HL to value in E (offset in object data table entry) | ||
BE1B | LD L,E | |||
BE1C | ADD HL,BC | add to the object address in BC to get offset within object data | ||
BE1D | LD A,(HL) | load byte from object data into A | ||
BE1E | POP BC | restore BC, HL | ||
BE1F | POP HL | |||
BE20 | RET | return |
Prev: BDE7 | Up: Map | Next: BE21 |