Prev: AEE5 Up: Map Next: AF49
AEF0: Routine at AEF0
Used by the routines at Messaging_PrintPlayerCurrentTotal, AE17 and AFB5.
AEF0 PUSH HL Stash HL, DE and BC on the stack.
AEF1 PUSH DE
AEF2 PUSH BC
AEF3 XOR A A=00.
AEF4 LD (DE),A Write A to *DE.
AEF5 LD BC,$0064 BC=0064.
AEF8 PUSH HL Stash HL on the stack.
AEF9 SBC HL,BC HL-=BC.
AEFB POP HL Restore HL from the stack.
AEFC JR C,$AF06 Jump to AF06 if ?? is less than 00.
AEFE AND A Set flags.
AEFF SBC HL,BC HL-=BC.
AF01 LD A,(DE) A=*DE.
AF02 INC A Increment A by one.
AF03 LD (DE),A Write A to *DE.
AF04 JR $AEF8 Jump to AEF8.
AF06 OR A Set the bits from A.
AF07 JR NZ,$AF0B Jump to AF0B if A is not equal to A.
AF09 LD A,$20 Write 20 to *DE.
AF0B LD (DE),A
AF0C INC DE Increment DE by one.
AF0D XOR A Write 00 to *DE.
AF0E LD (DE),A
AF0F LD BC,$000A BC=000A.
AF12 PUSH HL Stash HL on the stack.
AF13 SBC HL,BC HL-=BC.
AF15 POP HL Restore HL from the stack.
AF16 JR C,$AF20 Jump to AF20 if DE is less than A.
AF18 AND A Set flags.
AF19 SBC HL,BC HL-=BC.
AF1B LD A,(DE) A=*DE.
AF1C INC A Increment A by one.
AF1D LD (DE),A Write A to *DE.
AF1E JR $AF12 Jump to AF12.
AF20 OR A Set the bits from A.
AF21 LD B,A B=A.
AF22 JR NZ,$AF2F Jump to AF2F if A is not equal to A.
AF24 DEC DE Decrease DE by one.
AF25 LD A,(DE) A=*DE.
AF26 CP $20 Compare A with 20.
AF28 INC DE Increment DE by one.
AF29 JR NZ,$AF2F Jump to AF2F if DE is not equal to 20.
AF2B LD A,$20 A=20.
AF2D JR $AF30 Jump to AF30.
AF2F LD A,B A=B.
AF30 LD (DE),A Write A to *DE.
AF31 INC DE Increment DE by one.
AF32 LD A,L A=L.
AF33 LD (DE),A Write A to *DE.
AF34 POP BC Restore BC, DE and HL from the stack.
AF35 POP DE
AF36 POP HL
AF37 RET Return.
AF38 LD HL,($AF49) HL=*AF49.
AF3B LD DE,($AF4B) DE=*AF4B.
AF3F LD BC,($AF4D) BC=*AF4D.
AF43 ADD HL,BC HL+=BC.
AF44 ADD HL,DE HL+=DE.
AF45 LD ($AF4F),HL Write HL to *AF4F.
AF48 RET Return.
Prev: AEE5 Up: Map Next: AF49