![]() ![]() 8255 functions in the MZ-700 |
|||||||||||||||||||||||||||||||||||||||||||||||
General The 8255 is used by the MZ-700 to manage the keyboard, to control the data recorder, to control the clock interrupt, and to control the timer for the cursor blink frequency. The table contains the ports used by the 8255.
|
|||||||||||||||||||||||||||||||||||||||||||||||
Configuration The 8255 is configured by the monitor's subroutine named MODE starting at location $073E. For this, see and download the reassembled file mz700lst.zip ( 50 Kbytes ). MODE is called at location $004F during the startup of the monitor. Here is a copy of the routine: 004D IM 1 ; set CPU to interrupt mode 1 004F CALL MODE ; initiate 8255 MODE: LD HL,$E003 ; address to control word port LD (HL),$8A ; 10001010 control word to init 8255 LD (HL),$07 ; 00001101 set bit 3 of port C LD (HL),$05 ; 00001001 set bit 2 of port C RET Please refer to the control word to configure the 8255. The first instruction initiates the register HL to the address of the
control word port. The following picture shows the resulting configuration: ![]() The next 2 instructions will set bits of port C. Please refer to the control word to modify a single bit of port C. The first instruction of these two instructions loads a binary value of '00000111' ( $07 ) into the port $E003. Here is a copy of this instruction: LD (HL),$07 ; 00001101 set bit 3 of port C This will initiate the flip-flop for the motor control and to understand this, take a look at the following table for the meaning of the bits of port $E002.
In detail now this control word: A binary value of '00000111' ( $07 )
to the port takes the following effects: The D-type flip-flop LS74 IC# 7E is reset during startup by setting this bit. It is contacted to bit PC3 of the 8255. This type of flip-flop toggles the logical value at its output line named Q whenever the input line changes from a logical 0 to a logical 1, but never vice-versa. It will be initiated by this command to prevent a disfunction of the motor control. The last instruction of the mode routine was: LD (HL),$05 ; 00001001 set bit 2 of port C This control word enables the clock interrupt used by the monitor's interrupt service routine at location $038D to toggle the AM / PM value of the associated byte at location $119B and to reinitiate the timer 8253. In detail the control word loaded by the last instruction: A binary value
of '00000101' ( $05 ) to the control command port takes the following
effects: Please take a note of the description of the tape data processing and of the description of the internal clock too. How does the 8255 operate the MZ-700's keyboard? To get the answer click
here. |