Question: Make a program using x 8 6 - 6 4 Linux assembly syntax. Here's an example of that syntax: . global main . text #

Make a program using x86-64 Linux assembly syntax. Here's an example of that syntax: .global main
.text # executable code
main:
mov $1,%r8 # count =1
top:
cmp $0,%r8 # if (count ==0) jump to end
je end
# write(0, message, 13)
mov $1,%rax # 1 is system call id for write
mov $1,%rdi # 1 is fd for stdout
mov $message, %rsi # address of message
mov $13,%rdx # write 13 bytes
syscall
dec %r8 # count--
jmp top # always jump back to the top
end:
# exit(42)
mov $60,%rax # 60 is system call id for exit
mov $33,%rdi # 42 is the exit value
syscall
.data # initialized data
message: .ascii "Hello, World The program will be called right_tri.s it will take a number from the command line like this: ./right_tri 3 and then will make a right triangle out of #'s that are that many lines long and then print Triangle under it. example: ./right_tri 3
# ## ### Triangle!

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!