I have a device that sends and receives data via a COM port (actually
this is a serial USB device).
Right now I use Terminal to read and send data to-and-fro.
I want to make this a bit more professional. :-)
The data from the device must be stored in a file that I can use later
to analyse.
The perfect way should be to import the data right in Excel, but this
doesn't seems so simple.
A batch file that stores the data in a file would be great to start
with.
I will make the device so that it listens on it's com port to a
certain command. This command can be a single string like "b".
When the device receives the "g" it waits a few moments and the starts
to send it's data until it is done. Maybe I can make the device to
send an "end" string.
So what I need is a batch that starts to send a string every few
moments. If there is no reply from "the device", it waits and sends
the string again.
If the device is awake and receives the "begin" string, it changes
from listening to sending.
It sends its buffer like three bytes like this:
017 125 205
018 125 127
019 125 011
020 001 017
The batch should just write these lines to a csv-file and at the end
quit.
Anyone an idea??
>I have a device that sends and receives data via a COM port (actually
>this is a serial USB device).
>
>So what I need is a batch that starts to send a string every few
>moments. If there is no reply from "the device", it waits and sends
>the string again.
>
>If the device is awake and receives the "begin" string, it changes
>from listening to sending.
>It sends its buffer like three bytes like this:
>017 125 205
>018 125 127
>019 125 011
>020 001 017
>
>The batch should just write these lines to a csv-file and at the end
>quit.
>
>Anyone an idea??
I think Qbasic or maybe WSH or another HLL is the way to go.
Batch can't do it TTBOMK.
--
Regards,
Mic
>>The batch should just write these lines to a csv-file and at the end
>>quit.
>>
>>Anyone an idea??
>
>I think Qbasic or maybe WSH or another HLL is the way to go.
>Batch can't do it TTBOMK.
Thanks, I'll look into it!
> I think Qbasic or maybe WSH or another HLL is the way to go. Batch can't
> do it TTBOMK.
ECHO can send strings to COM ports, but ends each line with CRLF. There
are utilities that output just the given string without the CRLF. I have
used PRINTF.exe for that sort of thing. The syntax is
echo string> COM1:
The : seems to be necessary.
--
Ted Davis (tda...@mst.edu)
It can't read the serial port though, which is what the OP wanted to do.
--
Regards,
Mic
>It can't read the serial port though, which is what the OP wanted to do.
Thanks both of you, yes my goal is to communicate between the port and
the device.
Still all help is welcome!
If the device can be made to send a ^Z when finished, I think you can
redirect the COM port to a file, or perhaps use it in a FOR /f, though
I'm not quite sure what the syntax would be. It's been *many* years
since I had to do this sort of thing, but I used to communicate between
DOS2 and CP/M PCs by reading and writing the com ports from the command
line and/or batch files (I don't remember the details, except that I had
to set up the DOS COM port with MODE).
--
Ted Davis (tda...@mst.edu)
I can "see" the COM port with the MODE command, but I don't see how I
can read/write with it...
Redirection to write to it (say named as com4) ...
echo Data sent to com port> com4
To read from it, try (as suggested by Ted) ...
for /f "tokens=* delims=" %%a in (COM4) do call :Sub "%%a"
goto :EOF
:SUB
:: For example ...
echo FROM COM4: %~1
I don't 'know' that the latter approach will work. It's just the
first thing to try. Note that the last character sent through the
COM4 port might well need to be Ctrl-Z to indicate the end of the
file, but I have no easy way of testing that assertion.
_____________________
Tom Lavedas
The colon may be necessary (COM4: instead of COM4).
I can't test either because I still haven't managed to get a replacement
MB - the last vendor said he was checking if they had it in stock, but
never wrote back one way or the other. I could probably use a different
MB as long as I *knew* it would run XP ... and if I could find the
original OEM CD (which is not where it should be). I could set up a test
(I know how to make null modem cables, and might even have one left over
from ages ago), but testing between two Linux machines would not help at
all.
--
Ted Davis (tda...@mst.edu)
Oh my!!
I'm going to test it later today, if this work..... oh my!!!!
Thanks all of you! :-)
>> echo string> COM1:
> It can't read the serial port though, which is what the OP wanted to
> do.
Doesn't this still work?
TYPE COM1: >file
I don't have anything to plug in so I can't verify it for myself.
Frank
So far I've got these:
Set up the communication with COM9
MODE COM9:19200,N,8,1,P
This returns the status for the COM9 port.
How can I check the error code so I can check if the device is ready?
If I disconnect the device and try to setup the communication, DOS
returns a message that the device is not valid.
ECHO "b" > COM9
This is the signal the device needs to start sending data.
I've set the device that it just starts sending data after it received
a "b" (for Begin).
This works, the device starts sending data after DOS sends this "b".
When I open hyperterminal to read the data from the device and try to
send the "b", DOS answers that connection to the device is refused.
Because another application uses the COM9 connection.
This I want to check too in the batch file to check for errors.
TYPE COM9: >c:\fromserial.csv
This one is tricky.
When I issue this sometimes it doesn't do anything, sometimes it
works.
This is because the device sends data every 5 seconds, this is how its
programmed right now.
Later I will change this but I can't change the device right now.
What I want to become is a combination of these commands in a batch
file that checks every step of the way if everything is still working.
The ultimate goal is to get it work as follow:
Setup the settings for the device and check if this is successful.
(mode com9...)
After pressing the "b" on the keyboard, send the begin signal to the
device (and check if the connection is made (if not send an error
message to the DOS screen and terminate the connection)).
After the start signal is issued and successful accepted by the
device, begin listening to the device and check the data.
The data will be in this format:
1,120,17
2,11,125
So three bytes separated by a comma and a carriage return (or new
line)
The device will start sending zero's when there is no more data.
So if the received data is
2,11,125
0,0,0
0,0,0
0,0,0
The batch should end the connection by sending a stop signal to the
device.
echo "e" > com9
(e stands for END)
So the batch should listen for a serie of zero-bytes.
I don't care how many zero-bytes it checks before it sends the "e"
(end) signal.
Maybe 10 series of 3 zero's?
With all these, do you think it's possible to make something that
going to work and is a bit robust?
I'm not an expert in batch, you guys have already helped me well.
I thank you all again for al previous and future help with this
project.
Thanks guys!!!
>"foxidrive" news:t4ql56h0949unrrlf...@4ax.com...
>
>>> echo string> COM1:
>
>> It can't read the serial port though, which is what the OP wanted to
>> do.
>
>Doesn't this still work?
>
> TYPE COM1: >file
I've never seen the com port used for reading. Maybe it can but I don't
have a com port to check.
>I don't have anything to plug in so I can't verify it for myself.
To the OP:
You want to read some control characters which is going to make it even
harder.
If the COM port is sending something in this format, it will make it
more complex because the COM port is not sending a CR/LF or Control Z to
signal EOL or EOF.
byte byte byte null null null
--
Regards,
Mic
Thanks Foxydrive!
I've tried it, see my post from yesterday.
It works, I can send and receive bytes.
This is all I need.
The way I need it to work is described in my post I did yesterday.
Now is the real challenge to make a batchfile with the things that
work.. Again I could use some help :-s
>I've tried it, see my post from yesterday.
>It works, I can send and receive bytes.
>This is all I need.
>
>The way I need it to work is described in my post I did yesterday.
>Now is the real challenge to make a batchfile with the things that
>work.. Again I could use some help :-s
Can you run these three and zip up the three csv files and post them
someplace? I need to see the output to be able to write a batch.
@echo off
MODE COM9:19200,N,8,1,P
echo b> com9
TYPE COM9: >c:\fromserial1.csv
echo e> com9
pause
@echo off
MODE COM9:19200,N,8,1,P
echo b> com9
for /f "delims=," %%a in ('TYPE COM9:') do echo %%a>>c:\fromserial2.csv
echo e> com9
pause
@echo off
MODE COM9:19200,N,8,1,P
echo b> com9
for /f "delims=" %%a in ('TYPE COM9:') do echo %%a>>c:\fromserial3.csv
echo e> com9
pause
--
Regards,
Mic
Great work Foxy,
Here is the zipped file with the return of the batch files.
http://rapidshare.com/files/411826440/fromserial.zip
MD5: F6198A0BD14A6089747F98ED60064EF9
And here in Rar-format
http://rapidshare.com/files/411825854/fromserial.rar
MD5: 67C4C8106F1FB8A4F8A41FF82A9CDF51
I noticed that the *.csv files must exist before the begin "b" signal
is send.
If they don't exist the batch is beyond the point of reading the
device before the *.csv files are generated on my PC.
The output in the csv files are random generated, they always end with
7 timer three 0 bytes.
Thanks you
This is all untested:
It should tell you if no data has beeen received and abort.
It will check for a single case of 0,0,0 and abort the transfer.
What it doesn't do at this stage is verify that the com port has been
setup correctly, but it should say "The COM port is not responding"
anyway and abort.
@echo off
set "file=c:\fromserial3.csv"
MODE COM9:19200,N,8,1,P
rem.>"%file%"
echo b> com9
for /f "delims=" %%a in ('TYPE COM9: 2^>nul') do (
if not "%%a"=="0,0,0" echo %%a>>"%file%"
if "%%a"=="0,0,0" goto :next
)
:next
for %%a in ("%file%") do if %%~za EQU 0 (
echo The COM port is not responding
del "%file%" 2>nul
pause
goto :EOF
)
echo e> com9
echo The capture has ended
echo Any data captured should be in "%file%"
pause
--
Regards,
Mic
Great thanks Foxy,
Is this right? I numbered the lines just to ask if there isn't a line
cut in two.
The problem is that now it only receives the first line of code
(0,1,9<LF><CR>), and then hangs.
The bytes come in one by one, so for the 0,0,0<LF><CR> this means that
the batch will see "0" then "," again "0", then "," and so on.
Never 0,0,0.
So it should search for several 0's followed by comma's and a
<LF><CR>.
Can this be done with the batch?
[1] @echo off
[2] set "file=c:\fromserial3.csv"
[3] MODE COM9:19200,N,8,1,P
[4] rem.>"%file%"
[5] echo b> com9
[6]
[7] for /f "delims=" %%a in ('TYPE COM9: 2^>nul') do (
[8] if not "%%a"=="0,0,0" echo %%a>>"%file%"
[9] if "%%a"=="0,0,0" goto :next
[10] )
[11] :next
[12]
[13] for %%a in ("%file%") do if %%~za EQU 0 (
[14] echo The COM port is not responding
[15] del "%file%" 2>nul
[16] pause
[17] goto :EOF
[18] )
[19]
[20] echo e> com9
[21] echo The capture has ended
[22] echo Any data captured should be in "%file%"
[23] pause
>Is this right? I numbered the lines just to ask if there isn't a line
>cut in two.
No, I think it's ok.
>The problem is that now it only receives the first line of code
>(0,1,9<LF><CR>), and then hangs.
>
>The bytes come in one by one, so for the 0,0,0<LF><CR> this means that
>the batch will see "0" then "," again "0", then "," and so on.
>Never 0,0,0.
I've had a closer look at the files - there is no CR/LF but only a LF.
Try this - the code is the same but the MORE command is added in the
forindo command.
Depending on how the bytes are processed by the forindo it may still
need work. As I see it each set of 5 bytes "1,2,3" will be delimited by
a CR/LF and then should processed as a unit - but see what happens
anyway.
@echo off
set "file=c:\fromserial3.csv"
MODE COM9:19200,N,8,1,P
rem.>"%file%"
echo b> com9
for /f "delims=" %%a in ('TYPE COM9: 2^>nul^ |more') do (
if not "%%a"=="0,0,0" echo %%a>>"%file%"
if "%%a"=="0,0,0" goto :next
)
:next
for %%a in ("%file%") do if %%~za EQU 0 (
echo The COM port is not responding
del "%file%" 2>nul
pause
goto :EOF
)
echo e> com9
echo The capture has ended
echo Any data captured should be in "%file%"
pause
--
Regards,
Mic
> I numbered the lines just to ask if there isn't a line cut in two.
The convention here is to indent real lines two spaces and let them wrap
- anything against the left margin belongs to the line above.
--
Ted Davis (tda...@mst.edu)
Thank you Foxy, but still it won't work..
After I removed the space before "|more" it does something more, but
still doesn't write to the csv file.
Is there an other possibility?
Maybe if we could tell the batch to capture a certain amount of data?
Let's say 1000 times the serie x,x,x<LF><CR>?
And then end?
This way I maybe get a file with a few hundred 0,0,0, but I could
filter them out later?
So make the batch more simpel by just send the "b" and then capture
series for a certain number of times? After that send the "e" to the
device.
Maybe later we could find a way to search in the CSV for series 0,0,0
(like with GAWK), and delete them?
Maybe this would be more successfully?
I appreciate al your help!
Still not sure about the conventions for breaking up lines.
All lines in my newsreader start at the left most side.
>On Mon, 09 Aug 2010 22:12:23 +0200, test wrote:
>
>> I numbered the lines just to ask if there isn't a line cut in two.
>
>The convention here is to indent real lines two spaces and let them wrap
>- anything against the left margin belongs to the line above.
Thanks Ted, but in my newsreader every line starts at the left most
side, never any spacing before a line.
When did Agent start doing that? It's not like them to do that ...
unless there is an HTML mode - HTML for newsgroups is a Microsoft
invention; it is not standard ... not according to RFC977 (NNTP defining
RFC).
--
Ted Davis (tda...@mst.edu)
> After I removed the space before "|more" it does something more, but
> still doesn't write to the csv file.
What does it do??
Try this and tell me what is written to the file.
@echo off
set "file=c:\fromserial3.csv"
MODE COM9:19200,N,8,1,P
rem.>"%file%"
echo b> com9
for /f "delims=" %%a in ('TYPE COM9: 2^>nul ^|more') do (
echo %%a>>"%file%"
)
:next
for %%a in ("%file%") do if %%~za EQU 0 (
echo The COM port is not responding
del "%file%" 2>nul
pause
goto :EOF
)
echo e> com9
echo The capture has ended
echo Any data captured should be in "%file%"
pause
> Still not sure about the conventions for breaking up lines.
> All lines in my newsreader start at the left most side.
I don't indent my code unless it is longer than 76ish characters.
--
Regards,
Mic
It writes absolutly nothing to the file.
I can see that the device is triggered, but the batchfile ends before
all data is send.
The file is created but stays empty.
If I receive the data via a serial port monitor it looks like this:
b
0,1,9<LF>
1,2,8<LF>
2,3,7<LF>
3,4,6<LF>
4,5,5<LF>
5,6,4<LF>
6,7,3<LF>
0,0,0<LF>
0,0,0<LF>
0,0,0<LF>
0,0,0<LF>
0,0,0<LF>
0,0,0<LF>
0,0,0<LF>
Could it be a timing problem?
Try this and tell me what is written to the file.
@echo off
set "file=c:\fromserial3.csv"
MODE COM9:19200,N,8,1,P
rem.>"%file%"
echo b> com9
for /f "delims=" %%a in ('TYPE COM9: 2^>nul') do (
echo %%a>>"%file%"
)
echo e> com9
pause
>
>It writes absolutly nothing to the file.
>I can see that the device is triggered, but the batchfile ends before
>all data is send.
>The file is created but stays empty.
>If I receive the data via a serial port monitor it looks like this:
>
>b
>0,1,9<LF>
>1,2,8<LF>
>2,3,7<LF>
>3,4,6<LF>
>4,5,5<LF>
>5,6,4<LF>
>6,7,3<LF>
>0,0,0<LF>
>0,0,0<LF>
>0,0,0<LF>
>0,0,0<LF>
>0,0,0<LF>
>0,0,0<LF>
>0,0,0<LF>
>
>Could it be a timing problem?
Maybe. Try the code above - it essentially is the same as the code you
created the test files with, and also the same as yesterday but with the
MORE command removed.
--
Regards,
Mic
Frank
It again writes nothing to the CSV-file.
The for /f... line is broken just behind (
The next line starts with echo %%
I always think that there may be something wrong with broken lines in
my newsreader.
The batch sends the "b" signal to the device (I can tell from the
LED's that light), but then waits.
The batch seems to listen for ever for data, but never receives them.
I have to close the batch manually otherwise it will keep running.
In a serial port monitor the data appear instantly to the screen and
file if I let it write to a file..
>>Could it be a timing problem?
>
>Maybe. Try the code above - it essentially is the same as the code you
>created the test files with, and also the same as yesterday but with the
>MORE command removed.
I could invoke a pause in the device before sending data if this would
solve the problem.
Because the batch keeps waiting after issueing the "b" (and the device
tells me that that de data is send), I put a pause of 2 seconds to the
device after receiving the "b" and start sending the data.
Still the batch keeps hanging, seems to listen for data...
Oh, thanks Frank,
How would I use this in the batch created by Foxy?
It is possible that the com port is sending on STDERR so try the
following modification. I removed the 2>nul item from the forindo
command.
@echo off
set "file=c:\fromserial3.csv"
MODE COM9:19200,N,8,1,P
rem.>"%file%"
echo b> com9
for /f "delims=" %%a in ('TYPE COM9:') do (
echo %%a>>"%file%"
)
echo e> com9
pause
You can try this too but I think the copy command will need a control Z
to terminate the copy.
@echo off
set "file=c:\fromserial3.csv"
MODE COM9:19200,N,8,1,P
rem.>"%file%"
echo b> com9
for /f "delims=" %%a in ('COPY /B COM9: CON:') do (
echo %%a>>"%file%"
)
echo e> com9
pause
--
Regards,
Mic
for /f "delims=" %%a in ('TYPE COM9: 2^>nul') do (
echo %%a>>"%file%"
)
>The for /f... line is broken just behind (
>The next line starts with echo %%
>I always think that there may be something wrong with broken lines in
>my newsreader.
As an example the code above is indented and the middle line does indeed
start with "echo %%a"
The ( and ) allow multiple commands on individual lines.
--
Regards,
Mic
No, still the same.
Strange that a few days ago these tests worked.
The serial monitor works like a charm, only the batch won't work :-s
Pardon me for butting in here, but it seems to me the problem may lie
in the fact that the batch procedure is waiting for an end-of-file. I
do not think the FOR actually processes anything until it has finished
'reading' the file. That's the problem with doing this in the 'batch'
environment. It works to 'send' stuff to a port, but is just not well
endowed with things to read from them. If the device can be made to
send Control-Zs, then you might get something to work. Otherwise, I'd
look around for a scriptable serial terminal program.
___________________________
Tom Lavedas
Hey thanks for your input!
Do you mean that the device should send a Control-Z.
Is that an particular ASCII command?
I've added the SUB byte at the end
b
0,1,9<LF>
1,2,8<LF>
2,3,7<LF>
3,4,6<LF>
4,5,5<LF>
5,6,4<LF>
6,7,3<LF>
0,0,0<LF>
0,0,0<LF>
0,0,0<LF>
0,0,0<LF>
0,0,0<LF>
0,0,0<LF>
0,0,0<LF>
<SUB>
Do any of the scripts work with that in place?
--
Regards,
Mic
It's an ASCII code 26 decimal.
_________________________
Tom Lavedas
I'm going to test them all again, but what would be the best way to
send them?
Now I send
byte-comma-byte-comma-byte<LF><CR>
byte-comma-byte-comma-byte<LF><CR>
zero-comma-zero-comma-zero<LF><CR>
<SUB>
Is there a better way to send the data??
Is there a way to send first a control byte after sending the "b" from
within the batch?
Maybe a kind of handshaking between the device and the batch?
>I'm going to test them all again, but what would be the best way to
>send them?
>
>Now I send
>
>byte-comma-byte-comma-byte<LF><CR>
>byte-comma-byte-comma-byte<LF><CR>
>zero-comma-zero-comma-zero<LF><CR>
><SUB>
It should be <CR><LF> with the CR first.
>Is there a better way to send the data??
That may work with the control Z. The version with the copy command may
even work but remove the /B from the line.
>Is there a way to send first a control byte after sending the "b" from
>within the batch?
I'm not sure what you mean.
>Maybe a kind of handshaking between the device and the batch?
You'd need to use a High Level Language.
--
Regards,
Mic
> Hey thanks for your input!
> Do you mean that the device should send a Control-Z. Is that an
> particular ASCII command?
Recognition of ^Z as end of file applies to text, not binary files, and
goes back to DOS 1. A lot of really stupid thing still present in
Windows DOS enulators date back to DOS 1 and were not 'best practice'
even then.
My understand of the inner workings is that binary files are not parsed
for control characters and are managed by their length field in the file
control block while text files (based on the file name extension) were
parsed for control characters and reading stopped when ^z was encountered
(I think writing would continue to the end of the allocation unit, but
just garbage). Serial devices were handled like text files by
COMMAND.COM's built-in data handling processes (text files and COM ports
are character oriented - disks and binary files are block oriented).
One would have hoped this strange behavior would have gone away with
COMMAND.COM, but A lot of DOS 1 is still there in CMD.EXE.
--
Ted Davis (tda...@mst.edu)
I've been punishing my brain all day, I found some things that weren't
100% good and adapted them.
Now when I run this:
@echo off
set "file=c:\fromserial3.csv"
MODE COM6:19200,N,8,1,P
rem.>"%file%"
echo b> COM6
for /f "delims=" %%a in ('COPY COM6: CON:') do (
echo %%a>>"%file%"
)
echo e> COM6
pause
I get a csv-file that says " 1 file(s) copied"
This means that things start to work, that's great.
But now only find how I can add the data instead of the message that
one file was copied.
And maybe the test for 0,0,0 ?
Thanks for your patience with me!
Does the TYPE command one work any differently?
--
Regards,
Mic
That returns an empty csv file (0 byte).
Something has changed - try these three again to see if they create and
data.
@echo off
MODE COM6:19200,N,8,1,P
echo b> COM6
TYPE COM6: >c:\fromserial1.csv
echo e> COM6
pause
@echo off
MODE COM6:19200,N,8,1,P
echo b> COM6
for /f "delims=," %%a in ('TYPE COM6:') do echo %%a>>c:\fromserial2.csv
echo e> COM6
pause
@echo off
MODE COM6:19200,N,8,1,P
echo b> COM6
for /f "delims=" %%a in ('TYPE COM6:') do echo %%a>>c:\fromserial3.csv
echo e> COM6
pause
--
Regards,
Mic
COM port is opened
In/out queue size 8192/8192
Baud rate 2400
DTR on
Data bits=8, Stop bits=1, Parity=None
Set chars: Eof=0x00, Error=0x00, Break=0x00, Event=0x00, Xon=0x11,
Xoff=0x13
Handflow: ControlHandShake=(DTR_CONTROL, CTS_HANDSHAKE, ERROR_ABORT),
FlowReplace=(TRANSMIT_TOGGLE, RTS_HANDSHAKE, XOFF_CONTINUE),
XonLimit=80, XoffLimit=200
Set timeouts: ReadInterval=10, ReadTotalTimeoutMultiplier=0,
ReadTotalTimeoutConstant=0, WriteTotalTimeoutMultiplier=0,
WriteTotalTimeoutConstant=5000
b
0,1,15,1,2,16, [len=164]
<LF><SUB>
eb
0,1,15,1,2,16, [len=16]
<LF><SUB>
e
Purge the serial port: RXABORT, TXABORT
-----------------------------------------------------------------------------------------------------------------------
When I run the same with the batch I get this
COM port is opened
COM port is closed
COM port is opened
Baud rate 2400
Data bits=8, Stop bits=1, Parity=None
Set chars: Eof=0x00, Error=0x00, Break=0x00, Event=0x00, Xon=0x11,
Xoff=0x13
Handflow: ControlHandShake=(DTR_HANDSHAKE, CTS_HANDSHAKE,
DSR_HANDSHAKE, ERROR_ABORT), FlowReplace=(TRANSMIT_TOGGLE,
RTS_HANDSHAKE, XOFF_CONTINUE), XonLimit=80, XoffLimit=200
COM port is closed
COM port is opened
COM port is closed
COM port is opened
b [len=1]
<LF>
COM port is closed
COM port is opened
COM port is closed
COM port is opened
COM port is closed
COM port is opened
COM port is closed
COM port is opened
e [len=1]
<LF>
COM port is closed
-----------------------------------------------------------------------------------------------------------------------
Should the batch turn the DTR parameter on?
I know this is beginning to turn into a strange post, but I hope this
will ever work..
The Mode command has these switches:
Serial port: MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s]
[to=on|off] [xon=on|off] [odsr=on|off]
[octs=on|off] [dtr=on|off|hs]
[rts=on|off|hs|tg] [idsr=on|off]
How can I turn the DTR on the same line as the baud settings?
Thanks you all!
>Recognition of ^Z as end of file applies to text, not binary files, and
>goes back to DOS 1. A lot of really stupid thing still present in
>Windows DOS enulators date back to DOS 1 and were not 'best practice'
>even then.
I believe that it goes back further, to CP/M, in which only the file
size in 128-byte sectors was recorded, with ^Z being used at least when
text did not fill a sector. One wonders why they did not just fill the
sector with NUL characters.
--
(c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 7.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Command-prompt MiniTrue is useful for viewing/searching/altering files. Free,
DOS/Win/UNIX now 2.0.6; see <URL:http://www.merlyn.demon.co.uk/pc-links.htm>.
> I believe that it goes back further, to CP/M, in which only the file
> size in 128-byte sectors was recorded, with ^Z being used at least when
> text did not fill a sector. One wonders why they did not just fill the
> sector with NUL characters.
I'm pretty sure that correct - CP/M to QDOS to MS/PC DOS. Since I have
had no contact with CPM in over twenty years, never did get all that far
into it, and I didn't trust my memory that far back, I omitted mention of
both CP/M and QDOS.
--
Ted Davis (tda...@mst.edu)
> How would I use this in the batch created by Foxy?
I don't have the time to examine that script and I have only been
skimming through the messages. I added the above suggestion only because
I happened to see a comment on some trouble with an error message. It
occurred to me that COPY might produce conditions which eliminated that
trouble -- or perhaps conditions which reduced the trouble, I don't
know -- so I offered the suggestion in case someone wanted to
invistigate. I didn't think this much of an explanation would be
necesary.
Frank
[...]
> null modem cables
Just thinking aloud here... would be nifty to setup
up a a connection to an older computer dedicated to
error logging:
foo 2> COM
--
later on,
Mike