Простое окно

This commit is contained in:
Пытков Роман
2025-09-25 23:50:14 +03:00
parent 1698b43da6
commit 2332be6293
4 changed files with 142 additions and 40 deletions

View File

@@ -1,23 +1,11 @@
global main
extern sum, print, scan
extern a
extern run_wayland
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
enter 0, 0
call run_wayland
leave
mov rax, 0
ret