Question: Program Code: Table 2.1 [ORG 0x0100] mov ax, 100 add ax, 200 ;ax = ax + 200 mov bx, 300 add ax, bx ;ax =

Program Code: Table 2.1

[ORG 0x0100] mov ax, 100 add ax, 200 ;ax = ax + 200 mov bx, 300 add ax, bx ;ax = ax + bx sub ax, 100 ;ax = ax - 100 sub ax, bx ;ax = ax - bx mov ax, 1000 mov bx, 100 mul bx ;dx ax = ax * bx mov bx, 70 ;divisor in BX register div bx ;(DX AX)/BX = AX: Quotient, DX: Remainder mov ax, 0x4c00 int 0x21

Program Code: Table 2.2

[ORG 0x0100] mov al, 10 add al, 20 ;al = al + 20 mov bl, 30 add al, bl ;al = al + bl sub al, 10 ;al = al - 10 sub al, bl ;al = al - bl mov al, 100 mov bl, 10 mul bl ;ax = al * bl mov bl, 7 ;divisor in BL register div bl ;AX/BL = AL: Quotient, AH: Remainder mov ax, 0x4c00 int 0x21

Procedure: 1. Write the program shown in Fig 2.1 in Notepad and save it as file name exp02.asm in folder C: asm 2. Double click DOSBOX shortcut on the desktop. 3. Assemble the program using the command below: nasm exp02.asm o exp02.com 4. Open the program in the debugger using the command below: afd exp02.com 5. Execute the instructions in Table 2.1 using F1 key, observe the contents of the registers and record the observations in Table 2.1. 6. Modify exp02.asm with the program shown in Fig 2.2 and repeat the above steps to execute the program and record your observations in Table 2.2

Please don't put any image answers

Program Code: Table 2.1 [ORG 0x0100] mov ax, 100 add ax, 200

Observations and Results: mov ax, 100 AX: mov al, 10 AL: add ax, 200 AX: add al, 20 AL: mov ba, 300 BX: mov bl, 30 BL: add ax, bx AX: add al, bl AL: sub ax, 100 AX: sub al, 10 AL: sub ax, bx AX: sub al, bl AL: mov ax, 1000 AX: mov al, 100 AL: mov bx, 100 BX: mov bl, 10 BL: mul bx DX AX: mul bl AX: mov bx, 70 BX: mov bl, 7 BL: div bx AX: DX : div bl AL: AH: Table 2.1 Table 2.2 Observations and Results: mov ax, 100 AX: mov al, 10 AL: add ax, 200 AX: add al, 20 AL: mov ba, 300 BX: mov bl, 30 BL: add ax, bx AX: add al, bl AL: sub ax, 100 AX: sub al, 10 AL: sub ax, bx AX: sub al, bl AL: mov ax, 1000 AX: mov al, 100 AL: mov bx, 100 BX: mov bl, 10 BL: mul bx DX AX: mul bl AX: mov bx, 70 BX: mov bl, 7 BL: div bx AX: DX : div bl AL: AH: Table 2.1 Table 2.2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!