Monday, May 17, 2010

Basic arithmetic assembly programming

Question

Indicate any value/data/register that has been change by every program line below

MOV BX, 0202h
MUL BL
ADD BX, ((AX))
MOV DX,ES:[0001h]
MOV [BP],CX



Answer

MOV BX, #0202h // BX = 0202h

MUL BL // AX = 0001h x 02h = 00002h

ADD BX, ((AX)) // BX = 11ABh + (0004)=11ABh + 0001h=11ACh

MOV DX,ES:[0001h] // DX =8967h

MOV [BP],CX // 50005 = 1F, 50006=CB

2 comments:

Popular Posts

Latest Post from my Other Blog