;Author: Darlene Joyce B. Yango ;Date; September 8,2009 ;Set-up Section .Model small .Stack 100 .286 ;Data Section .DATA txt db "*$" txt1 db "Press ESC$" txt2 db "to quit$" r1 db 0 c1 db 0 r2 db 15 c2 db 79 color db 15 x db 0 y db 37 ;Code Section .Code START: ;Set DS Register Mov AX,@DATA Mov DS,AX ;clrscr call cls ;asterisk Mov CX,10 prt: call goxy ;Print Text Mov AH,9 Lea DX,txt Int 21H add x,2 add y,1 loop prt ;asterisk Mov CX,10 prt1:
call goxy Mov AH,9 Lea DX,txt1 Int 21H add x,2 sub y,1 loop prt1 ;asterisk Mov CX,10 prt2: call goxy Mov AH,9 Lea DX,txt2 Int 21H sub x,2 sub y,1 loop prt2 ;asterisk Mov CX,10 prt3: call goxy Mov AH,9 Lea DX,txt2 Int 21H sub x,2 add y,1 loop prt3 ;asterisk Mov x,20 Mov y,24 Mov CX,10 prt4: call goxy Mov AH,9 Lea DX,txt2 Int 21H
add y,2 loop prt4 ;call cls Mov r1,13 Mov c1,32 Mov r2,18 Mov c2,42 Mov color,143 call cls ;call cls Mov r1,23 Mov c1,32 Mov r2,27 Mov c2,42 Mov color,143 call cls ;Position txt1 Mov x,15 Mov y,33 call goxy ;Print txt1 Mov AH,9 Lea DX,txt1 Int 21H ;Position txt2 Mov x,24 Mov y,34 call goxy ;Print txt1 Mov AH,9 Lea DX,txt2 Int 21H ;get keypress Mov AH,1 Int 21H ;Position Mov x,23 Mov y,0 call goxy ;Exit to DOS
Mov AH,4CH Int 21H ;Procedure cls proc near pusha Mov AH,6 Mov AL,0 Mov BH,color Mov CH.r1 Mov CL,c1 Mov DH,r2 Mov DL,c2 Int 10H popa ret cls endp ;Procedure goxy proc near pusha Mov AH,2 Mov BH,0 Mov DH,x Mov DL,y Int 10H popa ret goxy endp ;End program End start