China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 05:45
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Automatically run after receiving character 1 from the serial port? View 960 Replies 2
Original Poster Posted 2004-02-19 00:00 ·  中国 四川 成都 中国科学院光电技术研究所
初级用户
Credits 189
Posts 21
Joined 2003-11-23 00:00
22-year member
UID 13227
Gender Male
Status Offline
Under DOS, how can I make my self-written 1.exe run automatically after receiving the character 1 sent over the serial port?
What if there are also 2.exe and 3.exe? If I use TC to write a serial port program, that would be another EXE file too, right???
Floor 2 Posted 2004-02-19 00:00 ·  中国 四川 成都 中国科学院光电技术研究所
初级用户
Credits 189
Posts 21
Joined 2003-11-23 00:00
22-year member
UID 13227
Gender Male
Status Offline
Under DOS, how can I make my self-written 1.exe run automatically after receiving the character 1 sent over the serial port?
What if there are also 2.exe and 3.exe? If I use TC to write a serial port program, that would be another EXE file too, right???
What I want is to use the host machine's serial port to control the lower machine. After the lower machine receives a character, it executes the corresponding self-written executable file. After booting up, the lower machine should not need any manual control and should stay at the DOS prompt. The serial port program would basically have to do the equivalent of typing 1.exe and pressing Enter at the DOS prompt, but then this serial port program is itself an independent program. If I use a batch file to go to this serial port program COM.EXE, would that work? Could some expert try writing a program???
Floor 3 Posted 2004-02-26 00:00 ·  中国 广东 广州 海珠区 电信
初级用户
Credits 152
Posts 10
Joined 2004-02-24 00:00
22-year member
UID 18295
Gender Male
Status Offline
You just need to write a serial port receiving program. After it receives the filename sent by the host machine, it can go to the corresponding directory and execute the program.
Forum Jump: