data segment
X dw 0000000000001100d
data ends
code segment
assume cs:code, ds:data
main proc far
start:
push ds
mov ax, 0
push ax
mov ax, data
mov ds, ax
mov ax, X
mov bx, 0000000000000111d ;用来屏蔽X的非第三位的所有数
mov cl, -3 ;移位控制器
mov dx, 6 ;计数器
loop1:
add cl, 3
shr ax, cl
and ax, bx
add al, 30h
mov dl, al
mov ah, 2
int 21h
dec dx
jnz loop1
ret
main endp
code ends
end start