the following script works fine if I type it line-by-line in debug. When I copy it to a file called script.txt, it hangs up after ‘enter 3 numbers’. I run it like so:
D:>debug < script.txt
the file is:
a mov cx, 3 jmp 0119 db 0d,0a,'enter 3 numbers',0d,0a,'$' mov dx, 0105 mov ah, 09 int 21h mov ah, 01 int 21h and al, 0f add bl, al mov dl, 0a mov ah, 02 int 21h loop 0120 jmp 013a db 0d,0a,'sum: ','$' mov dx,0132 mov ah, 09 int 21h or bl, 30 mov dl, bl mov ah, 02 int 21h mov ax, 4c00 int 21h g
what am I doing wrong? Any hints or links appreciated. keith
You redirected input to debug to be from the script, not from the console, so debug is never receiving your keystrokes The program is hanging, waiting for more data to come in from the script.
If you put 3 numbers after the ‘g’ in the script, it should continue