Page
4.5
Software Considerations
Cursor Control
The cursor is generated by the CRTC. The current location of the cursor
can be determined by reading the contents of CRTC registers R14 and
R15. The cursor can be moved by writing a new location into the registers.
The value returned from this register will not be the same as the address
the CPU uses to apdress the identical display location. The CPU must
address the display and attribute memories at different locations. The
CRTC addresses them at the same time. Bit 0 of the CPU address is
used to select which of the two memories is being talked to. Since the
CRTC addresses the two RAMs at the same time, there is no correspond-
ing bit
o.
Character address bit 0 from the CRTC is the same as address
bit 1 from the CPU. The relationship of the addresses is such that the
address from the CRTC registers must be shifted left one position to make
them agree.
To reposition the cursor, do the following:
1.
Determine the location you want the cursor to move to.
2.
Write OEH into I/O address 3B4H to address the high-order cursor
address (CRTC index register RO).
3.
Write the high-order value of the cursor address to I/O address
3B5H. Remember that the CRTC address is shifted to the right
one position from the CPU address.
4.
Write OFH into I/O address 3B4H to address the low-order cursor
address register (CRTC register R15).
5.
Write the low-order address of the cursor to I/O address 3B5H.
Need help?
Do you have a question about the Z-100 Series and is the answer not in the manual?