Начало проекта wayland

This commit is contained in:
Пытков Роман
2025-09-24 02:05:38 +03:00
parent 17096efe0f
commit 1698b43da6
7 changed files with 122 additions and 0 deletions

23
wayland/asm.asm Normal file
View File

@@ -0,0 +1,23 @@
global main
extern sum, print, scan
extern a
section .text
main:
push rbx
call scan ; прочитать первое число
mov rbx, rax ; сохранить первое число
call scan ; прочитать второе число
mov rdi, rbx ; a
mov rsi, rax ; b
call sum ; сумма
mov rdi, rax ; результат
push rax
call print ; напечатать
pop rax
pop rbx
mov dword [rel a], eax ; записать значение 42 в переменную a
mov rax, 0
ret