Murugan.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



8086 Assembly Language Press Any Key to Continue Dialog

Home   8086   8086 Assembly Language Press Any Key to Continue Dialog         


Similar to a message box. here is a smile text mode code to display a message box or dialog box . till a key is pressed. ideally prompt the user for a keypress

kbhit proc near
   push ax bx cx dx 
   mov cx,delaytime
   push cx
   mov delaytime,1                   ;Requires attrf attrb row coloumn
   cmp kbshadow,0                       
   je shad_no12
   inc row
   inc row
   mov si,offset key_0a
   inc coloumn
   mov bh,attrf
   push bx
   mov bl,attrb
   mov attrf,bl
   call typestring
   inc row
   call typestring
   inc row
   call typestring
   dec row
   dec row
   dec row
   dec row
shad_no12:
   pop bx
   mov attrf,bh
   dec coloumn
   mov si,offset key_1a
   inc row
   call typestring
   mov si,offset key_2a
   inc row
   call typestring
   mov si,offset key_3a
   inc row
   call typestring
   mov ah,00
   int 16h
   pop cx
   mov delaytime,cx
   pop dx cx bx ax
   ret
endp        
key_0a db "                                   $"
key_1a db "ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿$"
key_2a db "³ Press any key to continue ..... ³$"
key_3a db "ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ$"
attrf db 155
attrb db 165
kbshadow db 0






  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam