(Solved Homework): subject… assembly language,, If you know Assembly language,,,x86,,,,,,,,asm ,,, then answer please,,,,

subject… assembly language,,

If you know Assembly language,,,x86,,,,,,,,asm ,,, then answer please,,,,

I have a question and i have the answer,,, but ineed tto evaluate my answer,,,,

question is:
Implement a simple 4 functios calculator for 3 digits entry.

The user will enter 2 digits for the first and the second numbers.

The user will chose between the operation type +,-,* or /

The result will be displayed.

Work with 32 bits variables and regist

use x86. asm

answer is:

con msg
mov ah, 09h
lea dx, msg
int 21h

data segment
buf1 db “Enter a decimal number : $”
buf2 db 0ah, “Invalid Decimal Number…$”
buf3 db 0ah, “Equivalent hexadecimal number is : $”
buf4 db 6
db 0
db 6 dup(0)
multiplier db 0ah
data ends

code segment
assume cs:code, ds:data
start :
mov ax, @data
mov ds, ax
mov es, ax

con buf1

mov ah, 0ah
lea dx, buf4
int 21h

mov si, offset buf4 + 2
mov cl, byte ptr [si-1]
mov ch, 00h
subtract :
mov al, byte ptr [si]
cmp al, 30h
jnb cont1
con buf2
jmp stop
cont1 :
cmp al, 3ah
jb cont2
con buf2
jmp stop
cont2 :
sub al, 30h
mov byte ptr [si], al

inc si
loop subtract

mov si, offset buf4 + 2
mov cl, byte ptr [si-1]
mov ch, 00h
mov ax, 0000h
calc :
mul multiplier
mov bl, byte ptr [si]
mov bh, 00h
add ax, bx
inc si
loop calc

mov si, offset buf4 + 2
mov bx, ax
mov dx, 0000h
mov ax, 1000h
convert :
mov cx, 0000h
conv :
cmp bx, ax
jb cont3
sub bx, ax
inc cx
jmp conv
cont3 :
cmp cx, 0ah
jb cont4
add cl, 37h
jmp cont5
cont4 :
add cl, 30h
cont5 :
mov byte ptr [si], cl
inc si
mov cx, 0010h
div cx
cmp ax, 0000h
jnz convert

mov byte ptr [si], ‘$’
con buf3
con buf4+2
stop :
mov ax, 4c00h
int 21h
code ends
end start


new question is: Can someone please implement a calculator…… so the user can enter as many digits as they want for each number*******

take your time,,, no rush,,

i promise to give you thumbs up….

Please send me a copyable answer,,, with out put,,,, use ,,,,,,,,,,,,,,,,,,,, X86        asm

Expert Answer

 section .data
    ; Messages
 mesg1        db      n,'-Calculator-',n,0
 lmesg1       equ     $ - mesg1
 mesg2        db      n,'Number 1: ',0
 lmesg2       equ     $ - mesg2
mesg3        db      'Number 2: ',0
lmesg3       equ     $ - mesg3
mesg4        db      n,'1. Add',n,0
lmesg4       equ     $ - mesg4

mesg5        db      '2. Subtract',n,0
lmesg5       equ     $ - mesg5

mesg6        db      '3. Multiply',n,0
lmesg6       equ     $ - mesg6

mesg7        db      '4. Divide',n,0
lmesg7       equ     $ - mesg7
mesg8        db      'Operation: ',0
lmesg8       equ     $ - mesg8

mesg9        db      n,'Result: ',0
lmesg9       equ     $ - mesg9

mesg10       db      n,'Invalid Option',n,0
lmesg10      equ     $ - mesg10
section .bss
Order NOW for a 10% Discount
Pages (550 words)
Approximate price: -

Why Us?

Top Quality and Well-Researched Papers

All ourbpapers are written from scratch. In fact, Clients who ask for paraphrasing services are highly discouraged. We have writers ready to craft any paper from scratch and deliver quality ahead of time.

Professional and Experienced Academic Writers

Our writers keeps you posted on your papers progress - providing you with paper outline/draft. You are also at liberty to communicate directly with your writer.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time, in many cases quite ahead of time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.


Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.


Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.


Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.


Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.

× Contact Live Agents