试编程对8253初始化启动其工作。要求计数器0工作于模式1,初值为3000H;计数器1工作于模式3,初值为100H;计数器2工作于模式4,初值为4030H。设端口地址为40H、41H、42H和43H。
正确答案:
MOV AL,00011110H;控制字
OUT 43H,AL
MOV AL,3000H;计数初值
OUT 40H,AL
MOV AL,01010110H;计数器1
OUT 43H,AL
MOV AL,100H
OUT 41H,AL
MOV AL,10011000H;计数器2
OUT 43H,AL
MOV AL,4030H
OUT 42H,AL
OUT 43H,AL
MOV AL,3000H;计数初值
OUT 40H,AL
MOV AL,01010110H;计数器1
OUT 43H,AL
MOV AL,100H
OUT 41H,AL
MOV AL,10011000H;计数器2
OUT 43H,AL
MOV AL,4030H
OUT 42H,AL
答案解析:有
微信扫一扫手机做题