Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assembly language Using the AddSub program from Section 3.2 as a reference, write a program that subtracts three integers using only 16- bit registers. Insert

image text in transcribed

Assembly language

Using the AddSub program from Section 3.2 as a reference, write a program that subtracts three integers using only 16- bit registers. Insert a call DumpRegs statement to display the register values. TITLE Add and Subtract (AddSub.asm) ; This program adds and subtracts 32-bit integers. INCLUDE Irvine32.inc code main PROC mov eax,10000h add eax,40000h sub eax,20000h call DumpRegs exit main ENDP END main let use the following values varl 400 var2 100 var3 70 var4 9 and then move var1 in to EAX and then subtract var2, then var3, and then var4 EAX should then hold 221 TITLE Add and Subtract, Version 2 : This program adds and subtracts 32-bit unsigned ; integers and stores the sum in a variable. INCLUDE Irvine32.inc (AddSub2.asm) data vall DWORD 10000h val2 DWORD 40000h va13 DWORD 20000h finalVal DWORD? .code main PROC moy eax,vall add eax,val2 sub eax,val3 mov finalval.eax call DumpRegs exit start with 10000h : add 40000h : subtract 20000h : store the result (30000h) : display the registers : predefined MS-Win func tion main ENDP END main

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part I Lnai 8724

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448475, 978-3662448472

More Books

Students also viewed these Databases questions