Prev: 46432 Up: Map Next: 46971
46869: Print Colour String
Used by the routines at PrintEarnings and PrintString.
Input
C Attribute colour
PrintStringColour 46869 PUSH AF Stash AF, IX, HL, BC and DE on the stack.
46870 PUSH IX
46872 PUSH HL
46873 PUSH BC
46874 PUSH DE
46875 EX DE,HL Exchange the DE and HL registers.
46876 PUSH HL Stash HL on the stack.
46877 LD D,88 D=88.
46879 LD E,L E=L.
46880 LD L,H L=H.
46881 LD H,0 H=0.
46883 ADD HL,HL
46884 ADD HL,HL
46885 ADD HL,HL
46886 ADD HL,HL
46887 ADD HL,HL
46888 ADD HL,DE
46889 LD (HL),C
46890 PUSH DE Stash DE on the stack.
46891 LD DE,32 HL+=0032.
46894 ADD HL,DE
46895 POP DE Restore DE from the stack.
46896 LD (HL),C Write C to *HL.
46897 POP HL Restore HL from the stack.
46898 LD L,H L=H.
46899 LD D,0 D=0.
46901 LD H,D H=D.
46902 LD C,E C=E.
46903 LD B,D B=D.
46904 ADD HL,HL HL*=16.
46905 ADD HL,HL
46906 ADD HL,HL
46907 ADD HL,HL
46908 LD DE,33272 BC=ScreenBuffer_Locations.
46911 ADD HL,DE
46912 PUSH HL
46913 POP IX
46915 LD L,A
46916 LD H,0
46918 ADD HL,HL
46919 ADD HL,HL
46920 ADD HL,HL
46921 LD DE,57308 HL+=Font.
46924 ADD HL,DE
46925 EX DE,HL
46926 LD A,8
PrintStringColour_0 46928 LD L,(IX+0)
46931 LD H,(IX+1)
46934 ADD HL,BC
46935 INC IX
46937 INC IX
46939 EX DE,HL
46940 LDI
46942 EX DE,HL
46943 INC BC
46944 LD L,(IX+0)
46947 LD H,(IX+1)
46950 ADD HL,BC
46951 INC IX
46953 INC IX
46955 DEC DE
46956 EX DE,HL
46957 LDI
46959 EX DE,HL
46960 INC BC
46961 DEC A
46962 JR NZ,PrintStringColour_0
46964 POP DE Restore DE, BC, HL, IX and AF from the stack.
46965 POP BC
46966 POP HL
46967 POP IX
46969 POP AF
46970 RET Return.
Prev: 46432 Up: Map Next: 46971