Question: Create a program using x 8 6 Assembly / GNU assembly syntax this is an example: file hello.c . def _ _ _ main;

Create a program using x86 Assembly/GNU assembly syntax this is an example: file "hello.c"
.def ___main; .scl 2; .type 32; .endef
.text
LC0:
.ascii "Hello, world!\12\0"
.globl _main
.def _main; .scl 2; .type 32; .endef
_main:
pushl %ebp
movl %esp, %ebp
subl $8,%esp
andl $-16,%esp
movl $0,%eax
movl %eax, -4(%ebp)
movl -4(%ebp),%eax
call __alloca
call ___main
movl $LC0,(%esp)
call _printf
movl $0,%eax
leave
ret
.def _printf; I want the program to ask a user for a number than again for another number, then adds those numbers together and display it on the screen. For example: Enter a number:
5
Enter a number:
1 Heres the total:
6

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!