Startup code

20665: Print message


Used by routines at 20896, 21152, 21425 and 21664

A Message number

20665 210050 LD HL,20480
20668 E5 PUSH HL
20669 6F LD L,A Now L=message number
20670 CB7F BIT 7,A Is message number < 128?
20672 2806 JR Z,20680 Jump if so
20674 2650 LD H,80 Index the table at 20724 for message numbers >= 128
20676 5E LD E,(HL)
20677 23 INC HL
20678 1804 JR 20684
20680 26FE LD H,254
20682 5E LD E,(HL)
20683 24 INC H
20684 56 LD D,(HL) DE=address of message to print
20685 21005B LD HL,23296
20688 E5 PUSH HL
20689 CD1B6B CALL 27419 Prepare message in screen-ready form
20692 E1 POP HL
20693 D1 POP DE DE=display area address
20694 D5 PUSH DE POKE the message into the display area
20695 0E20 LD C,32
20697 EDB0 LDIR
20699 D1 POP DE
20700 14 INC D
20701 CB44 BIT 0,H
20703 20F5 JR NZ,20694
20705 C9 RET