Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

новая папка 1 / 11variant

.txt
Скачиваний:
0
Добавлен:
18.10.2022
Размер:
563 б
Скачать
section .data
str1 db "aaa"
str1Len equ $ -str1
str2 db "aba"
str2Len equ $ -str2
section .text
GLOBAL _start
_start:
mov esi, str1
mov ebx, str1Len
dec ebx
.count_line1:
movzx eax, byte [esi+ecx]
cmp eax, 'a'
je .countA
jmp .hz
.countA:
add edx, 1
.hz:
inc ecx
cmp ecx, ebx
jbe .count_line1

mov esi, str2
mov ebx, str2Len
dec ebx
xor ecx, ecx
.count_line2:
movzx eax, byte[esi+ecx]
cmp eax, 'a'
je .countA2
jmp .hz2
.countA2:
add edx, 1
.hz2:
inc ecx
cmp ecx, ebx
jbe .count_line2

.end:
mov eax, 1
mov ebx, 0
int 80h
Соседние файлы в папке новая папка 1