;读操作
assume cs:code
code segment
start:
out 70h,al ;选中2号单元
in 71h,al ;从71h端口读入数据
mov ax,4c00h
int 21h
code ends
end start
;写操作
assume cs:code
code segment
start:
mov al,2
out 70h,al ;选中2号单元
mov al,0
out 71h,al ;从71h端口写入数据
mov ax,4c00h
int 21h
code ends
end start
assume cs:code
code segment
start:
mov ax,10000000b
mov bx,ax ;用bx暂存一下ax
shl ax,1
mov cl,3
shl bx,cx
add ax,bx
mov ax,4c00h
int 21h
code ends
end start