Question
Program Code: Fig 2.1 [ORG 0x0100] mov ax, 100 add ax, 200 ;ax = ax + 200 mov bx, 300 add ax, bx ;ax =
Program Code: Fig 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: Fig 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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started