Archived
1
0
Fork 0
This repository has been archived on 2022-06-20. You can view files and clone it, but cannot push or open issues or pull requests.
mipt_clang/nasm/O.asm
nihonium 402d412e92
G64
2022-03-30 22:13:33 +03:00

30 lines
353 B
NASM

global _start
section .text
_start:
; input
mov eax, 3
xor ebx, ebx
mov ecx, nya
mov edx, 1
int 0x80
; modification
mov ax, word [nya]
or ax, 0111b
mov [nya], ax
; output
mov eax, 4
mov ebx, 1
mov ecx, nya
mov edx, 1
int 0x80
; program exit
mov eax, 1 ; sys_exit = 1
xor ebx, ebx
int 0x80
section .bss
nya resb 1