Port output error **Error** test5.ASM(60) Constant too large

Error:

mov al, 10000001b   ;A口方式0输出,C口高四位输出,列(低四位输入,行),即行为输出,列为输入
out CTRL, al

Analysis: I want to send 81h to the control port CTRL, the value of CTRL is 28bh , and an error message is reported that the constant CTRL is too large.

Solution: use register indirect addressing

mov al, 10000001b   ;A口方式0输出,C口高四位输出,列(低四位输入,行),即行为输出,列为输入
mov dx, CTRL
out dx, al

Guess you like

Origin blog.csdn.net/Cyril_KI/article/details/109498006