Question: Modify this hello.asm programs to output three hardcoded strings(Hello world three times). Include an assembly list file of the compiled source code and output. Here
Modify this hello.asm programs to output three hardcoded strings("Hello world" three times). Include an assembly list file of the compiled source code and output. Here is the code for printing just one "Hello world".
global -start section .text ; system call for write ; file handle l is stdout ; address of string to output ; number of bytes ; invoke operating system to do the write ; system call for exit ; exit code 0 ; invoke operating system to exit start: mov rax, 1 rdi, 1 rsi, message rdx, 13 mov mov mov syscall mov xor syscall rax, 60 rdi, rdi section.data message db "Hello, World", 10 note the newline at the end global -start section .text ; system call for write ; file handle l is stdout ; address of string to output ; number of bytes ; invoke operating system to do the write ; system call for exit ; exit code 0 ; invoke operating system to exit start: mov rax, 1 rdi, 1 rsi, message rdx, 13 mov mov mov syscall mov xor syscall rax, 60 rdi, rdi section.data message db "Hello, World", 10 note the newline at the end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
