Добавил:
cfe_o
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:10variant
.txt section .data
string db "aye"
strLen equ $ -string
msg db "aue"
msgLen equ $ -msg
section .text
GLOBAL _start
_start:
mov esi, string
mov ebx, strLen
.do_anal:
movzx edx, byte [esi+ecx]
.bullying:
cmp edx, 'a'
je .fisting
jmp .bulich
.fisting://давай:)
add eax, 1
.bulich:
inc ecx
cmp ecx, ebx
jb .do_anal
jmp .hueta
.hueta://согласен
xor edx, edx
mov ebx, 2
div ebx
cmp edx, 0
je .exit
.end:
mov eax, 1
mov ebx, 0
int 80h
.exit:
mov eax, 4
mov ebx, 1
mov ecx, msg
mov edx, msgLen
int 80h
jmp .end
string db "aye"
strLen equ $ -string
msg db "aue"
msgLen equ $ -msg
section .text
GLOBAL _start
_start:
mov esi, string
mov ebx, strLen
.do_anal:
movzx edx, byte [esi+ecx]
.bullying:
cmp edx, 'a'
je .fisting
jmp .bulich
.fisting://давай:)
add eax, 1
.bulich:
inc ecx
cmp ecx, ebx
jb .do_anal
jmp .hueta
.hueta://согласен
xor edx, edx
mov ebx, 2
div ebx
cmp edx, 0
je .exit
.end:
mov eax, 1
mov ebx, 0
int 80h
.exit:
mov eax, 4
mov ebx, 1
mov ecx, msg
mov edx, msgLen
int 80h
jmp .end