Prev: A83B Up: Map Next: A8A0
A83D: Routine at A83D
Used by the routines at EEC1, F177, F578, F5F1, F814 and F8B9.
A83D DI Disable interrupts.
A83E EXX Switch to the shadow registers.
A83F PUSH AF Stash AF on the stack.
A840 LD ($A83B),SP Write SP to Temp_StackPointer_Storage.
A844 LD L,A Create an offset in HL.
A845 LD H,$00
A847 ADD HL,HL HL*=20.
A848 ADD HL,HL
A849 ADD HL,HL
A84A ADD HL,HL
A84B ADD HL,HL
A84C LD SP,$8378 SP=Graphics_Items+HL.
A84F ADD HL,SP
A850 LD SP,HL
A851 LD A,($A838) B=*A838.
A854 LD B,A
A855 AND %00000111 Keep only bits 0-2.
A857 INC A Increment A by one.
A858 LD ($A87B),A Write A to A87B.
A85B LD A,B A=B.
A85C AND %11111000 Keep only bits 3-7.
A85E RRCA
A85F RRCA
A860 RRCA
A861 LD ($EFAF),A
A864 ADD A,$02
A866 LD E,A
A867 LD A,($A839)
A86A SUB $40
A86C LD L,A Create an offset in HL.
A86D LD H,$00
A86F ADD HL,HL HL*=20.
A870 ADD HL,HL
A871 ADD HL,HL
A872 ADD HL,HL
A873 ADD HL,HL
A874 LD D,$6B D=6B.
A876 ADD HL,DE HL+=DE.
A877 LD C,$10 C=10.
A879 POP DE Restore DE from the stack.
This is modified from A858.
A87A LD B,$00 B=00.
A87C DEC B Decrease B by one.
A87D JR Z,$A889 Jump to A889 if B is zero.
A87F XOR A A=00.
A880 SRL E
A882 RR D
A884 RRA
A885 DJNZ $A880
A887 OR (HL)
A888 LD (HL),A
A889 DEC HL
A88A LD A,(HL)
A88B OR D
A88C LD (HL),A
A88D DEC HL
A88E LD A,(HL)
A88F OR E
A890 LD (HL),A
A891 LD DE,$0022
A894 ADD HL,DE
A895 DEC C
A896 JP NZ,$A879
A899 LD SP,($A83B) Restore SP from Temp_StackPointer_Storage.
A89D POP AF Restore AF from the stack.
A89E EXX Switch to the normal registers.
A89F RET Return.
Prev: A83B Up: Map Next: A8A0