Prev: D6C9 Up: Map Next: D986
D7F6: Print Sprite Mirrored
PrintSprite_Mirrored D7F6 LD ($D214),A Write A to D214.
D7F9 DEC C Decrease C by one.
D7FA PUSH BC Stash BC on the stack.
D7FB CALL InitialiseSprite Call InitialiseSprite.
D7FE POP BC Restore BC from the stack.
D7FF LD D,A D=A.
This entry point is used by the routine at PrintSprite.
PrintSprite_Mirrored_0 D800 EX AF,AF' Exchange the AF register with the shadow AF register.
D801 LD L,A L=A.
D802 LD E,C E=C.
D803 LD C,A C=A.
D804 EXX Switch to the shadow registers.
D805 LD A,(HL) A=*HL.
D806 INC HL Increment HL by one.
D807 LD H,(HL) H=*HL.
D808 LD L,A L=A.
PrintSprite_Mirrored_1 D809 EXX Switch to the shadow registers.
D80A LD A,C Jump to PrintSprite_Mirrored_2 if C is not equal to L.
D80B CP L
D80C JP NZ,PrintSprite_Mirrored_2
D80F LD A,B A=B.
D810 AND %11111000 Keep only bits 3-7.
D812 ADD A,$6B A+=6B.
D814 LD H,A H=A.
D815 EX AF,AF' Exchange the AF register with the shadow AF register.
D816 LD A,B A=B.
D817 AND %00000111 Keep only bits 0-2.
D819 RRCA RRCA.
D81A RRCA
D81B RRCA
D81C ADD A,C A+=C.
D81D EXX Switch to the shadow registers.
D81E LD C,A C=A.
D81F EX AF,AF' Exchange the AF register with the shadow AF register.
D820 LD B,A B=A.
D821 JP PrintSprite_Mirrored_3 Jump to PrintSprite_Mirrored_3.
PrintSprite_Mirrored_2 D824 LD A,H A=H.
D825 EXX Switch to the shadow registers.
D826 DEC C Decrease C by one.
D827 LD B,A B=A.
PrintSprite_Mirrored_3 D828 EXX Switch to the shadow registers.
D829 LD A,C Jump to PrintSprite_Mirrored_6 if C is higher than 20.
D82A CP $20
D82C JP NC,PrintSprite_Mirrored_6
D82F LD A,B Jump to PrintSprite_Mirrored_6 if B is higher than 18.
D830 CP $18
D832 JP NC,PrintSprite_Mirrored_6
D835 EXX Switch to the shadow registers.
D836 LD A,(HL) Jump to PrintSprite_Mirrored_8 if *HL is equal to 36.
D837 CP $36
D839 JP Z,PrintSprite_Mirrored_8
D83C LD A,(DE) Jump to PrintSprite_Mirrored_9 if *DE is equal to 36.
D83D CP $36
D83F JP Z,PrintSprite_Mirrored_9
D842 INC HL Increment HL by one.
D843 INC DE Increment DE by one.
D844 PUSH HL Stash HL on the stack.
D845 LD A,(BC) A=*BC.
D846 LD L,(HL) L=*HL.
D847 LD H,$C6 H=C6.
D849 AND (HL) Merge the bits from *HL.
D84A EX AF,AF' Exchange the AF register with the shadow AF register.
D84B LD A,(DE) A=*DE.
D84C LD L,A L=A.
D84D EX AF,AF' Exchange the AF register with the shadow AF register.
D84E OR (HL) Set the bits from *HL.
D84F LD (BC),A Write A to *BC.
D850 POP HL Restore HL from the stack.
D851 INC DE Increment DE by one.
D852 INC HL Increment HL by one.
D853 INC B Increment B by one.
D854 PUSH HL Stash HL on the stack.
D855 LD A,(BC) A=*BC.
D856 LD L,(HL) L=*HL.
D857 LD H,$C6 H=C6.
D859 AND (HL) Merge the bits from *HL.
D85A EX AF,AF' Exchange the AF register with the shadow AF register.
D85B LD A,(DE) A=*DE.
D85C LD L,A L=A.
D85D EX AF,AF' Exchange the AF register with the shadow AF register.
D85E OR (HL) Set the bits from *HL.
D85F LD (BC),A Write A to *BC.
D860 POP HL Restore HL from the stack.
D861 INC DE Increment DE by one.
D862 INC HL Increment HL by one.
D863 INC B Increment B by one.
D864 PUSH HL Stash HL on the stack.
D865 LD A,(BC) A=*BC.
D866 LD L,(HL) L=*HL.
D867 LD H,$C6 H=C6.
D869 AND (HL) Merge the bits from *HL.
D86A EX AF,AF' Exchange the AF register with the shadow AF register.
D86B LD A,(DE) A=*DE.
D86C LD L,A L=A.
D86D EX AF,AF' Exchange the AF register with the shadow AF register.
D86E OR (HL) Set the bits from *HL.
D86F LD (BC),A Write A to *BC.
D870 POP HL Restore HL from the stack.
D871 INC DE Increment DE by one.
D872 INC HL Increment HL by one.
D873 INC B Increment B by one.
D874 PUSH HL Stash HL on the stack.
D875 LD A,(BC) A=*BC.
D876 LD L,(HL) L=*HL.
D877 LD H,$C6 H=C6.
D879 AND (HL) Merge the bits from *HL.
D87A EX AF,AF' Exchange the AF register with the shadow AF register.
D87B LD A,(DE) A=*DE.
D87C LD L,A L=A.
D87D EX AF,AF' Exchange the AF register with the shadow AF register.
D87E OR (HL) Set the bits from *HL.
D87F LD (BC),A Write A to *BC.
D880 POP HL Restore HL from the stack.
D881 INC DE Increment DE by one.
D882 INC HL Increment HL by one.
D883 INC B Increment B by one.
D884 PUSH HL Stash HL on the stack.
D885 LD A,(BC) A=*BC.
D886 LD L,(HL) L=*HL.
D887 LD H,$C6 H=C6.
D889 AND (HL) Merge the bits from *HL.
D88A EX AF,AF' Exchange the AF register with the shadow AF register.
D88B LD A,(DE) A=*DE.
D88C LD L,A L=A.
D88D EX AF,AF' Exchange the AF register with the shadow AF register.
D88E OR (HL) Set the bits from *HL.
D88F LD (BC),A Write A to *BC.
D890 POP HL Restore HL from the stack.
D891 INC DE Increment DE by one.
D892 INC HL Increment HL by one.
D893 INC B Increment B by one.
D894 PUSH HL Stash HL on the stack.
D895 LD A,(BC) A=*BC.
D896 LD L,(HL) L=*HL.
D897 LD H,$C6 H=C6.
D899 AND (HL) Merge the bits from *HL.
D89A EX AF,AF' Exchange the AF register with the shadow AF register.
D89B LD A,(DE) A=*DE.
D89C LD L,A L=A.
D89D EX AF,AF' Exchange the AF register with the shadow AF register.
D89E OR (HL) Set the bits from *HL.
D89F LD (BC),A Write A to *BC.
D8A0 POP HL Restore HL from the stack.
D8A1 INC DE Increment DE by one.
D8A2 INC HL Increment HL by one.
D8A3 INC B Increment B by one.
D8A4 PUSH HL Stash HL on the stack.
D8A5 LD A,(BC) A=*BC.
D8A6 LD L,(HL) L=*HL.
D8A7 LD H,$C6 H=C6.
D8A9 AND (HL) Merge the bits from *HL.
D8AA EX AF,AF' Exchange the AF register with the shadow AF register.
D8AB LD A,(DE) A=*DE.
D8AC LD L,A L=A.
D8AD EX AF,AF' Exchange the AF register with the shadow AF register.
D8AE OR (HL) Set the bits from *HL.
D8AF LD (BC),A Write A to *BC.
D8B0 POP HL Restore HL from the stack.
D8B1 INC DE Increment DE by one.
D8B2 INC HL Increment HL by one.
D8B3 INC B Increment B by one.
D8B4 PUSH HL Stash HL on the stack.
D8B5 LD A,(BC) A=*BC.
D8B6 LD L,(HL) L=*HL.
D8B7 LD H,$C6 H=C6.
D8B9 AND (HL) Merge the bits from *HL.
D8BA EX AF,AF' Exchange the AF register with the shadow AF register.
D8BB LD A,(DE) A=*DE.
D8BC LD L,A L=A.
D8BD EX AF,AF' Exchange the AF register with the shadow AF register.
D8BE OR (HL) Set the bits from *HL.
D8BF LD (BC),A Write A to *BC.
D8C0 POP HL Restore HL from the stack.
D8C1 CALL $D986 Call D986.
PrintSprite_Mirrored_4 D8C4 INC DE Increment DE by one.
D8C5 INC HL Increment HL by one.
PrintSprite_Mirrored_5 D8C6 EXX Switch to the shadow registers.
D8C7 DEC C Decrease C by one.
D8C8 LD A,E Compare E with C...
D8C9 CP C
D8CA EXX Switch to the shadow registers.
D8CB JP NZ,PrintSprite_Mirrored_1 Jump to PrintSprite_Mirrored_1 if E is not equal to C on line D8C8.
D8CE EXX Switch to the shadow registers.
D8CF LD C,L C=L.
D8D0 INC B Increment B by one.
D8D1 LD A,D Compare D with B...
D8D2 CP B
D8D3 EXX Switch to the shadow registers.
D8D4 JP NZ,PrintSprite_Mirrored_1 Jump to PrintSprite_Mirrored_1 if D is not equal to B on line D8D1.
D8D7 RET Return.
PrintSprite_Mirrored_6 D8D8 EXX Switch to the shadow registers.
D8D9 LD A,(DE) A=*DE.
D8DA INC DE Increment DE by one.
D8DB CP $36 Jump to PrintSprite_Mirrored_7 if A is equal to 36.
D8DD JP Z,PrintSprite_Mirrored_7
D8E0 INC DE Increment DE by eight.
D8E1 INC DE
D8E2 INC DE
D8E3 INC DE
D8E4 INC DE
D8E5 INC DE
D8E6 INC DE
D8E7 INC DE
PrintSprite_Mirrored_7 D8E8 LD A,(HL) A=*HL.
D8E9 INC HL Increment HL by one.
D8EA CP $36 Jump to PrintSprite_Mirrored_5 if A is equal to 36.
D8EC JP Z,PrintSprite_Mirrored_5
D8EF INC HL Increment HL by eight.
D8F0 INC HL
D8F1 INC HL
D8F2 INC HL
D8F3 INC HL
D8F4 INC HL
D8F5 INC HL
D8F6 INC HL
D8F7 JP PrintSprite_Mirrored_5 Jump to PrintSprite_Mirrored_5.
PrintSprite_Mirrored_8 D8FA LD A,(DE) Jump to PrintSprite_Mirrored_4 if *DE is equal to 36.
D8FB CP $36
D8FD JP Z,PrintSprite_Mirrored_4
D900 INC DE Increment DE by one.
D901 INC HL Increment HL by one.
D902 PUSH HL Stash HL on the stack.
D903 LD H,$C6 H=C6.
D905 LD A,(DE) A=*DE.
D906 LD L,A L=A.
D907 LD A,(HL) A=*HL.
D908 LD (BC),A Write A to *BC.
D909 INC DE Increment DE by one.
D90A INC B Increment B by one.
D90B LD A,(DE) A=*DE.
D90C LD L,A L=A.
D90D LD A,(HL) A=*HL.
D90E LD (BC),A Write A to *BC.
D90F INC DE Increment DE by one.
D910 INC B Increment B by one.
D911 LD A,(DE) A=*DE.
D912 LD L,A L=A.
D913 LD A,(HL) A=*HL.
D914 LD (BC),A Write A to *BC.
D915 INC DE Increment DE by one.
D916 INC B Increment B by one.
D917 LD A,(DE) A=*DE.
D918 LD L,A L=A.
D919 LD A,(HL) A=*HL.
D91A LD (BC),A Write A to *BC.
D91B INC DE Increment DE by one.
D91C INC B Increment B by one.
D91D LD A,(DE) A=*DE.
D91E LD L,A L=A.
D91F LD A,(HL) A=*HL.
D920 LD (BC),A Write A to *BC.
D921 INC DE Increment DE by one.
D922 INC B Increment B by one.
D923 LD A,(DE) A=*DE.
D924 LD L,A L=A.
D925 LD A,(HL) A=*HL.
D926 LD (BC),A Write A to *BC.
D927 INC DE Increment DE by one.
D928 INC B Increment B by one.
D929 LD A,(DE) A=*DE.
D92A LD L,A L=A.
D92B LD A,(HL) A=*HL.
D92C LD (BC),A Write A to *BC.
D92D INC DE Increment DE by one.
D92E INC B Increment B by one.
D92F LD A,(DE) A=*DE.
D930 LD L,A L=A.
D931 LD A,(HL) A=*HL.
D932 LD (BC),A Write A to *BC.
D933 INC DE Increment DE by one.
D934 POP HL Restore HL from the stack.
D935 CALL $D986 Call D986.
D938 JP PrintSprite_Mirrored_5 Jump to PrintSprite_Mirrored_5.
PrintSprite_Mirrored_9 D93B INC DE Increment DE by one.
D93C INC HL Increment HL by one.
D93D PUSH DE Stash DE on the stack.
D93E LD D,$C6 D=C6.
D940 LD E,(HL) E=*HL.
D941 LD A,(DE) A=*DE.
D942 LD E,A E=A.
D943 LD A,(BC) A=*BC.
D944 AND E Merge the bits from E.
D945 LD (BC),A Write A to *BC.
D946 INC HL Increment HL by one.
D947 INC B Increment B by one.
D948 LD E,(HL) E=*HL.
D949 LD A,(DE) A=*DE.
D94A LD E,A E=A.
D94B LD A,(BC) A=*BC.
D94C AND E Merge the bits from E.
D94D LD (BC),A Write A to *BC.
D94E INC HL Increment HL by one.
D94F INC B Increment B by one.
D950 LD E,(HL) E=*HL.
D951 LD A,(DE) A=*DE.
D952 LD E,A E=A.
D953 LD A,(BC) A=*BC.
D954 AND E Merge the bits from E.
D955 LD (BC),A Write A to *BC.
D956 INC HL Increment HL by one.
D957 INC B Increment B by one.
D958 LD E,(HL) E=*HL.
D959 LD A,(DE) A=*DE.
D95A LD E,A E=A.
D95B LD A,(BC) A=*BC.
D95C AND E Merge the bits from E.
D95D LD (BC),A Write A to *BC.
D95E INC HL Increment HL by one.
D95F INC B Increment B by one.
D960 LD E,(HL) E=*HL.
D961 LD A,(DE) A=*DE.
D962 LD E,A E=A.
D963 LD A,(BC) A=*BC.
D964 AND E Merge the bits from E.
D965 LD (BC),A Write A to *BC.
D966 INC HL Increment HL by one.
D967 INC B Increment B by one.
D968 LD E,(HL) E=*HL.
D969 LD A,(DE) A=*DE.
D96A LD E,A E=A.
D96B LD A,(BC) A=*BC.
D96C AND E Merge the bits from E.
D96D LD (BC),A Write A to *BC.
D96E INC HL Increment HL by one.
D96F INC B Increment B by one.
D970 LD E,(HL) E=*HL.
D971 LD A,(DE) A=*DE.
D972 LD E,A E=A.
D973 LD A,(BC) A=*BC.
D974 AND E Merge the bits from E.
D975 LD (BC),A Write A to *BC.
D976 INC HL Increment HL by one.
D977 INC B Increment B by one.
D978 LD E,(HL) E=*HL.
D979 LD A,(DE) A=*DE.
D97A LD E,A E=A.
D97B LD A,(BC) A=*BC.
D97C AND E Merge the bits from E.
D97D LD (BC),A Write A to *BC.
D97E INC HL Increment HL by one.
D97F POP DE Restore DE from the stack.
D980 CALL $D986 Call D986.
D983 JP PrintSprite_Mirrored_5 Jump to PrintSprite_Mirrored_5.
Prev: D6C9 Up: Map Next: D986