Prev: B84B Up: Map Next: B8ED
B8C4: Print String
Used by the routines at GameMenu, PrintWages, B3BE, GameOver and ED2A.
Input
DE Screen co-ordinates
HL Message address
PrintString B8C4 LD A,(HL) A=*HL.
B8C5 INC HL Increment HL by one.
B8C6 CP $80 If A is higher than 80 jump to PrintString_1.
B8C8 JR C,PrintString_1
Return if we've reached the terminator (FF).
B8CA CP $FF If A is FF then return.
B8CC RET Z
If the current byte is our control byte (FE) - we grab the next byte and store it in C and then loop back to the start.
B8CD CP $FE If A is not FE jump to PrintString_0.
B8CF JR NZ,PrintString_0
B8D1 LD C,(HL) C=*HL.
B8D2 INC HL Increment HL by one.
B8D3 JR PrintString Jump to PrintString.
Any other data is processed from here.
PrintString_0 B8D5 CP $A8 If A is higher than A8 jump to PrintString_1.
B8D7 JR C,PrintString_1
B8D9 CP $E8 If A is lower than E8 jump to PrintString_1.
B8DB JR NC,PrintString_1
B8DD SUB $C8 A-=C8.
B8DF ADD A,E E=A+E.
B8E0 LD E,A
B8E1 LD A,D D+=*HL.
B8E2 ADD A,(HL)
B8E3 LD D,A
B8E4 INC HL Increment HL by one.
B8E5 JR PrintString Jump to PrintString.
PrintString_1 B8E7 CALL PrintStringColour Call PrintStringColour.
B8EA INC E Increment E by one.
B8EB JR PrintString Jump to PrintString.
Prev: B84B Up: Map Next: B8ED