Prev: 9E10 Up: Map Next: 9E51
9E1F: Print a noun with its adjectives
IY points to a word list: noun, then up to two adjectives. The article is printed first (7436, unless B5F4 is set), then the adjectives, and then the noun (with an article if B5F4 is set). So 'curious map' comes out as 'a curious map'.
9E1F PUSH AF Save AF and DE
9E20 PUSH DE
9E21 LD A,($B5F4) Does the caller want an article before the whole phrase (rather than before each adjective)?
9E24 CP $00
9E26 JR NZ,$9E43 Yes: skip straight to printing the noun with its article
9E28 LD D,(IY+$01) No: DE = the first adjective, if there is one
9E2B LD E,(IY+$00)
9E2E CALL $7436 Print its article ("a curious ...")
9E31 LD E,(IY+$02) DE = the first adjective word itself
9E34 LD D,(IY+$03)
9E37 CALL $74B8 Print it
9E3A LD E,(IY+$04) DE = the second adjective, if there is one
9E3D LD D,(IY+$05)
9E40 CALL $74B8 Print it (an empty slot simply prints nothing)
9E43 LD E,(IY+$00) DE = the noun
9E46 LD D,(IY+$01)
9E49 LD A,D Is there actually a noun here at all?
9E4A OR E
9E4B CALL NZ,$746F If so, print it (with an article too, if the caller asked for one before the whole phrase)
9E4E POP DE Restore DE and AF
9E4F POP AF
9E50 RET
Prev: 9E10 Up: Map Next: 9E51