A byte can be greater than 8 bits?

J

jacob navia

Martin said:
jacob:



Given you don't care about porting from one version of windows to the
next, it's hardly suprising you don't care about this.

Martin

????
lcc-win runs under
o windows 2000
o windows 98
o windows XP (32 and 64 bits)
o windows server 32 and 64 bits
o windows Vista (32 and 64 bits)

It even runs under windows ME!

Linux versions are available. You just speak without any
knowledge of what I am doing. Of course, it will not run
in your Honeywell... I am glad I saw the last one in 1987.

It was a weird machine, a clone of some GE machine that
accepted only a specific terminal, you couldn't use ASCII
and would ALWAYS give so many problems that we stopped all
support in 87, scrapped those terminals, and stopped
figuring out all this stuff. Of course, you may like it,
or your company likes it who knows. Here in France it
was mandatory in some environments since Bull was
*the* official French computer company and French taxpayers
continued pouring unknown amounts of money into those
obsolete systems.

Twenty years later GCOS is still hunting me. Gosh!
 
C

Charlie Gordon

Mike Smith said:
"-" is the command line prompt, "c * +go" invokes the compiler
and then runs the resulting output.

The hardware is Bull DPS9000 (a descendant of the Honeywell L66
range that was itself a descendant of the GE-600). The GCOS8 operating
system is still in active use today.

The current generation of Bull DSP9000 (NovaScale 9xxx) machines run Gcos8
in emulation mode on Intel Itanium 2 processors. Not exactly the old 36 bit
architecture anymore.
 
S

santosh

Keith said:
Kenneth Brody said:
Keith Thompson wrote: [...]
A small quibble: Putting C identifiers or keywords in all-caps for
emphasis is not a good idea. void is a keyword; VOID is an identifier
and could very plausibly be a macro name (for example, I've seen code
that conditionally uses ``#define VOID int'' for pre-ANSI
compatibility).

BTDTGTHF.

?

The closest expansion I could find was:

BTDTGTS - Been there, done that, got the T-shirt
 
J

jacob navia

Charlie said:
The current generation of Bull DSP9000 (NovaScale 9xxx) machines run Gcos8
in emulation mode on Intel Itanium 2 processors. Not exactly the old 36 bit
architecture anymore.

GCOS8 under emulation in an Itanium!

This can ONLY be possible at Bull. Of course they HAD to choose
the Itanic, they have chosen ALL weird architectures born dead
since 1982... or more!

If something is bad conceived, eventually Bull will buy it, that
is obvious. The Itanic is a total failure, and Bull will chose
it.
 
S

santosh

jacob said:
GCOS8 under emulation in an Itanium!

This can ONLY be possible at Bull. Of course they HAD to choose
the Itanic, they have chosen ALL weird architectures born dead
since 1982... or more!

If something is bad conceived, eventually Bull will buy it, that
is obvious. The Itanic is a total failure, and Bull will chose
it.

Is your repeated use of the misleading word "Itanic" for the
correct "Itanium" meant as a (bad) pun likening the fate of the "Itanic"
with that of the Titanic?
 
J

jacob navia

santosh said:
Is your repeated use of the misleading word "Itanic" for the
correct "Itanium" meant as a (bad) pun likening the fate of the "Itanic"
with that of the Titanic?

The Itanium sank...

Too heavy. It just couldn't stay afloat. It was a badly conceived
CPU whose complexity was so great that it couldn't be implemented
efficientely and at the end it is slower than the AMD64.

I did not start with that name. I think this honor goes to
"The register" english web site.
 
M

Martin Wells

jacob:
????
lcc-win runs under
o windows 2000
o windows 98
o windows XP (32 and 64 bits)
o windows server 32 and 64 bits
o windows Vista (32 and 64 bits)

It even runs under windows ME!

Linux versions are available. You just speak without any
knowledge of what I am doing.


I'm speaking of your experience with using int instead of size_t, and
the headache it caused you when you got truncation warning when you
ported to another windows version.

When I myself am writing code, I put in casts wherever I'm going to
get an obvious truncation warning. For instance:

#define MONTHS_IN_YEAR 12

char unsigned start_month = 4; /* A value in the range 0 through
11, 0 = Jan, 11 = Dec */

unsigned months_passed = 183; /* A value in the range 0 through
1800 */

char unsigned current_month = (char unsigned)(start_month +
months_passed % MONTHS_IN_YEAR)
/* Cast to suppress truncation warning */

Given the choice of
a) Using size_t
and
b) Using casts

, you chose neither, and ended up with 5 billion warning when you
compiled your code. Granted, the code may still have been portable,
but I'm sure you could have done without those redundant warnings.

Martin
 
C

Charlie Gordon

Martin Wells said:
jacob:



I'm speaking of your experience with using int instead of size_t, and
the headache it caused you when you got truncation warning when you
ported to another windows version.

When I myself am writing code, I put in casts wherever I'm going to
get an obvious truncation warning. For instance:

#define MONTHS_IN_YEAR 12

char unsigned start_month = 4; /* A value in the range 0 through
11, 0 = Jan, 11 = Dec */

unsigned months_passed = 183; /* A value in the range 0 through
1800 */

char unsigned current_month = (char unsigned)(start_month +
months_passed % MONTHS_IN_YEAR)
/* Cast to suppress truncation warning */

The need for these casts is a real pain. I'm glad gcc does not produce them
unless you specifically require them. In this particular case, I think your
computation is wrong, the line should read:

unsigned char current_month = (start_month + months_passed) %
MONTHS_IN_YEAR;

Written this way, it would not take a smart compiler to figure the result
should be in the range 0..11 and therefore always fits in an unsigned char.
Given the choice of
a) Using size_t
and
b) Using casts

, you chose neither, and ended up with 5 billion warning when you
compiled your code. Granted, the code may still have been portable,
but I'm sure you could have done without those redundant warnings.

Given the non-sensical choice made for win64 to have
sizeof(long)==sizeof(int)==4 and sizeof(size_t)==sizeof(long long)==8,
mixing int and size_t irresponsibly is not a wise choice.

Furthermore, I think there should be provision in the compiler to enable or
disable each individual warning, either with a command line switch, a
configuration file option or possibly a #pragma.
 
K

Kenneth Brody

Keith said:
Kenneth Brody said:
Keith Thompson wrote: [...]
A small quibble: Putting C identifiers or keywords in all-caps for
emphasis is not a good idea. void is a keyword; VOID is an identifier
and could very plausibly be a macro name (for example, I've seen code
that conditionally uses ``#define VOID int'' for pre-ANSI
compatibility).

BTDTGTHF.

?

It's my update to "BTDTGTTS":

Been There, Done That, Got The Header Files.

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:[email protected]>
 
C

CBFalconer

jacob said:
????
lcc-win runs under
o windows 2000
o windows 98
o windows XP (32 and 64 bits)
o windows server 32 and 64 bits
o windows Vista (32 and 64 bits)

It even runs under windows ME!

No it doesn't. I can't speak for other combinations, but W98 runs
on a '486. lcc-win32 does not.
 
C

CBFalconer

jacob said:
GCOS8 under emulation in an Itanium!

This can ONLY be possible at Bull. Of course they HAD to choose
the Itanic, they have chosen ALL weird architectures born dead
since 1982... or more!

If something is bad conceived, eventually Bull will buy it, that
is obvious. The Itanic is a total failure, and Bull will chose it.

Your opionion of Bulls attitude is not exactly topical on c.l.c.
The existance of systems running GCOS8 and executing C programs is.
 
J

jacob navia

CBFalconer said:
No it doesn't. I can't speak for other combinations, but W98 runs
on a '486. lcc-win32 does not.
lcc-win32 should run in windows 98 unless you use a 486
 
M

Martin Wells

Chqrlie:
In this particular case, I think your
computation is wrong, the line should read:

unsigned char current_month = (start_month + months_passed) %
MONTHS_IN_YEAR;


Well let's say that the starting month is April (i.e. 3), and that 14
months have passed. Therefore, the new month should be May (i.e. 5)

Taking *my* formula, we have:

start_month + months_passed % MONTHS_IN_YEAR
3 + 14 % 12
3 + 2
5

Taking *your* formula, we have:

(start_month + months_passed) % MONTHS_IN_YEAR
(3 + 14) % 12
17 % 2
5

Both work.

Written this way, it would not take a smart compiler to figure the result
should be in the range 0..11 and therefore always fits in an unsigned char.


....but the question is what proportion of compilers do it? For now I
think I'll stick to the casts.


Martin
 
C

Charlie Gordon

CBFalconer said:
No it doesn't. I can't speak for other combinations, but W98 runs
on a '486. lcc-win32 does not.

Come on, W98 does not run on a '486, it merely crawls there like a lame dog.
 
J

Jean-Marc Bourguet

Martin Wells said:
Chqrlie:



Well let's say that the starting month is April (i.e. 3), and that 14
months have passed. Therefore, the new month should be May (i.e. 5)

Let's take another example: the starting month is December ie 11 and 11
months have passed. Therefore the new month should be November (10).
Taking *my* formula, we have:

start_month + months_passed % MONTHS_IN_YEAR

11 + 11 % 12 = 11 + 11 = 22. Oops
Taking *your* formula, we have:

(start_month + months_passed) % MONTHS_IN_YEAR

(11 + 11) % 12 = 22 % 12 = 10
Both work.

Not on all inputs.

Yours,
 
C

CBFalconer

jacob said:
lcc-win32 should run in windows 98 unless you use a 486

That's not what you claimed. You apparently don't even know why it
doesn't run on a '486. You lost the ability in one of your
untested revisions years ago. The point is that your claims are
inaccurate, and cannot be trusted.
 
J

jacob navia

CBFalconer said:
That's not what you claimed. You apparently don't even know why it
doesn't run on a '486. You lost the ability in one of your
untested revisions years ago. The point is that your claims are
inaccurate, and cannot be trusted.

I told you thousand times that, Chuck but you will not
listen. I used the instruction xadd in the generated code
and that instruction is pentium only. This doesn't happen
in the compiler, if I remember correctly, but only in the debugger.

Since you did NOT want to pay me my consulting fees to backport
lcc-win32 to your 486 and you are the ONLY user of that backport
you will excuse me but I did not do it.

And you will complain the next 10 years, I know, but that's life
Chuck. No money, no work

:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top