-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathskuska1.txt
74 lines (56 loc) · 904 Bytes
/
skuska1.txt
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
64
65
66
67
68
69
70
71
72
73
74
TITLE MASM Template (main.asm)
INCLUDE Irvine32.inc
.data
Retazec DB 16 dup(?)
RetazecSplna DB "Splna",0ah, 0dh, 0
RetazecChyba DB "Nesplna",0ah, 0ah, 0
.code
main PROC
mov ecx, 20
mov edx, Offset Retazec
call ReadString
mov al, [edx+edi]
inc edi
cmp al, 0
je Nesplna
Zaciatok:
cmp al, '('
je Zatvorka
jmp Nesplna
Zatvorka:
Pokracuj:
mov al, [edx+edi]
inc edi
cmp al, 'a'
jge Pokracuj1
jb Overenie
Pokracuj1:
cmp al, 'z'
jbe Pokracuj
jmp Overenie
Overenie:
cmp al, '('
je Zatvorka
cmp al, ')'
je Koniec
jmp Overenie1
Overenie1:
cmp al, 0
je Nesplna
jmp Zaciatok
Koniec:
mov al, [edx+edi]
cmp al, 0
je Splna
jmp Pokracuj
Nesplna:
mov edx, offset RetazecChyba
call WriteString
exit
Splna:
mov edx, offset RetazecSplna
call WriteString
exit
exit
main ENDP
END main