Skip to content

Instantly share code, notes, and snippets.

View pacifiquem's full-sized avatar

Murangwa Pacifique pacifiquem

View GitHub Profile
@pacifiquem
pacifiquem / input_output.asm
Created November 26, 2023 07:57
Get input from user (his/her) name and then print it to the screen by using ``assembly``!
section .data
msg db 'Enter your name: ', 0
msg_len equ $ - msg
buffer resb 64 ; Buffer to store the user's input
output_msg db 'Hello, ', 0
section .text
global _start
@pacifiquem
pacifiquem / hello_world.asm
Created November 26, 2023 07:53
Hello World in assembly!
section .data
hello db 'Hello, World!',0
section .text
global _start
_start:
; write the string to stdout
mov eax, 4 ; system call number for sys_write
mov ebx, 1 ; file descriptor 1 is stdout