By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,852 Members | 2,240 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,852 IT Pros & Developers. It's quick & easy.

about BigEndian and LittleEndian

P: n/a
hi all,

I generate binary text file (in Windows using Dev-C++)
Is the generated binary file using BigEndian?
Are there any method to generate binary file using LittleEndian?
Because I want the generated binary file to be used in Palm, is it necessary
to do so ?
thanks!
Nov 13 '05 #1
Share this Question
Share on Google+
55 Replies


P: n/a
Sharon <sh************@hotmail.com> scribbled the following
on comp.lang.c:
hi all, I generate binary text file (in Windows using Dev-C++)
Is the generated binary file using BigEndian?
Mu.
"Endianness" only comes into play when you are treating multiple
consecutive bytes as a single number. In "binary text files", there
are no such numbers defined.
Or if there are, you didn't tell us how they are defined.
Are there any method to generate binary file using LittleEndian?
If it's strictly one-char-per-one-byte, then it is already both
LittleEndian and BigEndian.
Because I want the generated binary file to be used in Palm, is it necessary
to do so ?
If it's strictly one-char-per-one-byte, the exact same file will work
in both Windows and Palm.
thanks!


--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"War! Huh! Good God, y'all! What is it good for? We asked Mayor Quimby."
- Kent Brockman
Nov 13 '05 #2

P: n/a
"Sharon" <sh************@hotmail.com> wrote in
news:bp***********@news.hgc.com.hk:
I generate binary text file (in Windows using Dev-C++)
Is the generated binary file using BigEndian?
This is not a C question, but since x86 PCs are little-endian you can bet
an executable image would be little-endian.
Are there any method to generate binary file using LittleEndian?
Not a C question but you get little-endian on x86 based PCs.
Because I want the generated binary file to be used in Palm, is it
necessary to do so ?


Not a C question. Depending upon how the Palm's processor is configured
you may need big or little-endian. If you don't know you won't succeed.
Try comp.arch.embedded where this might be slightly more topical.

--
- Mark ->
--
Nov 13 '05 #3

P: n/a
"Mark A. Odell" <no****@embeddedfw.com> wrote in
news:Xn********************************@130.133.1. 4:
"Sharon" <sh************@hotmail.com> wrote in
news:bp***********@news.hgc.com.hk:
I generate binary text file (in Windows using Dev-C++)
Is the generated binary file using BigEndian?


This is not a C question, but since x86 PCs are little-endian you can
bet an executable image would be little-endian.


Where did I get executable image? More coffee...

--
- Mark ->
--
Nov 13 '05 #4

P: n/a
Sharon wrote:

hi all,

I generate binary text file (in Windows using Dev-C++)
What do you mean by a "binary text" file? C's I/O streams
operate in "text mode" or in "binary mode," and the two are
mutually exclusive: one or the other, but not both.
Is the generated binary file using BigEndian?
Perhaps, perhaps not. It depends on how you go about
"generating" it.
Are there any method to generate binary file using LittleEndian?
Yes. However, you seem so confused about more fundamental
issues that the explanation would probably be a waste of effort
at this point. Please review the notions of "binary" and "text"
streams, decide exactly what it is you want to do, and reformulate
your question accordingly.
Because I want the generated binary file to be used in Palm, is it necessary
to do so ?


I have no idea; sorry.

--
Er*********@sun.com
Nov 13 '05 #5

P: n/a
On Mon, 24 Nov 2003 15:24:53 +0000, Mark A. Odell wrote:
"Mark A. Odell" <no****@embeddedfw.com> wrote in
news:Xn********************************@130.133.1. 4:
"Sharon" <sh************@hotmail.com> wrote in
news:bp***********@news.hgc.com.hk:
I generate binary text file (in Windows using Dev-C++)
Is the generated binary file using BigEndian?


This is not a C question, but since x86 PCs are little-endian you can
bet an executable image would be little-endian.


Where did I get executable image? More coffee...


A binary text file? That can only refer to an executable image. You were
right after all.

For those that don't know, 'text' is also use as a (terribly confusing)
term for the code of a program as it is layed out in an executable file or
in memory.

M4

Nov 13 '05 #6

P: n/a
Martijn Lievaart <m@remove.this.part.rtij.nl> wrote in
news:pa****************************@remove.this.pa rt.rtij.nl:
I generate binary text file (in Windows using Dev-C++)
Is the generated binary file using BigEndian?

This is not a C question, but since x86 PCs are little-endian you can
bet an executable image would be little-endian.


Where did I get executable image? More coffee...


A binary text file? That can only refer to an executable image. You were
right after all.

For those that don't know, 'text' is also use as a (terribly confusing)
term for the code of a program as it is layed out in an executable file
or in memory.


Good point! .text is a typical name for the executable section of program.
Thanks.

--
- Mark ->
--
Nov 13 '05 #7

P: n/a
>>>>
"Sharon" <sh************@hotmail.com> wrote in message
news:bp***********@news.hgc.com.hk...
hi all,

I generate binary text file (in Windows using Dev-C++)
Is the generated binary file using BigEndian?
Are there any method to generate binary file using LittleEndian?
Because I want the generated binary file to be used in Palm, is it

necessary
to do so ?
thanks!

<<<<

You're targetting the Palm platform? Regardless of endian issues, the
binary image created for Windows won't run on a Palm. You might be
interested in the prc tool chain for Linux. Like Dev-C++, it's free:

http://www.palmos.com/dev/tools/gcc/

Okay, for fun and to keep this about C:

/* Returns 1 for little endian (e.g: Intel),
0 for big endian (e.g.:Motorola) */
int Endianness (void)
{
union
{
int anInteger;
char singleByte;
}endianTest;

endianTest.anInteger = 1;
return endianTest.singleByte;
}

This fragment was filched from Mongan and Suojanen's book, "Programming
Interviews Exposed."

--Mike Y.
Nov 13 '05 #8

P: n/a
On Mon, 24 Nov 2003 23:08:39 GMT, in comp.lang.c , "Mike Y."
<my**@mindspring.com> wrote:
You might be
interested in the prc tool chain for Linux. Like Dev-C++, it's free:

http://www.palmos.com/dev/tools/gcc/


FWIW this version of gcc also exists for Win32, and also creates palm
PRCs.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
Nov 13 '05 #9

P: n/a
Palm and Pentium families have different byte ordering. So you
will have to swap all 16, 32 and 64 bit numbers.

The following article should help:
http://www.eventhelix.com/RealtimeMa...ndOrdering.htm

Sandeep
--
http://www.EventHelix.com/EventStudio
EventStudio 2.0 - System Architecture Design CASE Tool
Nov 13 '05 #10

P: n/a
Martijn Lievaart wrote:

(snip)
Where did I get executable image? More coffee...

A binary text file? That can only refer to an executable image. You were
right after all.

For those that don't know, 'text' is also use as a (terribly confusing)
term for the code of a program as it is layed out in an executable file or
in memory.


IBM, at least, seems to like it. The S/360 object code files contain a
few different types of records, ESD (external symbol dictionary), RLD
(relocation dictionary), TXT (the instructions and data), and END (maybe
you can figure out that one). (There is a newer file format, but the
S/360 format is still in use.)

Under VM/CMS object files have the TEXT extension, and object libraries
are TXTLIB.

I suppose other systems also use similar names, but it can be confusing
sometimes.

-- glen

Nov 13 '05 #11

P: n/a

"EventHelix.com" <ev********@hotmail.com> ???
news:56**************************@posting.google.c om ???...
Palm and Pentium families have different byte ordering. So you
will have to swap all 16, 32 and 64 bit numbers.

The following article should help:
http://www.eventhelix.com/RealtimeMa...ndOrdering.htm
short and long convertion work fine, but how about double? any suggestion?

short convert_short(short in)
{
short out;
char *p_in = (char *) &in;
char *p_out = (char *) &out;
p_out[0] = p_in[1];
p_out[1] = p_in[0];
return out;
}

long convert_long(long in)
{
long out;
char *p_in = (char *) &in;
char *p_out = (char *) &out;
p_out[0] = p_in[3];
p_out[1] = p_in[2];
p_out[2] = p_in[1];
p_out[3] = p_in[0];
return out;
}
Sandeep
--
http://www.EventHelix.com/EventStudio
EventStudio 2.0 - System Architecture Design CASE Tool

Nov 13 '05 #12

P: n/a

"Eric Sosman" <Er*********@sun.com> ??? news:3F**************@sun.com ???...
Sharon wrote:

hi all,

I generate binary text file (in Windows using Dev-C++)
What do you mean by a "binary text" file? C's I/O streams
operate in "text mode" or in "binary mode," and the two are
mutually exclusive: one or the other, but not both.


sorry i mean binary file

Is the generated binary file using BigEndian?


Perhaps, perhaps not. It depends on how you go about
"generating" it.
Are there any method to generate binary file using LittleEndian?


Yes. However, you seem so confused about more fundamental
issues that the explanation would probably be a waste of effort
at this point. Please review the notions of "binary" and "text"
streams, decide exactly what it is you want to do, and reformulate
your question accordingly.
Because I want the generated binary file to be used in Palm, is it necessary to do so ?


I have no idea; sorry.

--
Er*********@sun.com

Nov 13 '05 #13

P: n/a
EventHelix.com <ev********@hotmail.com> scribbled the following
on comp.lang.c:
Palm and Pentium families have different byte ordering. So you
will have to swap all 16, 32 and 64 bit numbers.


But you don't have to swap 24, 40, 48 or 56 bit numbers?

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Nothing lasts forever - so why not destroy it now?"
- Quake
Nov 13 '05 #14

P: n/a
On Tue, 25 Nov 2003 14:37:13 +0800, Sharon wrote:
short and long convertion work fine, but how about double? any suggestion?


Doubles are not standarised by C or C++. You'll have to look at the
documentation for the source and target platform and see if this can at
all be done (easily) first. If both use the same format (most use IEEE),
it is a simple matter of looking at the docs for the respective
processors/platforms and/or writing some simple testprograms.

If both don't use the same format, search for some 3rd party lib to
convert from one format to the other, or write your own. Your, still stuck
with the endiannes then, but that should be a minor annoyance if you
really hit this problem.

HTH,
M4
Nov 13 '05 #15

P: n/a
double and floating point numbers are represented as
sign bit, followed by exponent and then the fraction part.

If the double is presented as a 64 bit number, swapping it
would be on the same lines as the swapping of a 64 bit integer.

Hope this helps.

Sandeep
--
http://www.EventHelix.com/EventStudio
EventStudio 2.0 - System Architecture Design CASE Tool
Nov 13 '05 #16

P: n/a
EventHelix.com <ev********@hotmail.com> scribbled the following
on comp.lang.c:
double and floating point numbers are represented as
sign bit, followed by exponent and then the fraction part.
Says who?
If the double is presented as a 64 bit number, swapping it
would be on the same lines as the swapping of a 64 bit integer.


Says who?

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Parthenogenetic procreation in humans will result in the founding of a new
religion."
- John Nordberg
Nov 13 '05 #17

P: n/a
"Mr. Ger" <as******@none.none> wrote:
Sharon <sh************@hotmail.com> scribbled the following
on comp.lang.c:
hi all,

I generate binary text file (in Windows using Dev-C++)
Is the generated binary file using BigEndian?


Mu.


Please speak English and not Finnish in English groups please.


'Mu' (at least in this case) isn't Finnish; it is a Zen reply,
with the approximate meaning: "The only way to know the answer
to this question is not asking this question.", or, in short:
"I am un-asking your question."

Regards
--
Irrwahn
(ir*******@freenet.de)
Nov 13 '05 #18

P: n/a
Irrwahn Grausewitz <ir*******@freenet.de> wrote:
"Mr. Ger" <as******@none.none> wrote:
Sharon <sh************@hotmail.com> scribbled the following
on comp.lang.c:

> I generate binary text file (in Windows using Dev-C++)
> Is the generated binary file using BigEndian?

Mu.


Please speak English and not Finnish in English groups please.


'Mu' (at least in this case) isn't Finnish; it is a Zen reply,


FS(H)VO Zen.

Richard
Nov 13 '05 #19

P: n/a
Joona I Palaste <pa*****@cc.helsinki.fi> wrote:
EventHelix.com <ev********@hotmail.com> scribbled the following
on comp.lang.c:
double and floating point numbers are represented as
sign bit, followed by exponent and then the fraction part.


Says who?


Well, the Standard says that FP numbers are represented as those parts.
It says nothing about the order they're in, though.

Richard
Nov 13 '05 #20

P: n/a
rl*@hoekstra-uitgeverij.nl (Richard Bos) wrote:
Irrwahn Grausewitz <ir*******@freenet.de> wrote:
"Mr. Ger" <as******@none.none> wrote:
Joona wrote:
> Mu.

Please speak English and not Finnish in English groups please.


'Mu' (at least in this case) isn't Finnish; it is a Zen reply,


FS(H)VO Zen.


???
--
Irrwahn
(ir*******@freenet.de)
Nov 13 '05 #21

P: n/a
In <bp**********@oravannahka.helsinki.fi> Joona I Palaste <pa*****@cc.helsinki.fi> writes:
EventHelix.com <ev********@hotmail.com> scribbled the following
on comp.lang.c:
Palm and Pentium families have different byte ordering. So you
will have to swap all 16, 32 and 64 bit numbers.


But you don't have to swap 24, 40, 48 or 56 bit numbers?


Joona, what's the point in posting to a thread where you have absolutely
nothing to contribute?

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #22

P: n/a
In <bp***********@news.hgc.com.hk> "Sharon" <sh************@hotmail.com> writes:
short and long convertion work fine, but how about double? any suggestion?


Both platforms use the same floating point format, but the byte order has
to be reversed. This can be trivially achieved using two pointers to
unsigned char.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #23

P: n/a
"Joona I Palaste" <pa*****@cc.helsinki.fi> wrote in message
news:bp**********@oravannahka.helsinki.fi...
EventHelix.com <ev********@hotmail.com> scribbled the following
on comp.lang.c:
Palm and Pentium families have different byte ordering. So you
will have to swap all 16, 32 and 64 bit numbers.


But you don't have to swap 24, 40, 48 or 56 bit numbers?

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Nothing lasts forever - so why not destroy it now?"
- Quake

You have an example of a platform and O/S that only uses 3, 5, 6 or 7 bytes
for (multi-byte) binary numbers?
Nov 13 '05 #24

P: n/a
In <2_Awb.225969$ao4.817994@attbi_s51> glen herrmannsfeldt <ga*@ugcs.caltech.edu> writes:
Martijn Lievaart wrote:

(snip)
Where did I get executable image? More coffee...

A binary text file? That can only refer to an executable image. You were
right after all.

For those that don't know, 'text' is also use as a (terribly confusing)
term for the code of a program as it is layed out in an executable file or
in memory.


IBM, at least, seems to like it. The S/360 object code files contain a
few different types of records, ESD (external symbol dictionary), RLD
(relocation dictionary), TXT (the instructions and data),

^^^^^^^^^^^^^^^^^^^^^^^^^
Isn't it instructions and *read-only* data?
and END (maybe you can figure out that one).


It's also common Unix terminology:

fangorn:~/tmp 217> size a.out
text data bss dec hex filename
855 220 24 1099 44b a.out

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #25

P: n/a
On Tue, 25 Nov 2003 13:45:37 +0100, Irrwahn Grausewitz
<ir*******@freenet.de> wrote:
"Mr. Ger" <as******@none.none> wrote:
> Sharon <sh************@hotmail.com> scribbled the following
> on comp.lang.c:
>> hi all,
>
>> I generate binary text file (in Windows using Dev-C++)
>> Is the generated binary file using BigEndian?
>
> Mu.


Please speak English and not Finnish in English groups please.


'Mu' (at least in this case) isn't Finnish; it is a Zen reply,
with the approximate meaning: "The only way to know the answer
to this question is not asking this question.", or, in short:
"I am un-asking your question."


Another way it is used is with the meaning: "Your question assumes
something that is not the case, and so is unaswerable."

Sincerely,

Gene Wirchenko

Nov 13 '05 #26

P: n/a
On Tue, 25 Nov 2003 15:45:45 GMT, "squig"
<sq************@midsouth.rr.com> wrote:
"Joona I Palaste" <pa*****@cc.helsinki.fi> wrote in message
news:bp**********@oravannahka.helsinki.fi...
EventHelix.com <ev********@hotmail.com> scribbled the following
on comp.lang.c:
> Palm and Pentium families have different byte ordering. So you
> will have to swap all 16, 32 and 64 bit numbers.


But you don't have to swap 24, 40, 48 or 56 bit numbers?

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Nothing lasts forever - so why not destroy it now?"
- Quake

You have an example of a platform and O/S that only uses 3, 5, 6 or 7 bytes
for (multi-byte) binary numbers?


If the mantissa portion counts as a multi-byte binary number,
then yes, quite a few. If (and that is a rather big if) IRC,
Commodore had a 6-byte floating point format. That was for their
BASIC.

Sincerely,

Gene Wirchenko

Nov 13 '05 #27

P: n/a
On Tue, 25 Nov 2003 15:45:45 +0000, squig wrote:
"Joona I Palaste" <pa*****@cc.helsinki.fi> wrote in message
news:bp**********@oravannahka.helsinki.fi...
EventHelix.com <ev********@hotmail.com> scribbled the following
on comp.lang.c:
> Palm and Pentium families have different byte ordering. So you
> will have to swap all 16, 32 and 64 bit numbers.


But you don't have to swap 24, 40, 48 or 56 bit numbers?

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Nothing lasts forever - so why not destroy it now?"
- Quake

You have an example of a platform and O/S that only uses 3, 5, 6 or 7 bytes
for (multi-byte) binary numbers?


No, but I know one that uses 60 bit words (and 6 bit characters) :-)

M4

Nov 13 '05 #28

P: n/a

"Gene Wirchenko" <gw**************@CAPITALSwencomine.com> wrote in message
news:mn********************************@4ax.com...
On Tue, 25 Nov 2003 13:45:37 +0100, Irrwahn Grausewitz
<ir*******@freenet.de> wrote:
"Mr. Ger" <as******@none.none> wrote:
> Sharon <sh************@hotmail.com> scribbled the following
> on comp.lang.c:
>> hi all,
>
>> I generate binary text file (in Windows using Dev-C++)
>> Is the generated binary file using BigEndian?
>
> Mu.

Please speak English and not Finnish in English groups please.


'Mu' (at least in this case) isn't Finnish; it is a Zen reply,
with the approximate meaning: "The only way to know the answer
to this question is not asking this question.", or, in short:
"I am un-asking your question."


Another way it is used is with the meaning: "Your question assumes
something that is not the case, and so is unaswerable."


So why not the English word 'moot'?

-Mike
Nov 13 '05 #29

P: n/a
On Tue, 25 Nov 2003 17:57:15 GMT, "Mike Wahler"
<mk******@mkwahler.net> wrote:

"Gene Wirchenko" <gw**************@CAPITALSwencomine.com> wrote in message
news:mn********************************@4ax.com.. .
On Tue, 25 Nov 2003 13:45:37 +0100, Irrwahn Grausewitz
<ir*******@freenet.de> wrote:
>"Mr. Ger" <as******@none.none> wrote:
>
>> > Sharon <sh************@hotmail.com> scribbled the following
>> > on comp.lang.c:
>> >> hi all,
>> >
>> >> I generate binary text file (in Windows using Dev-C++)
>> >> Is the generated binary file using BigEndian?
>> >
>> > Mu.
>>
>> Please speak English and not Finnish in English groups please.
>
>'Mu' (at least in this case) isn't Finnish; it is a Zen reply,
>with the approximate meaning: "The only way to know the answer
>to this question is not asking this question.", or, in short:
>"I am un-asking your question."


Another way it is used is with the meaning: "Your question assumes
something that is not the case, and so is unaswerable."


So why not the English word 'moot'?


There are two relevant definitions of "moot". They are
practically opposites. From dictionary.com:
"Subject to debate; arguable: a moot question."
"Of no practical importance; irrelevant."
It would be a most unsafe word to use in this context!

Sincerely,

Gene Wirchenko

Nov 13 '05 #30

P: n/a
"Gene Wirchenko" <gw**************@CAPITALSwencomine.com> wrote in message
news:hr********************************@4ax.com...
Another way it

[the word 'Mu']
is used is with the meaning: "Your question assumes something that is not the case, and so is unaswerable."
So why not the English word 'moot'?


There are two relevant definitions of "moot". They are
practically opposites. From dictionary.com:
"Subject to debate; arguable: a moot question."


I've never heard of this definition before.
"Of no practical importance; irrelevant."
This is the only meaning I was aware of.
It would be a most unsafe word to use in this context!


English can indeed often be a 'slippery' language. :-)

-Mike
Nov 13 '05 #31

P: n/a
In <pa****************************@remove.this.part.r tij.nl> Martijn Lievaart <m@remove.this.part.rtij.nl> writes:
On Tue, 25 Nov 2003 15:45:45 +0000, squig wrote:
"Joona I Palaste" <pa*****@cc.helsinki.fi> wrote in message
news:bp**********@oravannahka.helsinki.fi...
EventHelix.com <ev********@hotmail.com> scribbled the following
on comp.lang.c:
> Palm and Pentium families have different byte ordering. So you
> will have to swap all 16, 32 and 64 bit numbers.

But you don't have to swap 24, 40, 48 or 56 bit numbers?

You have an example of a platform and O/S that only uses 3, 5, 6 or 7 bytes
for (multi-byte) binary numbers?


No, but I know one that uses 60 bit words (and 6 bit characters) :-)


And no genuine bytes at all, so byte swapping is a non issue ;-)
One of the most C-unfriendly platforms, BTW.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #32

P: n/a
On Tue, 25 Nov 2003 18:25:14 GMT, "Mike Wahler"
<mk******@mkwahler.net> wrote:
"Gene Wirchenko" <gw**************@CAPITALSwencomine.com> wrote in message
news:hr********************************@4ax.com.. .
>> Another way it
[the word 'Mu']
is used is with the meaning: "Your question assumes
>> something that is not the case, and so is unaswerable."
>
>So why not the English word 'moot'?


There are two relevant definitions of "moot". They are
practically opposites. From dictionary.com:
"Subject to debate; arguable: a moot question."


I've never heard of this definition before.


It is the original definition.
"Of no practical importance; irrelevant."


This is the only meaning I was aware of.
It would be a most unsafe word to use in this context!


English can indeed often be a 'slippery' language. :-)


Quite.

1) After she dusted the shelves, she went for a walk to see the
trees dusted in snow.

2) Did you sanction the sanctions against Iraq?

Sincerely,

Gene Wirchenko

Nov 13 '05 #33

P: n/a
In <hr********************************@4ax.com> Gene Wirchenko <gw**************@CAPITALSwencomine.com> writes:
On Tue, 25 Nov 2003 17:57:15 GMT, "Mike Wahler"
<mk******@mkwahler.net> wrote:

"Gene Wirchenko" <gw**************@CAPITALSwencomine.com> wrote in message
news:mn********************************@4ax.com. ..
On Tue, 25 Nov 2003 13:45:37 +0100, Irrwahn Grausewitz
<ir*******@freenet.de> wrote:

>"Mr. Ger" <as******@none.none> wrote:
>
>> > Sharon <sh************@hotmail.com> scribbled the following
>> > on comp.lang.c:
>> >> hi all,
>> >
>> >> I generate binary text file (in Windows using Dev-C++)
>> >> Is the generated binary file using BigEndian?
>> >
>> > Mu.
>>
>> Please speak English and not Finnish in English groups please.
>
>'Mu' (at least in this case) isn't Finnish; it is a Zen reply,
>with the approximate meaning: "The only way to know the answer
>to this question is not asking this question.", or, in short:
>"I am un-asking your question."

Another way it is used is with the meaning: "Your question assumes
something that is not the case, and so is unaswerable."


So why not the English word 'moot'?


There are two relevant definitions of "moot". They are
practically opposites. From dictionary.com:
"Subject to debate; arguable: a moot question."
"Of no practical importance; irrelevant."
It would be a most unsafe word to use in this context!


While the dictionary is correct, in general, it is dead wrong in the
context of "moot question", which means a question rendered irrelevant
by other arguments. I've never seen it used with any other meaning.

Typical example of moot question, picked from comp.std.c: does the
standard require EXIT_SUCCESS to be defined as zero?

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #34

P: n/a
In <e8******************@newsread1.news.pas.earthlink .net> "Mike Wahler" <mk******@mkwahler.net> writes:
English can indeed often be a 'slippery' language. :-)


Perversely slippery, even.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #35

P: n/a
"Mike Wahler" <mk******@mkwahler.net> writes:
"Gene Wirchenko" <gw**************@CAPITALSwencomine.com> wrote in message
news:hr********************************@4ax.com...
> Another way it


[the word 'Mu']
is used is with the meaning: "Your question assumes
> something that is not the case, and so is unaswerable."

So why not the English word 'moot'?


There are two relevant definitions of "moot". They are
practically opposites. From dictionary.com:
"Subject to debate; arguable: a moot question."


I've never heard of this definition before.


Perhaps you've heard the phrase "moot court"?

In any case, it's a moot point (by either definition).

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
(Note new e-mail address)
Nov 13 '05 #36

P: n/a
Da*****@cern.ch (Dan Pop) wrote:
Gene Wirchenko <gw**************@CAPITALSwencomine.com> writes:
"Mike Wahler" wrote:
"Gene Wirchenko" wrote...
On Tue, 25 Nov 2003 13:45:37 +0100, Irrwahn Grausewitz wrote:
>"Mr. Ger" <as******@none.none> wrote:
>> > Sharon <sh************@hotmail.com> scribbled the following:
>> >> I generate binary text file (in Windows using Dev-C++)
>> >> Is the generated binary file using BigEndian?
>> >
>> > Mu.
>>
>> Please speak English and not Finnish in English groups please.
>
>'Mu' (at least in this case) isn't Finnish; it is a Zen reply,
>with the approximate meaning: "The only way to know the answer
>to this question is not asking this question.", or, in short:
>"I am un-asking your question."

Another way it is used is with the meaning: "Your question assumes
something that is not the case, and so is unaswerable."

So why not the English word 'moot'?
There are two relevant definitions of "moot". They are
practically opposites. From dictionary.com:
"Subject to debate; arguable: a moot question."
"Of no practical importance; irrelevant."
It would be a most unsafe word to use in this context!


While the dictionary is correct, in general, it is dead wrong in the
context of "moot question", which means a question rendered irrelevant
by other arguments. I've never seen it used with any other meaning.


Oxford Advanced Learner's Dictionary
of Current English, Third Edition:

*moot* /adj/ (only in) ~ point/question, one
about which there is uncertainty. /vt/ raise
or bring forward for discussion: /This question
has been ~ed again./
Typical example of moot question, picked from comp.std.c: does the
standard require EXIT_SUCCESS to be defined as zero?


Surely, for some people seem to be uncertain about it. ;-)

HTH
Regards
--
Irrwahn
(ir*******@freenet.de)
Nov 13 '05 #37

P: n/a
On 25 Nov 2003 19:52:42 GMT, Da*****@cern.ch (Dan Pop) wrote:
In <e8******************@newsread1.news.pas.earthlink .net> "Mike Wahler" <mk******@mkwahler.net> writes:
English can indeed often be a 'slippery' language. :-)


Perversely slippery, even.


And oddly perverse even.

It is a fascinating language, but even tricky at times for a
native-speaker (I am one).

Sincerely,

Gene Wirchenko

Nov 13 '05 #38

P: n/a
On 25 Nov 2003 19:48:36 GMT, Da*****@cern.ch (Dan Pop) wrote:

[snip]
While the dictionary is correct, in general, it is dead wrong in the
context of "moot question", which means a question rendered irrelevant
by other arguments. I've never seen it used with any other meaning.
I have, though granted, the original usage is now rare. The term
has become, what some--alt.usage.english for some--call, skunked.
Because of the contrary meanings, it has become unsafe to use if one
wishes precision and exactness.
Typical example of moot question, picked from comp.std.c: does the
standard require EXIT_SUCCESS to be defined as zero?


Sincerely,

Gene Wirchenko

Nov 13 '05 #39

P: n/a
On Tue, 25 Nov 2003 18:25:14 GMT, in comp.lang.c , "Mike Wahler"
<mk******@mkwahler.net> wrote:
"Gene Wirchenko" <gw**************@CAPITALSwencomine.com> wrote in message
news:hr********************************@4ax.com.. .

"Subject to debate; arguable: a moot question."


I've never heard of this definition before.


FWIW this is the /only/ common meaning I've head of.
"Of no practical importance; irrelevant."


This is the only meaning I was aware of.


Whereas this is not what moot means as far as I'm concerned.

Of course. we're excluding the old english moot meaning a meeting
place. As in Entmoot fwiw.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
Nov 13 '05 #40

P: n/a
Gene Wirchenko wrote:
<ir*******@freenet.de> wrote:
"Mr. Ger" <as******@none.none> wrote:
> Sharon <sh************@hotmail.com> scribbled the following
>
>> I generate binary text file (in Windows using Dev-C++)
>> Is the generated binary file using BigEndian?
>
> Mu.

Please speak English and not Finnish in English groups please.


'Mu' (at least in this case) isn't Finnish; it is a Zen reply,
with the approximate meaning: "The only way to know the answer
to this question is not asking this question.", or, in short:
"I am un-asking your question."


Another way it is used is with the meaning: "Your question
assumes something that is not the case, and so is unaswerable."


Or, as has often arisen over the bridge table, at a suitable point
in play:

Nu?

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 13 '05 #41

P: n/a
On Tue, 25 Nov 2003 19:25:40 +0000, Dan Pop wrote:
In <pa****************************@remove.this.part.r tij.nl> Martijn
Lievaart <m@remove.this.part.rtij.nl> writes:
On Tue, 25 Nov 2003 15:45:45 +0000, squig wrote:
"Joona I Palaste" <pa*****@cc.helsinki.fi> wrote in message
news:bp**********@oravannahka.helsinki.fi...
EventHelix.com <ev********@hotmail.com> scribbled the following on
comp.lang.c:
> Palm and Pentium families have different byte ordering. So you will
> have to swap all 16, 32 and 64 bit numbers.

But you don't have to swap 24, 40, 48 or 56 bit numbers?

You have an example of a platform and O/S that only uses 3, 5, 6 or 7
bytes for (multi-byte) binary numbers?


No, but I know one that uses 60 bit words (and 6 bit characters) :-)


And no genuine bytes at all, so byte swapping is a non issue ;-) One of
the most C-unfriendly platforms, BTW.


One thing that actually had me wondering for years. Is there a C compiler
for a CYBER-CDC? If so, how complient is it?

M4
Nov 13 '05 #42

P: n/a

"Dan Pop" <Da*****@cern.ch> wrote in message
news:bq**********@sunnews.cern.ch...
In <hr********************************@4ax.com> Gene Wirchenko <gw**************@CAPITALSwencomine.com> writes:
On Tue, 25 Nov 2003 17:57:15 GMT, "Mike Wahler"
<mk******@mkwahler.net> wrote:

There are two relevant definitions of "moot". They are
practically opposites. From dictionary.com:
"Subject to debate; arguable: a moot question."
"Of no practical importance; irrelevant."
It would be a most unsafe word to use in this context!


While the dictionary is correct, in general, it is dead wrong in the
context of "moot question", which means a question rendered irrelevant
by other arguments. I've never seen it used with any other meaning.

Typical example of moot question, picked from comp.std.c: does the
standard require EXIT_SUCCESS to be defined as zero?


I don't think it's wrong at all. The only place I've come across
"moot question" used in that sense is comp.lang.c; and each time
I've thought "what a strange usage".
Nov 13 '05 #43

P: n/a
CBFalconer wrote:
Gene Wirchenko wrote:
<ir*******@freenet.de> wrote:
>"Mr. Ger" <as******@none.none> wrote:
>> > Sharon <sh************@hotmail.com> scribbled the following
>> >
>> >> I generate binary text file (in Windows using Dev-C++)
>> >> Is the generated binary file using BigEndian?
>> >
>> > Mu.
>>
>> Please speak English and not Finnish in English groups please.
>
>'Mu' (at least in this case) isn't Finnish; it is a Zen reply,
>with the approximate meaning: "The only way to know the answer
>to this question is not asking this question.", or, in short:
>"I am un-asking your question."


Another way it is used is with the meaning: "Your question
assumes something that is not the case, and so is unaswerable."


Or, as has often arisen over the bridge table, at a suitable point
in play:


Is that in Nu Trump play?

--
Chris "electric hedgehog" Dollin
C FAQs at: http://www.faqs.org/faqs/by-newsgrou...mp.lang.c.html
C welcome: http://www.angelfire.com/ms3/bchambl...me_to_clc.html
Nov 13 '05 #44

P: n/a
Dan Pop wrote:
In <2_Awb.225969$ao4.817994@attbi_s51> glen herrmannsfeldt <ga*@ugcs.caltech.edu> writes:
(snip)
IBM, at least, seems to like it. The S/360 object code files contain a
few different types of records, ESD (external symbol dictionary), RLD
(relocation dictionary), TXT (the instructions and data),


^^^^^^^^^^^^^^^^^^^^^^^^^
Isn't it instructions and *read-only* data?


Static data. Initialized static variables would likely go there. Well,
the Fortran compilers I used to use only had static variables. I would
expect C static external variables also, though I never looked to see.

(I do remember initializing large Fortran arrays to zero and generating
large object decks.)

If the program is linked as reentrant, it could be stored in read only
pages.
and END (maybe you can figure out that one).

It's also common Unix terminology: fangorn:~/tmp 217> size a.out
text data bss dec hex filename
855 220 24 1099 44b a.out
I don't think I ever knew what bss stands for.
Dan


Nov 13 '05 #45

P: n/a
glen herrmannsfeldt wrote:
Dan Pop wrote:
It's also common Unix terminology:

fangorn:~/tmp 217> size a.out
text data bss dec hex filename
855 220 24 1099 44b a.out


I don't think I ever knew what bss stands for.


"Block started by symbol", according to Dennis Ritchie:
<news:3B*****************************@ifi.uio.no >.

Jeremy.
Nov 13 '05 #46

P: n/a

"Keith Thompson" <ks***@mib.org> wrote in message news:ln************@nuthaus.mib.org...
| "Mike Wahler" <mk******@mkwahler.net> writes:
| > "Gene Wirchenko" <gw**************@CAPITALSwencomine.com> wrote in message
| > news:hr********************************@4ax.com...

[snip]

| Perhaps you've heard the phrase "moot court"?

[snip]

No, but I've heard of a guy named "bull' in night court ;-).

Cheers.
Chris Val
Nov 13 '05 #47

P: n/a
In <sl*******************@hehe.cl.cam.ac.uk> Jeremy Yallop <je****@jdyallop.freeserve.co.uk> writes:
glen herrmannsfeldt wrote:
Dan Pop wrote:
It's also common Unix terminology:

fangorn:~/tmp 217> size a.out
text data bss dec hex filename
855 220 24 1099 44b a.out


I don't think I ever knew what bss stands for.


"Block started by symbol", according to Dennis Ritchie:


And, IIRC, it was introduced by an IBM assembler, which supported it as
a directive, along with BES, "block ended by symbol". Back in the late
fifties or so.

The Unix semantics is: uninitialised data segment.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #48

P: n/a
Da*****@cern.ch (Dan Pop) wrote in news:bq**********@sunnews.cern.ch:
I don't think I ever knew what bss stands for.


"Block started by symbol", according to Dennis Ritchie:


And, IIRC, it was introduced by an IBM assembler, which supported it as
a directive, along with BES, "block ended by symbol". Back in the late
fifties or so.

The Unix semantics is: uninitialised data segment.


Which I always thought was a misnomer as the block is zeroed. I suppose it
means the programmer did not initialize items in this segment.

--
- Mark ->
--
Nov 13 '05 #49

P: n/a
In <Xn********************************@130.133.1.4> "Mark A. Odell" <no****@embeddedfw.com> writes:
Da*****@cern.ch (Dan Pop) wrote in news:bq**********@sunnews.cern.ch:
I don't think I ever knew what bss stands for.

"Block started by symbol", according to Dennis Ritchie:
And, IIRC, it was introduced by an IBM assembler, which supported it as
a directive, along with BES, "block ended by symbol". Back in the late
fifties or so.

The Unix semantics is: uninitialised data segment.


Which I always thought was a misnomer as the block is zeroed.


The idea is that there is no image for this segment in the executable
file. It comes already zeroed by the OS, as any piece of memory obtained
from the OS, for obvious security reasons.
I suppose it
means the programmer did not initialize items in this segment.


Anything initialised to all zeroes *by default* gets there. If you
initialise to all zeroes explicitly, the stuff goes into the data
segment and actually increases the executable size. At least, this is
what gcc is doing:

fangorn:~/tmp 262> cat default.c
int a[10000];

int main()
{
return 0;
}
fangorn:~/tmp 263> gcc default.c
fangorn:~/tmp 264> ls -l a.out
-rwxr-xr-x 1 danpop sysprog 13214 Nov 26 17:10 a.out*
fangorn:~/tmp 265> size a.out
text data bss dec hex filename
839 220 40032 41091 a083 a.out
fangorn:~/tmp 266> cat explicit.c
int a[10000] = {0};

int main()
{
return 0;
}
fangorn:~/tmp 267> gcc explicit.c
fangorn:~/tmp 268> ls -l a.out
-rwxr-xr-x 1 danpop sysprog 53263 Nov 26 17:11 a.out*
fangorn:~/tmp 269> size a.out
text data bss dec hex filename
839 40240 24 41103 a08f a.out

I certainly didn't expect that!

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #50

55 Replies

This discussion thread is closed

Replies have been disabled for this discussion.