| |

VerySource

 Forgot password?
 Register
Search
View: 1020|Reply: 1

A question about 8259

[Copy link]

2

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2021-3-10 12:30:02
| Show all posts |Read mode
In the 8259 initialization program, the odd address port and even address port of 8259 are known. When defining icw1 and icw2, the control word is input to the port, but why is it not input to the port when defining icw3 and icw4 Instead, output directly to the dx register?

mov al,11h
MOV DX,0FFE8H; This is an even address port
OUT DX, AL; This is the definition iCW1;

When defining icw3, the odd address port is not used?
MOV AL,08H
OUT DX, AL; define icw3 and output directly to dx. But dx does not have an odd address port.
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2021-3-10 15:45:01
| Show all posts
Your initialization program is incomplete. The initialization always starts from ICW1, followed by ICW2, and then the last command word (if needed).
Therefore, the port value has been sent to DX when ICW2 is defined, and ICW2, ICW3 and ICW4 have the same port address, so there is no need to write a value to DX. Whether ICW2 is followed by ICW3 or ICW4 or both, it depends on your ICW1 situation. Take your example, ICW1 is 11H, which means that both ICW3 and ICW4 are required, so you need to send the value to port 0FFE9H three times in a row. , 8259 will be received as ICW2, ICW3, ICW4
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list