Всякое

This commit is contained in:
Пытков Роман
2025-09-20 18:48:55 +03:00
parent 95e5aab32d
commit 8f705bb7b8
9 changed files with 634 additions and 35 deletions

View File

@@ -1,16 +1,11 @@
global _start
section .data
text_message: db "Welcome to NASM!", 0xA
nums dq 112, 113, 114, 115, 116 ; массив чисел типа qword
currentAddr dq $
section .text
_start:
mov rax, 1 ; write
mov rdi, 1 ; stdout
mov rsi, text_message
mov rdx, 17 ; длина строки в байтах
syscall
mov rax, 60 ; exit
mov rdi, 1 ; код возврата = 0
mov rdi, [currentAddr - 8] ; rdi = 116
mov rax, 60
syscall