aboutsummaryrefslogtreecommitdiff
path: root/ia32/syscall.sts
blob: 58a6ffd2b64123d1be9582c281467212a195f1bc (plain)
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
defasm quit
; mov eax, 1
# b8 ?' # 1 ?.
; xor ebx, ebx
# 31 ?' # db ?'
; int 0x80
# cd ?' # 80 ?'

_data_segment ?choose
?$ ?? _io_buffer
# 0 ?'
_code_segment ?choose

defasm key
; mov eax, 3
# b8 ?' # 3 ?.
; xor ebx, ebx
# 31 ?' # db ?'
; mov ecx, _io_buffer
# b9 ?' _io_buffer ?.
; mov edx, 1
# ba ?' # 1 ?.
; int 0x80
# cd ?' # 80 ?'
; xor ebx, ebx
# 31 ?' # db ?'
; mov bl, [_io_buffer]
# 8a ?' # 1d ?' _io_buffer ?.
; push ebx
# 53 ?'
; push eax
# 50 ?'
next

defasm emit
; pop eax
# 58 ?'
; mov [_io_buffer], al
# a2 ?' _io_buffer ?.
; mov eax, 4
# b8 ?' # 4 ?.
; mov ebx, 1
# bb ?' # 1 ?.
; mov ecx, _io_buffer
# b9 ?' _io_buffer ?.
; mov edx, 1
# ba ?' # 1 ?.
; int 0x80
# cd ?' # 80 ?'
next