Question: Hello I have to write program that takes 2 numbers from user sum them and display back to user in GNU Assembler intel_syntax . So
Hello
I have to write program that takes 2 numbers from user sum them and display back to user in GNU Assembler intel_syntax .
So far I've got part taking input but have no idea how to realise adding them up correctly (3 digits per number)
Task is to not use any kind of standard library or external functions just pure assembly + sys_calls to read and write
```
.intel_syntax noprefix .global main .data msg: .asciz "Enter a number:" msg1: .asciz "Number:" msg2: .asciz "Sum:" .lcomm num,5 .lcomm num1,5 .lcomm res,5 .text main: mov eax, 4 mov ebx, 1 mov ecx, OFFSET msg mov edx, 15 int 0x80
mov eax, 3 mov ebx, 1 mov ecx,OFFSET num mov edx, 5 int 0x80 push OFFSET num
mov eax, 4 mov ebx, 1 mov ecx, OFFSET msg mov edx, 15 int 0x80
mov eax, 3 mov ebx, 1 mov ecx,OFFSET num1 mov edx, 5 int 0x80
mov eax, 4 mov ebx, 1 mov ecx, OFFSET msg1 mov edx, 7 int 0x80
mov eax, 4 mov ebx, 1 mov ecx, OFFSET num mov edx, 5 int 0x80
mov eax, 4 mov ebx, 1 mov ecx, OFFSET msg1 mov edx, 7 int 0x80
mov eax, 4 mov ebx, 1 mov ecx, OFFSET num1 mov edx, 5 int 0x80
mov eax, 1 mov ebx, 0 int 0x80
```
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
