nihonium
/
mipt_clang
Archived
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

31 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