[求助]编译不通过,Missing or unreachable cs
;此程序目的是计数1的个数,并输出,addr中放4567的符号地址number,number中放4567;数据
data segment
addr: dw number
number: dw 4567
count: dw ?
data ends
prognam segment
main proc far
assume cs:prognam,ds:data
start: push ds ;set stack segment
sub ax,ax
push ax
;main part of program ;数1
mov ax,data
mov ds,ax
sub cx,cx
mov bx,addr
mov ax,[bx]
repeat: test ax,0ffffh
jz exit
jns shift
inc cx
shift: shl ax,1
jmp repeat
exit: mov bx,cx ;以16进制输出
mov cl,4
mov ch,4
rotate: rol bx,cl
mov ax,bx
and ax,000fh
add al,30h
cmp al,3ah
jl print
add al,7
print: mov ah,2
mov dl,al
int 21h
dec ch
jnz rotate
ret
main endp
prognam ends
end start