.model small .stack .data sir db 'A', 41h, 'B', 24h, 'C', 0C9h, 'D', 0AFh, 'E', 0FAh car db '*' note dw 0 freq dw 260 msg db '...tone generated','$' msgKey db 10,13,'press any key in order to quit the program', '$' msgLast db 10,13,'done','$' .code main: mov ax, @data mov ds, ax mov AL, 00000010b out 21h, AL mov ax,351Ch int 21h push ES push BX push DS mov AX,SEG isr1Ch mov DS,AX mov DX,OFFSET isr1Ch mov AL,1Ch mov AH,25h int 21h pop DS mov note, 11930 /260 *100 mov AX, 3 int 10h mov AX, 0B832h mov ES, AX mov DI, 3999 ; start from the last row mov SI, 0 mov cx, 10 eti: mov AL, sir[SI] mov ES:[DI], AL inc SI dec DI ; decrement the index to display letters from bottom to top push si mov SI, 5000/55/5 sub note, 350 loop eti mov AH, 0Eh mov AL, '$' int 10h mov AH, 0Eh mov AL, msg[0] int 10h mov AH, 0Eh mov AL, msg[1] int 10h mov AH, 0Eh mov AL, msg[2] int 10h mov AH, 0Eh mov AL, msgKey[0] int 10h mov AH, 0Eh mov AL, msgKey[1] int 10h mov AH, 0Eh mov AL, msgKey[2] int 10h mov AH, 0Eh mov AL, msgKey[3] int 10h mov AH, 0Eh mov AL, msgKey[4] int 10h mov AH, 0Eh mov AL, msgKey[5] int 10h mov AH, 0 int 16h mov AH, 0Eh mov AL, msgLast[0] int 10h mov AH, 0Eh mov AL, msgLast[1] int 10h mov AH, 0Eh mov AL, msgLast[2] int 10h mov AH, 4Ch mov AL, 00h int 21h isr1Ch proc near push ax push bx push cx push dx in al, 61h or al, 00000011b out 61h, al mov al, 0B6h out 43h, al mov ax,word ptr freq out 42h, al mov al