This repository was archived by the owner on Oct 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenu.asm
More file actions
103 lines (82 loc) · 2.25 KB
/
Copy pathmenu.asm
File metadata and controls
103 lines (82 loc) · 2.25 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
; Модуль вывода меню
model small
.stack 100h
.data
menu_space db 10,13,10,13,"$"
menu_exit db '0. Exit',10,13,"$"
menu_print db '1. Print menu',10,13,"$"
menu_enter db '2. Enter string',10,13,"$"
menu_load db '3. Load strings from file',10,13,"$"
menu_save db '4. Save to file',10,13,"$"
menu_output db '5. Output',10,13,"$"
menu_choose db 'Select option:',10,13,"$"
menu_error db 'There are no such option in menu. Are you sure that you wrote correct number, man?',10,13,"$"
menu_no_string db 'Please input main string firstly',10,13,"$"
menu_no_result db 'No result. Load strings from file and run again',10,13,"$"
.code
.486
extrn result:byte
public print_menu
public print_no_input
public print_no_string
public print_no_result
print_menu proc near
mov dx, offset menu_space ; Пробел
mov ah, 9
int 21h
mov dx, offset menu_exit ; Выход из программы
mov ah, 9
int 21h
mov dx, offset menu_print ; Вывод меню
mov ah, 9
int 21h
mov dx, offset menu_enter ; Ввод основной строки
mov ah, 9
int 21h
mov dx, offset menu_load ; Загрузка строк из файла
mov ah, 9
int 21h
mov dx, offset menu_save ; Сохранить в файл результат
mov ah, 9
int 21h
mov dx, offset menu_output ; Вывод результата на экран
mov ah, 9
int 21h
mov dx, offset menu_choose ; Выбор пункта меню
mov ah, 9
int 21h
ret
print_menu endp
; =============== Отсутствует главная строка ===============
print_no_string proc near
mov dx, offset menu_space ; Пробел
mov ah, 9
int 21h
mov dx, offset menu_no_string
mov ah, 9
int 21h
ret
print_no_string endp
; =============== Отсутствует результат ===============
print_no_result proc near
mov dx, offset menu_space ; Пробел
mov ah, 9
int 21h
mov dx, offset menu_no_result
mov ah, 9
int 21h
ret
print_no_result endp
; =============== В меню ничего не выбрано ===============
print_no_input proc near
mov dx, offset menu_space ; Пробел
mov ah, 9
int 21h
mov dx, offset menu_error
mov ah, 9
int 21h
ret
print_no_input endp
exit:
ret
end