Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi, I want to see if I have the correct steps in the program using assembly lang

ID: 3757294 • Letter: H

Question

Hi, I want to see if I have the correct steps in the program using assembly language for 3B or I need to add something else. Thanks.

Assignment 3A - A program that adds and subtracts 32-bit numbers After installing the assembler on the computer, enter the following program, save it, assemble it and run it. Do not forget to add a comment with your name in it. You will hand in a listing (e.g., addsum.asm) that should include your name TITLE Add and Subtract (AddSum.asm) This program adds and subtracts 32-bit integers Caterina Pentcheva INCLUDE Irvine32.inc .code main PROC mov eax, 10000h EAX- 10000h add eax, 40000h ;EAX = 50000h eax, 20000h EAX 30000h call DumpRegs display registers

Explanation / Answer

data segment

abc dd 9ABCDEF0h

def dd 12345678h

ghi dw ?

data ends

code segment

assume cs:code, ds:data

start:

mov ax,data

mov ds,ax

mov dl,00h

mov ax, word ptr abc

mov bx, word ptr def

sub ax,bx

mov word ptr ghi,ax

mov ax, word ptr abc+2

mov bx, word ptr def+2

sbb ax,bx

mov word ptr ghi+2,ax

jnc move

inc dl

move: mov byte ptr ghi+4,dl

int 3

code ends

end start

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote