Example 2: write assembly program to perform (x-y) and store the result in x, where x and y are places in memory contain 32 bit each x= (DS:203|) (DS:202) (DS:201) (DS:200) y= (DS:103) (DS:102|)...


Example 2: write assembly program to perform (x-y) and store the result in x, where<br>x and y are places in memory contain 32 bit each<br>x= (DS:203|) (DS:202) (DS:201) (DS:200)<br>y= (DS:103) (DS:102|) (DS:101) (DS:100)<br>Solution :<br>First we subtract the LSB 16 bits of the 32 bit word by using these instructions:<br>MOV AX, [200 H]<br>SUB AX, [100 H]<br>MOV [200 H], AX<br>Next the MSB are subtracted with barrow from LSB:<br>MOV AX, [202 H]<br>SBB AX, [102н<br>MOV [202 „1, AX<br>H.W: the above example is solved using the direct addressing mode, solve the<br>same example using the indirect addressing mode.<br>

Extracted text: Example 2: write assembly program to perform (x-y) and store the result in x, where x and y are places in memory contain 32 bit each x= (DS:203|) (DS:202) (DS:201) (DS:200) y= (DS:103) (DS:102|) (DS:101) (DS:100) Solution : First we subtract the LSB 16 bits of the 32 bit word by using these instructions: MOV AX, [200 H] SUB AX, [100 H] MOV [200 H], AX Next the MSB are subtracted with barrow from LSB: MOV AX, [202 H] SBB AX, [102н MOV [202 „1, AX H.W: the above example is solved using the direct addressing mode, solve the same example using the indirect addressing mode.

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here