Prev: 57761 Up: Map Next: 57910
57817: Routine at E1D9
Used by the routine at 57570.
57817 PUSH BC Stash BC on the stack.
57818 CALL 57761 Call 57761.
57821 POP BC Restore BC from the stack.
57822 LD DE,257 DE=0257.
57825 LD A,B A=B.
57826 SUB H A-=H.
57827 JR NC,57833 Jump to 57833 if is higher.
57829 DEC D Decrease D by two.
57830 DEC D
57831 NEG NEG.
57833 LD B,A B=A.
57834 LD A,C A=C.
57835 SUB L A-=L.
57836 JR NC,57842 Jump to 57842 if D is higher.
57838 DEC E Decrease E by two.
57839 DEC E
57840 NEG NEG.
57842 LD C,A C=A.
57843 OR B Set the bits from B.
57844 RET Z Return if E is zero.
57845 LD A,C A=C.
57846 CP B Compare A with B.
57847 PUSH HL Stash HL on the stack.
57848 LD H,D H=D.
57849 LD L,E L=E.
57850 LD (57813),HL Write HL to *57813.
57853 LD L,0 L=0.
57855 JR C,57861 Jump to 57861 if A is lower.
57857 LD H,L H=L.
57858 LD L,E L=E.
57859 LD C,B C=B.
57860 LD B,A B=A.
57861 LD (57815),HL Write HL to *57815.
57864 LD H,B H=B.
57865 LD A,B A=B.
57866 SRL A Shift A right.
57868 LD L,A L=A.
57869 LD A,L A=L.
57870 ADD A,C A+=C.
57871 JR C,57876 Jump to 57876 if A is lower.
57873 CP B Compare A with B.
57874 JR C,57884 Jump to 57884 if A is lower.
57876 SUB B A-=B.
57877 LD L,A L=A.
57878 LD DE,(57813) DE=*57813.
57882 JR 57889 Jump to 57889.
57884 LD L,A L=A.
57885 LD DE,(57815) DE=*57815.
57889 EX (SP),HL Exchange the *SP with the HL register.
57890 LD A,H A=H.
57891 ADD A,D A+=D.
57892 LD H,A H=A.
57893 LD A,L A=L.
57894 ADD A,E A+=E.
57895 LD L,A L=A.
57896 PUSH BC Stash BC on the stack.
57897 CALL 57761 Call 57761.
57900 CALL 57910 Call 57910.
57903 POP BC Restore BC from the stack.
57904 EX (SP),HL Exchange the *SP with the HL register.
57905 DEC H Decrease H by one.
57906 JR NZ,57869 Jump to 57869 if H is not zero.
57908 POP HL Restore HL from the stack.
57909 RET Return.
Prev: 57761 Up: Map Next: 57910