Manipulating the Blink Registers
It is good programming practice to use the operating system calls provided, rather than trying to manipulate the hardware directly. This avoids compatibility problems with future releases and leaving the operating system in an unstable state. We are therefore NOT encouraging the reader to 'poke to the screen' or 'disable the operating system!' We will encourage you to use these good programming practise and attempt to give as full a description of the hardware that exists as we understand it.Â
Overview of the BLINK registers
The following table lists all the registers in the BLINK chip, which are accessed through the Z80 I/O ports. Not all of the registers are useful to programmers, but they are all included for completeness. Some are described in more detail later in this section.
The hardware registers have only one function. They can either be written to, or read from, (but not both). With this constraint it would have been possible to lose track of register contents. To get around this potential problem, the operating system duplicates these values by using soft copies of that can always be read, to check out the contents of the hardware registers. Addresses $0400 to $04FF are used to store the 'soft copies' of the values in the BLINK registers, with the low byte of the address being taken from the address of the I/O port. Operating system always write to the soft copy of a register before writing to the hardware register itself to ensure that the duplicate entry is valid. Reasons are explained below. Â
I/O port   WRITE                  READ
$70Â Â Â Â Â Â Â Â PB0, pixel base reg.0Â Â -
$71Â Â Â Â Â Â Â Â PB1, pixel base reg.1Â Â -
$72Â Â Â Â Â Â Â Â PB2, pixel base reg.2Â Â -
$73Â Â Â Â Â Â Â Â PB3, pixel base reg.3Â Â -
$74        SBR, screen base reg.  -
$B0        COM, command register  -
$B1        INT, mask & control    STA, interrupt status
$B2Â Â Â Â Â Â Â Â -Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â KBD, keyboard
$B3        EPR, EPROM programming -
$B4        TACK, RTC ack.         -
$B5        TMK, RTC int. mask     TSTA, RTC int. status
$B6        ACK, main int. mask    -
$D0Â Â Â Â Â Â Â Â SR0, segment reg. 0Â Â Â Â TIM0, RTC 5ms counter
$D1Â Â Â Â Â Â Â Â SR1, segment reg. 1Â Â Â Â TIM1, RTC seconds counter (6 bits)
$D2Â Â Â Â Â Â Â Â SR2, segment reg. 2Â Â Â Â TIM2, RTC minutes counter
$D3Â Â Â Â Â Â Â Â SR3, segment reg. 3Â Â Â Â TIM3, RTC minutes/256 counter
$D4Â Â Â Â Â Â Â Â -Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â TIM4, RTC minutes/64K counter (5 bits)
$E0Â Â Â Â Â Â Â Â -Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â RXD, UART receive data register
$E1Â Â Â Â Â Â Â Â -Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â RXE, extended receiver data
$E2        RXC, receiver control  -
$E3        TXD, transmit data     -
$E4        TXC, transmit control  -
$E5        UMK, UART int. mask    UIT, UART int. status
$E6        UAK, UART int. mask    -
Note :
RTC Â Â Real Time Clock
UART Universal Asynchronous Receiver Transmitter
INT Â Â Interrupt
ACK Â AcknowledgeÂ
Â
Â
Â