Sunday, October 5, 2014

Auto Run Debug Command with Script

The DOS debug.exe is a good utility to learn basic x68 Assembly language because we don't need to compile and link an ASM file and we just run it directly by entering commands. Sometimes we want to keep our interesting commands in a script file and automatically run it again with debug. How do we do it?

We can use a redirection (<) to read script file instead of the console. For example,

Please create script.txt that has the following lines:

a100
db 0a,0b,0c,0d,0e,0f
mov al,4
lea bx,[100]
xlat
(Enter to make a blank line)
t=106
t2
q
(please press Enter to make a blank line)

Please run the command.

debug < script.txt

Below is the result:


-Count


No comments:

Post a Comment