Murugan.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  PHP   |  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 "ÚÄÄÄÃâââÃÆâ
ƒÂ¢Ã¢â‚¬Å¡Ã‚¬Ã¢â€žÂ¢ÃƒÆ’ƒâ€šÃ‚¢ÃƒÂ¢Ã¢â€šÂ¬Ã…¡Ã‚¬Ã…¡Ã‚¬Ã…¾ÃƒÆ’„ÄÄÄÃÆâÃÃâ€Å
¡ÃƒÆ’‚¢ÃƒÂ¢Ã¢â€šÂ¬Ã…¡Ã‚¬Ã¢â€žÂ¢ÃƒÆ’ƒâ€ Ã¢â‚¬â„¢ÃƒÆ’¢â‚¬Å¾ÃƒÆ’„ÄÄÃÃââââÃÂÃ