Hello, there were several problems when writing a program on assembler.
- What interruption mov ah, 9? And is it an interruption at all?
- The latter procedure does not print 3 lines, but rather, it does, but crocodiles. Why?
If you write mov ah, 02h nothing at all will output.
.model tiny org 100h .data chislo1 db ? mess0 db "",0ah,0dh,'$' mess db "Vvedite chislo1: ",'$' message dw "HELLO, WORLD!", '$' message1 dw "MY NAME IS EUGENE!", '$' message2 dw "I'M 18 YEARS OLD!", '$' .code start: mov ax, @data mov ds,ax xor ax, ax mov dx, "P" mov cx,5 cikl5: call procedure1 loop cikl5 ;-----------------------------| mov ah,9 mov dx,offset mess int 21h mov ah,01h int 21h mov chislo1,al mov ah,9 mov dx,offset mess0 int 21h mov cx,2 cicl2: call procedure2 loop cicl2 ;-----------------------------| push [message2] push [message1] push [message] call procedure3 ;-----------------------------| mov ax,4c00h int 21h procedure1 proc mov ah,02h int 21h ret procedure1 endp procedure2 proc mov ah,02h mov dl,chislo1 int 21h ret procedure2 endp procedure3 proc push bp mov bp,sp mov ah,9 mov dx,[bp+2] int 21h mov ax,[bp+4] mov ah,9 int 21h mov ax,[bp+6] mov ah,9 int 21h pop bp ret 6 procedure3 endp end start