Prev: 672E Up: Map Next: 67A9
676F: Print String
Input
B String length
C Attribute value of string
DE Screen buffer address
HL Pointer to string data
Configurable_PrintString 676F LD IX,$6153 IX=6153.
6773 JR PrintString Jump to PrintString.
This entry point is used by the routines at 696A, Print_ControlMenu, 79B2 and TitleScreen.
SpectrumFont_PrintString 6775 LD IX,$3C00 IX=3C00.
6779 JR PrintString Jump to PrintString.
This entry point is used by the routines at 696A, 6A23 and 79B2.
CustomFont_PrintString 677B LD IX,$6153 IX=6153.
PrintString 677F PUSH DE Stash DE, BC, BC, DE and HL on the stack.
6780 PUSH BC
Configurable_PrintString_0 6781 PUSH BC
6782 PUSH DE
6783 PUSH HL
6784 LD L,(HL) Store the offset for the UDG data look-up in HL.
6785 LD H,$00
6787 ADD HL,HL Multiply HL by 08.
6788 ADD HL,HL
6789 ADD HL,HL
678A PUSH IX BC=IX (using the stack).
678C POP BC
678D ADD HL,BC Add BC to HL.
678E LD B,$08 Set a counter in B for 08 rows.
PrintString_Loop 6790 LD A,(HL) Copy one row of graphics data to the screen buffer.
6791 LD (DE),A
6792 INC HL Move to the next byte of graphics data.
6793 INC D Move down one pixel row.
6794 DJNZ PrintString_Loop Decrease the row counter by one and loop back to PrintString_Loop until counter is zero.
6796 POP HL Restore HL and DE from the stack.
6797 POP DE
6798 INC DE Increment DE by one.
6799 INC HL Increment HL by one.
679A POP BC Restore BC from the stack.
679B DJNZ Configurable_PrintString_0 Decrease counter by one and loop back to Configurable_PrintString_0 until counter is zero.
679D DEC DE Decrease DE by one.
679E CALL ConvertScreenToAttributeBufferAddress Call ConvertScreenToAttributeBufferAddress.
67A1 POP BC Restore BC from the stack.
67A2 LD A,C Fetch the attribute colour.
ColourPrintString_Loop 67A3 LD (DE),A Write A to the attribute buffer.
67A4 DEC DE Move backwards one attribute block.
67A5 DJNZ ColourPrintString_Loop Decrease counter by one and loop back to ColourPrintString_Loop until counter is zero.
67A7 POP DE Restore DE from the stack.
67A8 RET Return.
Prev: 672E Up: Map Next: 67A9