Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
dKleinhen Lab #1
;nasm global _start section .data messageA: db 'Hello',0x0a,'world!',0x0a ; 'Hello\nworld!\n ; I don't know what my group number is, so I'm arbitrarily using 50. messageB: db 'This is Group 50,',0x0a, 'nice to meet you!',0x0a section .text _start: mov rax,1 ; The system call for write mov rdi,1 ; argument #1 in rdi, where to write mov rsi, messageA ; argument #2 in rsi: where does the string start mov rdx, 13 ; argument #3 in rdx: how many bytes to write syscall ; this instruction invokes a system call mov rax,1 ; The system call for write mov rdi,1 ; argument #1 in rdi, where to write mov rsi, messageB ; argument #2 in rsi: where does the string start mov rdx, 36 ; argument #3 in rdx: how many bytes to write syscall ; this instruction invokes a system call mov rax, 60 ; 'exit' syscall number xor rdi, rdi ; rdi holds a 0 syscall ; invokes the system call
run
|
edit
|
history
|
help
0
Pass
sub
0000
p2.asm
funcs
dfsfdasfdssdf
studenthello
mortgage
AVL-GO-FLAT
intmain2