assume cs:code,ds:data
data segment
org 2000h
num dw 4567h
onecount db 01d dup(0h)
data ends
code segment
start:mov ax,data
mov ds,ax
mov cx,16d
mov ax,num
go:ror ax,01
jnc next
inc onecount
next:dec cx
jnz go
mov ah,4ch
int 21h
code ends
end start
data segment
org 2000h
num dw 4567h
onecount db 01d dup(0h)
data ends
code segment
start:mov ax,data
mov ds,ax
mov cx,16d
mov ax,num
go:ror ax,01
jnc next
inc onecount
next:dec cx
jnz go
mov ah,4ch
int 21h
code ends
end start
No comments:
Post a Comment