Prev: 45940 Up: Map Next: 46014
45964: Pixels Copier
Used by the routines at 46481 and 48311.
Input
HL Source pointer
DE Destination pointer
BC Width and height
Copier_Pixels 45964 PUSH BC Stash BC, DE, HL and HL on the stack.
45965 PUSH DE
45966 PUSH HL
Copier_Pixels_0 45967 PUSH HL
45968 LD B,(HL) B=*HL.
45969 INC HL Increment HL by one.
45970 LD H,(HL) H=*HL.
45971 SET 7,H Set bit 7 of H.
45973 LD L,B L=B.
45974 LD B,8 B=8.
Copier_Pixels_1 45976 LD A,(HL) A=*HL.
45977 LD (DE),A Write A to *DE.
45978 INC HL Increment HL by one.
45979 INC D Increment D by one.
45980 DJNZ Copier_Pixels_1 Decrease counter by one and loop back to Copier_Pixels_1 until counter is zero.
45982 DEC C Decrease C by one.
45983 JR Z,Copier_Pixels_3 Jump to Copier_Pixels_3 if {} is zero.
45985 LD A,E E+=32.
45986 ADD A,32
45988 LD E,A
45989 JR C,Copier_Pixels_2 Jump to Copier_Pixels_2 if {} is lower.
45991 LD A,D D-=8.
45992 SUB 8
45994 LD D,A
Copier_Pixels_2 45995 POP HL Restore HL from the stack.
45996 LD A,C A=C.
45997 LD BC,64 BC=0064.
46000 ADD HL,BC HL+=BC.
46001 LD C,A C=A.
46002 JR Copier_Pixels_0 Jump to Copier_Pixels_0.
Copier_Pixels_3 46004 POP HL Restore HL, HL, DE and BC from the stack.
46005 POP HL
46006 POP DE
46007 POP BC
46008 INC E Increment E by one.
46009 INC L Increment L by two.
46010 INC L
46011 DJNZ Copier_Pixels Decrease counter by one and loop back to Copier_Pixels until counter is zero.
46013 RET Return.
Prev: 45940 Up: Map Next: 46014