The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: NUMBSKULL2 on January 31, 2009, 09:53:10 PM

Title: Keyboard freezes
Post by: NUMBSKULL2 on January 31, 2009, 09:53:10 PM
Hello
The program listed below runs just fine when it is run as a stand alone.
When the program is debugged and a breakpoint is inserted at the line shown, the GRDB debugger freezes up. The message is printed fine; yet the program freezes when the keyboard routine is called. Any ideas ?








   TITLE hello
        .8086
        .MODEL small
         DOSSEG
        .STACK 100h
        .DATA   
message   DB   "Enter character from keyboard",13,10
lmessage EQU $ - message

          .CODE
start:    mov ax, @DATA
          mov ds,ax
          mov bx,1
          mov cx,lmessage
          mov dx,OFFSET message
          mov ah,40h
          int 21h          ; print message to console
          mov ah,08h                       
          int 21h          ; get character from keyboard           
          mov ax, 4C00h    ; BreakPoint placed here.
          int 21h
      END start
     
      
end start
   
Title: Re: Keyboard freezes
Post by: dedndave on March 20, 2009, 02:22:20 PM
that shouldn't be a problem
try placing a NOP between the INT 21h and MOV AX,4C00h instructions
apply the BP to the MOV instruction as you are now
my thinking is, it may not like returning from an INT 21h call into a BP