Monday, May 17, 2010

Arithmetic & Logic assembly programming

Question

Identify the new value of AX, BX dan CX after the program below.

MOV AX, 1234H

MOV BX, ABCDH
MOV CH, 1D
MOV CL, 255D
OR AH, 10H
AND BX , 1111000011110000b
NOT CX

Answer
 
AH  = 12h = 00010010

          10h = 00010000

AH OR AL = 00010010
--> AX = 1234h

BX = ABCD --> A0C0

CX = NOT ( 0AFF) = 1111 0101 0000 0000b = F500h

No comments:

Post a Comment

Popular Posts

Latest Post from my Other Blog