30 lines
353 B
NASM
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
|