-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathio_char.asm
More file actions
63 lines (52 loc) · 983 Bytes
/
io_char.asm
File metadata and controls
63 lines (52 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
; faghat variable hayi ke meghdar avvali nadard
section .bss
myCharacter resb 1
section .data
charac db 0xA
madew db "Coded by MamaD", 0xA,0
len equ $ - madew
; num1 DD 0
; num2 DD 0
section .text
global _main
_main:
; mov eax, 5
; mov ebx, 6
;
; mov [num1], eax
; mov [num2], ebx
mov eax, 0x04
mov ebx, 1
mov ecx, madew
mov edx, len
int 0x80
mov eax, 0x04
mov ebx, 1
mov ecx, charac
mov edx, 1
int 0x80
; Loop Comment kardam !!!
;.loop:
; sys_read
mov eax, 0x03
mov ebx, 0
mov ecx, myCharacter
mov edx, 1
int 0x80
; sys_write
mov eax, 0x04
mov ebx, 1
mov ecx, myCharacter
mov edx, 1
int 0x80
mov eax, 0x04
mov ebx, 1
mov ecx, charac
mov edx, 1
int 0x80
; Ba'adan khodet mituni dar biyari az comment kar mikone loop :)
; jmp .loop
; Exit System Call
mov eax, 0x01
mov ebx, 0x0
int 0x80