Professional Documents
Culture Documents
Document 1
Document 1
inc
section .data
input_msg db 'Enter an integer: ', 0
output_msg db 'You entered: ', 0
newline db 0xA, 0xD ; newline character for formatting
section .bss
user_input resb 10 ; reserve space for user input (up to 10 characters)
section .text
global _start
_start:
; Display input message
mov eax, 4 ; syscall number for sys_write
mov ebx, 1 ; file descriptor 1 (stdout)
mov ecx, input_msg ; pointer to input message
mov edx, 16 ; message length
int 0x80 ; call kernel