притянут C++
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user