Prev: 75AD Up: Map Next: 763D
7600: Scroll the input window up
Scrolls the lower window (the four character rows starting at $5060, in the bottom third of the screen) up by one row, a pixel line at a time with LDIR, and then clears the bottom row at $50E0 by printing 32 spaces with 766D. All registers are preserved.
7600 PUSH HL Save the registers this uses
7601 PUSH DE
7602 PUSH BC
7603 PUSH AF
7604 LD HL,$5080 HL = the second character row of the input window...
7607 LD DE,$5060 ...DE = the first, where it is moving to
760A LD A,$04 Four character rows to shift up
760C LD B,$00
760E PUSH HL Save the row addresses for a moment
760F PUSH DE
7610 LD C,$08 Eight pixel lines make up one character row
7612 PUSH HL Save this pixel line's addresses
7613 PUSH DE
7614 PUSH BC
7615 LD C,$20 32 bytes make up one pixel line across the screen
7617 LDIR Copy it up
7619 POP BC Restore the counters
761A POP DE
761B POP HL
761C INC H Move down to the next pixel line (the screen's odd layout means +$100 here, not +32)
761D INC D
761E DEC C One fewer pixel line to do
761F JR NZ,$7612
7621 POP DE Restore the row addresses
7622 POP HL
7623 LD C,$20 Move both addresses on to the next character row
7625 ADD HL,BC
7626 EX DE,HL
7627 ADD HL,BC
7628 EX DE,HL
7629 DEC A One fewer character row to do
762A JR NZ,$760E
762C LD B,$20 The bottom row is now empty: clear it with 32 spaces
762E LD HL,$50E0
7631 LD A,$20
7633 CALL $766D
7636 DJNZ $7633
7638 POP AF Restore the saved registers
7639 POP BC
763A POP DE
763B POP HL
763C RET
Prev: 75AD Up: Map Next: 763D