By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,445 Members | 1,329 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,445 IT Pros & Developers. It's quick & easy.

Alem

P: 38
hi
anybody

Do you have any idia about the following codes, I know it in C++

move cx,p
dec cx
mov di,cx
mov ax,a[bx]
cmp ax,a[bx+2]
jle continue
xchg ax,a[bx+2]
mov a[bx],ax
add bx,2
loop lp2
mov cx,di
loop lp1

list the variable, size of variables and different addressing modes in the code.
Dec 26 '06 #1
Share this Question
Share on Google+
2 Replies


P: 38
hi
anybody

Do you have any idia about the following codes, I know it in C++

move cx,p
dec cx
mov di,cx
mov ax,a[bx]
cmp ax,a[bx+2]
jle continue
xchg ax,a[bx+2]
mov a[bx],ax
add bx,2
loop lp2
mov cx,di
loop lp1

list the variable, size of variables and different addressing modes in the code.
Dec 26 '06 #2

Expert 100+
P: 1,510
anybody

Do you have any idia about the following codes, I know it in C++

move cx,p
dec cx
mov di,cx
mov ax,a[bx]
cmp ax,a[bx+2]
jle continue
xchg ax,a[bx+2]
mov a[bx],ax
add bx,2
loop lp2
mov cx,di
loop lp1

list the variable, size of variables and different addressing modes in the code.
looks like 8086 assembly language, see
http://www.xs4all.nl/~smit/asm01001.htm
http://www.doc.ic.ac.uk/~phwl/teaching/comparch/06instructions.pdf
Dec 26 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.