section .text
org 100h
push selected
call output
mov ah,4Ch
int 21h
output:
push ebp
mov ebp, esp
sub esp, 4
push ebx
mov ah,0x9
mov dx,[ebp+8]
int 21h
pop ebx
mov esp, ebp
pop ebp
ret
section .data
selected DB "I selected a random number between 0 and 99",0xd,0xa,'$'
Я должен передать параметры по стеку.
Ожидаемый вывод:
"I selected a random number between 0 and 99"
, но реальный вывод:
"
═ Я ЪЁ■↔Ё▐☺▲♦K☺▲♦V☺▲♦▲♦☺☺☺ ☻ #♣╓ p♣¶ ↑ p♣ ♣
h(☺ш♦ ┤L═!fUfЙхfГь♦fS┤ gЛU
═!f[fЙьf]├ I selected a random number between 0 and 99"
Почемуэто происходит?