Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

University of Guadalajara Assembly Language 32x Programming Code

University of Guadalajara Assembly Language 32x Programming Code

University of Guadalajara Assembly Language 32x Programming Code

Description

Assembly language

Modify this code into a program that receives two numbers and prints the minimum. The program then doubles the minimum and compares it to another number. It will then print the new minimum.

Ex:

Input1 = 2

Input2=3

Minimum=2

Newinput1=4

Newinput2=3

Newminimum=3

MY CODE:

%include “asm_io.inc”
segment .data

message1 db “Enter a number: “,0
message2 db “Enter another number: “, 0
message3 db “The larger number is: “, 0

segment .bss

input1 resd 1 ; first number entered

segment .text
global asm_main
asm_main:
enter 0,0 ; setup routine
pusha

mov eax, message1 ; print out first message
call print_string
call read_int ; input first number
mov [input1], eax

mov eax, message2 ; print out second message
call print_string
call read_int ; input second number (in eax)

xor ebx, ebx ; ebx = 0
cmp eax, [input1] ; compare second and first number
setg bl ; ebx = (input2 > input1) ? 1 : 0
neg ebx ; ebx = (input2 > input1) ? 0xFFFFFFFF : 0
mov ecx, ebx ; ecx = (input2 > input1) ? 0xFFFFFFFF : 0
and ecx, eax ; ecx = (input2 > input1) ? input2 : 0
not ebx ; ebx = (input2 > input1) ? 0 : 0xFFFFFFFF
and ebx, [input1] ; ebx = (input2 > input1) ? 0 : input1
or ecx, ebx ; ecx = (input2 > input1) ? input2 : input1

mov eax, message3 ; print out result
call print_string
mov eax, ecx
call print_int
call print_nl

popa
mov eax, 0 ; return back to C
leave
ret

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20