притянут C++

This commit is contained in:
Пытков Роман
2025-09-20 22:12:40 +03:00
parent 241f5acf71
commit a6d997f61d
4 changed files with 19 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
global main
extern sum, print, scan
extern sum, print, scan, test_vector, a
section .text
main:
@@ -12,7 +12,11 @@ main:
call sum ; сумма
mov rdi, rax ; результат
call print ; напечатать
call test_vector
pop rbx ; восстановить rbx
mov dword [rel a], 42 ; записать значение 42 в переменную a
mov rdi, 0
mov rax, 60
syscall