From: Wolfgang Kern on

"�ar�nas Kazlauskas" asked:
> ... or how do you know you've reached the end of txt file?

Whenever the file pointer points beyond the given range ? ...
given by the text-file size or any defined end-mark ...

__
wolfgang



From: Rod Pemberton on

"Rod Pemberton" <do_not_have(a)nohavenot.cmm> wrote in message
news:fhrjsh$oeb$1(a)aioe.org...
>
> "Sarunas Kazlauskas" <referas(a)gmail.com> wrote in message
> news:a95a6122-3ebc-42a6-bbdf-0cb7ebfb5fc9(a)l22g2000hsc.googlegroups.com...
> > what ascii symbol stands for EOF in windows based systems?
> > ... or how do you know you've reached the end of txt file?
> >
>
> Somewhat vague... What are you trying to do? When are you having the
> problem? For a function? For a program? Which assembly or Windows
> functions are a problem?
>
> For functions, the function that is reading data will return a special
value
> or flag indicating that the end-of-file has been reached. The file's
length
> information is stored as part of the filesystem. For C based functions, a
> special value called EOF in stdio.h is returned from functions that read
> data. IIRC, it can be any integer value that doesn't correspond to a
value
> in the acceptable range of signed or unsigned char, i.e., typically it is
a
> larger integer size say 16 or 32-bit value, but a char is typically
smaller,
> such as 8-bits, and the larger value exceeds 8-bits. Commonly, it is all
> bits 1 for the default integer size (also known as -1), i.e., 0xFF for
> 16-bit, 0xFFFF for 32-bits. But, this value isn't stored in the file as
> ASCII. It's generated by the function when there is no more input from
the
> filesystem.
>
> For programs, ctrl-Z will terminate input with some programs. A byte
value
> of zero, 0x00, will sometimes terminate output when binary data is being
> displayed - depending on the program. Some Windows editors will recognize
a
> byte value of zero as EOF which will terminate reading further data from
the
> file. Unix style programs under Windows programs might recognize ctrl-C,
> ctrl-D, ctrl-\, ctrl-break, ctrl-M, etc. to terminate input or output.
>
>

Note to self: I'm really unsure why other posters have assumed the OP was
asking about an ASCII character used as part of the filesystem in an
assembly language programming group instead of an ASCII character returned
from some function called via assembly... If the OP's question was too
vague for me to tell what he was talking about, how can they be so sure?
Did they just follow Frank's lead since he posted first?


Rod Pemberton

From: Phil Carmody on
Terence <tbwright(a)cantv.net> writes:
> Ctl-Z is the correct indication for ascii entry from a keyboard to
> indicate end of manula entry.

Ctrl-Z in the ASCII standard in use when CP/M and DOS
were being designed is the SUB (substitute) character,
used to indicate that the character was read/received
with some kind of error (e.g. parity error), and this
is a placeholder. There were plenty of "end of <blah>"
characters in ASCII, but 26 wasn't one of them.

Phil
--
Dear aunt, let's set so double the killer delete select all.
-- Microsoft voice recognition live demonstration
From: Phil Carmody on
"Rod Pemberton" <do_not_have(a)nohavenot.cmm> writes:
> "Rod Pemberton" <do_not_have(a)nohavenot.cmm> wrote in message
> news:fhrjsh$oeb$1(a)aioe.org...
> >
> > "Sarunas Kazlauskas" <referas(a)gmail.com> wrote in message
> > news:a95a6122-3ebc-42a6-bbdf-0cb7ebfb5fc9(a)l22g2000hsc.googlegroups.com...
> > > what ascii symbol stands for EOF in windows based systems?
> > > ... or how do you know you've reached the end of txt file?
>
> Note to self: I'm really unsure why other posters have assumed the OP was
> asking about an ASCII character used as part of the filesystem in an
> assembly language programming group instead of an ASCII character returned
> from some function called via assembly...

Very good point. One may lead to the other, but the
two are distinct. One would hope, if one is permitted
to juggle eras and platforms, that if ^Z is used on
the filesystem for that purpose, that EOF, outside
the range of ASCII, would be returned from getc(3),
for example, rather than ^Z itself.

Phil
--
Dear aunt, let's set so double the killer delete select all.
-- Microsoft voice recognition live demonstration
From: Charles Crayne on
On 20 Nov 2007 03:45:39 +0200
Phil Carmody <thefatphil_demunged(a)yahoo.co.uk> wrote:

> Ctrl-Z in the ASCII standard in use when CP/M and DOS
> were being designed is the SUB (substitute) character,
> used to indicate that the character was read/received
> with some kind of error (e.g. parity error), and this
> is a placeholder. There were plenty of "end of <blah>"
> characters in ASCII, but 26 wasn't one of them.

The Dos 2.00 reference manual has this to say about that:

"Combining files is normally performed in text (or ASCII) mode. That
is, the first Ctrl-A (hex 1A) character in the file is interpreted as
an end-of-file mark."

-- Chuck