Routines |
Prev: BAEE | Up: Map | Next: BB15 |
Used by the routines at main_routine, TREPUT, CAST_S, select_spell, display_spell_info, display_wizard_spell_range, routine11, routine13, lightning_spell, routine21, routine23, COUNTL, routine24, routine25, routine35, routine41, routine47, clear_bottom_row, display_object_info, print_spell_property, print_creature_attribute, routine72 and routine73.
print a message from game messages table 1.
|
||||||||||
MPRINT | BAFB | PUSH HL | preserve HL, DE, and BC | |||||||
BAFC | PUSH DE | |||||||||
BAFD | PUSH BC | |||||||||
BAFE | LD H,$00 | set HL to value in A (message number) | ||||||||
BB00 | LD L,A | |||||||||
BB01 | ADD HL,HL | multiply HL by four because each row is 4 bytes | ||||||||
BB02 | ADD HL,HL | |||||||||
BB03 | LD DE,game_messages_1 | add address of game messages table 1 to get address of desired row in game messages table | ||||||||
BB06 | ADD HL,DE | |||||||||
BB07 | LD E,(HL) | load address of message into DE | ||||||||
BB08 | INC HL | |||||||||
BB09 | LD D,(HL) | |||||||||
BB0A | INC HL | load message length into C | ||||||||
BB0B | LD C,(HL) | |||||||||
BB0C | EX DE,HL | swap DE into HL | ||||||||
BB0D | LD E,C | copy length into E | ||||||||
BB0E | POP BC | restore coordinates in BC | ||||||||
BB0F | CALL print_string_loop | call routine at print_string_loop to print string | ||||||||
BB12 | POP DE | restore DE and HL | ||||||||
BB13 | POP HL | |||||||||
BB14 | RET | return |
Prev: BAEE | Up: Map | Next: BB15 |