MODE COM2:9600,N,8,1,P
RESET51 LPT1
SLEEP 9600
ASEM %1
ECHO U >COM2
COPY %1.HEX COM2
ECHO G 8000 >COM2
In this example, serial I/O is done over serial port COM2, and the target
system can be reset over printer port LPT1.
First of all, the serial port COM2 is initialized to the desired baudrate
of 9600 Baud, 8 data bits, 1 stop bit, and no parity with the MODE
utility.
Then the RESET51 program provided is executed to reset the target
system via printer port LPT1. After that, the SLEEP program waits
until
When finished, the
Finally the application program is started at address 8000H with the command
To test an application program
TEST51 MYPROG
at the DOS prompt, and see what you get.
Of course this was only a minimized example! In general you will not only
have to modify serial port, baudrate, reset port, and start address for
your local requirements, but also to do something for plausibility checking
and error handling.
For this, the more sophisticated batch file
A program
BOOT MYPROG