8253 mode control word, when the choice of 01, when the choice of 11?

二进制计数下:
    计数范围是0-255,共256个数
    初值≤256  选择:01
    初值>256  选择:11

When the control port number 8253 is 83H, counter 0, binary counting, the initial value of 256, how to write initialization section?

MOV AL,00010000B
OUT 83H,AL
MOV AL,0
OUT 80H,AL

or

MOV AL,00110000B
OUT 83H,AL
MOV AX,256
OUT 80H,AL
MOV AL,AH
OUT 80H,AL

BCD码计数下:
    计数范围是00H-99H,共100H个数
    初值≤100H 选择:01
    初值>100H 选择:11

When the control port number 8253 is 83H, counter 0, count in BCD code, the initial value 100H, how to write initialization section?

MOV AL,00010001B
OUT 83H,AL
MOV AL,0
OUT 80H,AL

or

MOV AL,00110001B
OUT 83H,AL
MOV AX,100H
OUT 80H,AL
MOV AL,AH
OUT 80H,AL
Published 139 original articles · won praise 4 · Views 930,000 +

Guess you like

Origin blog.csdn.net/qq_38490457/article/details/104814455