Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #4783 > unrolled thread
| Started by | Duncan Bayne <dhgbayne@gmail.com> |
|---|---|
| First post | 2011-05-25 20:27 -0700 |
| Last post | 2011-05-26 18:02 +0100 |
| Articles | 10 on this page of 150 — 40 participants |
Back to article view | Back to comp.lang.c
C programming in 2011 Duncan Bayne <dhgbayne@gmail.com> - 2011-05-25 20:27 -0700
Re: C programming in 2011 Shao Miller <sha0.miller@gmail.com> - 2011-05-25 22:33 -0500
Re: C programming in 2011 Duncan Bayne <dhgbayne@gmail.com> - 2011-05-25 20:58 -0700
Re: C programming in 2011 Duncan Bayne <dhgbayne@gmail.com> - 2011-05-25 21:06 -0700
Re: C programming in 2011 Shao Miller <sha0.miller@gmail.com> - 2011-05-25 23:24 -0500
Re: C programming in 2011 Angel <angel+news@spamcop.net> - 2011-05-26 07:51 +0000
Re: C programming in 2011 Chris H <chris@phaedsys.org> - 2011-05-26 11:15 +0100
Re: C programming in 2011 James Kuyper <jameskuyper@verizon.net> - 2011-05-26 06:53 -0400
Re: C programming in 2011 Ian Collins <ian-news@hotmail.com> - 2011-05-27 09:12 +1200
Re: C programming in 2011 Nizumzen <chicken@mcnuggets.com> - 2011-05-29 00:39 +0100
Re: C programming in 2011 Noob <root@127.0.0.1> - 2011-06-01 17:38 +0200
Re: C programming in 2011 Nizumzen <chicken@mcnuggets.com> - 2011-06-01 22:34 +0100
Re: C programming in 2011 Angel <angel+news@spamcop.net> - 2011-06-01 21:42 +0000
Re: C programming in 2011 Nizumzen <chicken@mcnuggets.com> - 2011-06-02 00:33 +0100
Re: C programming in 2011 Duncan Bayne <dhgbayne@gmail.com> - 2011-05-26 03:41 -0700
Re: C programming in 2011 Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-05-28 00:46 +0000
Re: C programming in 2011 Chad <cdalten@gmail.com> - 2011-05-26 14:09 -0700
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-05-26 15:07 -0700
Re: C programming in 2011 Angel <angel+news@spamcop.net> - 2011-05-27 07:42 +0000
Re: C programming in 2011 James Kuyper <jameskuyper@verizon.net> - 2011-05-27 07:30 -0400
Re: C programming in 2011 Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-05-29 01:15 +0300
Re: C programming in 2011 Angel <angel+news@spamcop.net> - 2011-05-28 22:24 +0000
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-05-28 16:08 -0700
Re: C programming in 2011 Angel <angel+news@spamcop.net> - 2011-05-28 23:47 +0000
Re: C programming in 2011 Geoff <geoff@invalid.invalid> - 2011-05-28 16:58 -0700
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-05-28 18:49 -0700
Re: C programming in 2011 Pierre Habouzit <madcoder@debian.org> - 2011-05-29 11:13 +0000
Re: C programming in 2011 Jorge <jorge@jorgechamorro.com> - 2011-06-04 08:05 -0700
Re: C programming in 2011 Angel <angel+news@spamcop.net> - 2011-06-04 16:20 +0000
Re: C programming in 2011 Nizumzen <chicken@mcnuggets.com> - 2011-05-29 14:35 +0100
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-05-29 12:49 -0700
OT: Brackets, parentheses, etc. (Was: C programming in 2011) Shao Miller <sha0.miller@gmail.com> - 2011-05-29 16:13 -0500
Re: OT: Brackets, parentheses, etc. (Was: C programming in 2011) "Morris Keesan" <mkeesan@post.harvard.edu> - 2011-05-30 12:17 -0400
Re: OT: Brackets, parentheses, etc. (Was: C programming in 2011) Shao Miller <sha0.miller@gmail.com> - 2011-05-30 12:52 -0500
Re: C programming in 2011 Nizumzen <chicken@mcnuggets.com> - 2011-05-29 23:58 +0100
Re: C programming in 2011 Chris H <chris@phaedsys.org> - 2011-05-30 14:42 +0100
Re: C programming in 2011 Nizumzen <chicken@mcnuggets.com> - 2011-05-30 17:40 +0100
Re: C programming in 2011 Sjouke Burry <burrynulnulfour@ppllaanneett.nnll> - 2011-05-30 22:38 +0200
Re: C programming in 2011 "J. J. Farrell" <jjf@bcs.org.uk> - 2011-05-30 00:38 +0100
Re: C programming in 2011 Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-05-30 11:14 +0300
Re: C programming in 2011 Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-05-29 06:55 -0700
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-05-28 18:47 -0700
Re: C programming in 2011 Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-05-30 15:02 +0300
Re: C programming in 2011 Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-05-30 11:01 +0300
Re: C programming in 2011 Angel <angel+news@spamcop.net> - 2011-05-30 08:51 +0000
Re: C programming in 2011 Nobody <nobody@nowhere.com> - 2011-05-31 01:54 +0100
Re: C programming in 2011 Angel <angel+news@spamcop.net> - 2011-05-31 12:00 +0000
Re: C programming in 2011 Seebs <usenet-nospam@seebs.net> - 2011-05-31 16:44 +0000
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-05-31 11:43 -0700
Re: C programming in 2011 Chris H <chris@phaedsys.org> - 2011-05-26 11:13 +0100
Re: C programming in 2011 Francois Grieu <fgrieu@gmail.com> - 2011-05-26 16:04 +0200
Re: C programming in 2011 Branimir Maksimovic <bmaxa@hotmail.com> - 2011-05-26 16:21 +0200
Re: C programming in 2011 Francois Grieu <fgrieu@gmail.com> - 2011-05-26 17:23 +0200
Re: C programming in 2011 Branimir Maksimovic <bmaxa@hotmail.com> - 2011-05-26 19:15 +0200
Re: C programming in 2011 Willem <willem@toad.stack.nl> - 2011-05-26 17:29 +0000
Re: C programming in 2011 Branimir Maksimovic <bmaxa@hotmail.com> - 2011-05-26 20:10 +0200
Re: C programming in 2011 Pierre Habouzit <madcoder@debian.org> - 2011-05-26 17:35 +0000
Re: C programming in 2011 Willem <willem@toad.stack.nl> - 2011-05-26 17:53 +0000
Re: C programming in 2011 Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-05-26 11:13 -0700
Re: C programming in 2011 James Kuyper <jameskuyper@verizon.net> - 2011-05-26 21:57 -0400
Re: C programming in 2011 Tim Rentsch <txr@alumni.caltech.edu> - 2011-05-31 01:13 -0700
Re: C programming in 2011 Branimir Maksimovic <bmaxa@hotmail.com> - 2011-05-26 20:06 +0200
Re: C programming in 2011 Ralf Damaschke <rwspam@gmx.de> - 2011-05-26 17:57 +0000
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-05-26 11:31 -0700
Re: C programming in 2011 Ralf Damaschke <rwspam@gmx.de> - 2011-05-26 20:43 +0000
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-05-26 14:53 -0700
Re: C programming in 2011 Tim Rentsch <txr@alumni.caltech.edu> - 2011-05-31 01:03 -0700
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-05-31 01:59 -0700
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-05-31 02:55 -0700
Re: C programming in 2011 James Kuyper <jameskuyper@verizon.net> - 2011-05-31 06:36 -0400
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-05-31 05:57 -0700
Re: C programming in 2011 James Kuyper <jameskuyper@verizon.net> - 2011-05-31 09:23 -0400
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-05-31 07:50 -0700
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-05-31 11:41 -0700
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-01 01:46 -0700
Re: C programming in 2011 Ike Naar <ike@iceland.freeshell.org> - 2011-06-01 10:07 +0000
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-01 04:12 -0700
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-01 07:46 -0700
Re: C programming in 2011 Seebs <usenet-nospam@seebs.net> - 2011-06-01 17:53 +0000
Re: C programming in 2011 lawrence.jones@siemens.com - 2011-06-01 16:28 -0400
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-01 23:28 -0700
Re: C programming in 2011 Uno <Uno@example.invalid> - 2011-06-09 21:24 -0600
Re: C programming in 2011 James Kuyper <jameskuyper@verizon.net> - 2011-06-01 10:04 -0400
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-01 08:21 -0700
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-01 09:37 -0700
Re: C programming in 2011 James Kuyper <jameskuyper@verizon.net> - 2011-06-01 12:55 -0400
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-01 11:52 -0700
Re: C programming in 2011 "J. J. Farrell" <jjf@bcs.org.uk> - 2011-06-02 00:00 +0100
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-01 23:19 -0700
Re: C programming in 2011 James Kuyper <jameskuyper@verizon.net> - 2011-06-01 12:53 -0400
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-01 11:55 -0700
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-06-01 08:41 -0700
Re: C programming in 2011 Noob <root@127.0.0.1> - 2011-06-01 17:12 +0200
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-01 09:28 -0700
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-06-01 08:38 -0700
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-02 01:00 -0700
Re: C programming in 2011 Willem <willem@toad.stack.nl> - 2011-06-02 09:13 +0000
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-02 02:52 -0700
Re: C programming in 2011 Willem <willem@toad.stack.nl> - 2011-06-02 11:41 +0000
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-02 05:53 -0700
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-02 06:49 -0700
Re: C programming in 2011 Willem <willem@toad.stack.nl> - 2011-06-02 14:18 +0000
Re: C programming in 2011 Seebs <usenet-nospam@seebs.net> - 2011-06-02 21:02 +0000
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-02 23:55 -0700
Re: C programming in 2011 Angel <angel+news@spamcop.net> - 2011-06-03 08:37 +0000
Re: C programming in 2011 James Kuyper <jameskuyper@verizon.net> - 2011-06-03 06:49 -0400
Re: C programming in 2011 Angel <angel+news@spamcop.net> - 2011-06-03 11:52 +0000
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-03 11:11 -0700
Re: C programming in 2011 Angel <angel+news@spamcop.net> - 2011-06-03 18:23 +0000
Re: C programming in 2011 Seebs <usenet-nospam@seebs.net> - 2011-06-03 18:59 +0000
Re: C programming in 2011 Angel <angel+news@spamcop.net> - 2011-06-03 19:48 +0000
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-03 15:02 -0700
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-06-03 12:19 -0700
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-03 13:40 -0700
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-06-03 15:11 -0700
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-03 15:24 -0700
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-06-03 15:34 -0700
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-03 17:10 -0700
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-06-03 17:34 -0700
Re: C programming in 2011 James Kuyper <jameskuyper@verizon.net> - 2011-06-04 09:47 -0400
Re: C programming in 2011 James Kuyper <jameskuyper@verizon.net> - 2011-06-02 10:02 -0400
Re: C programming in 2011 Angel <angel+news@spamcop.net> - 2011-06-02 12:17 +0000
Re: C programming in 2011 Keith Thompson <kst-u@mib.org> - 2011-06-02 08:48 -0700
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-02 10:35 -0700
Re: C programming in 2011 gordonb.jpem8@burditt.org (Gordon Burditt) - 2011-06-05 23:32 -0500
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-06 00:12 -0700
Re: C programming in 2011 gordonb.5k8u2@burditt.org (Gordon Burditt) - 2011-06-06 05:18 -0500
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-06 08:16 -0700
Re: C programming in 2011 Michael Press <rubrum@pacbell.net> - 2011-06-03 18:06 -0700
Re: C programming in 2011 gordonb.zourz@burditt.org (Gordon Burditt) - 2011-06-05 21:25 -0500
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-06 01:14 -0700
Re: C programming in 2011 gordonb.donaz@burditt.org (Gordon Burditt) - 2011-06-06 04:36 -0500
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-06 09:02 -0700
Re: C programming in 2011 gordonb.k6ruq@burditt.org (Gordon Burditt) - 2011-06-06 18:36 -0500
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-07 10:14 -0700
Re: C programming in 2011 "J. J. Farrell" <jjf@bcs.org.uk> - 2011-05-31 19:56 +0100
Re: C programming in 2011 Noob <root@127.0.0.1> - 2011-06-01 14:54 +0200
Re: C programming in 2011 Angel <angel+news@spamcop.net> - 2011-06-01 13:07 +0000
Re: C programming in 2011 pete <pfiland@mindspring.com> - 2011-06-01 14:10 -0400
Re: C programming in 2011 James Kuyper <jameskuyper@verizon.net> - 2011-06-01 19:58 -0400
Re: C programming in 2011 Willem <willem@toad.stack.nl> - 2011-06-01 09:07 +0000
Re: C programming in 2011 James Kuyper <jameskuyper@verizon.net> - 2011-06-01 09:29 -0400
Re: C programming in 2011 David Thompson <dave.thompson2@verizon.net> - 2011-06-07 02:18 -0400
Re: C programming in 2011 "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-07 09:31 -0700
Re: C programming in 2011 Patrick Scheible <kkt@zipcon.net> - 2011-06-09 14:55 -0700
Re: C programming in 2011 Tim Rentsch <txr@alumni.caltech.edu> - 2011-06-01 02:35 -0700
Re: C programming in 2011 Francois Grieu <fgrieu@gmail.com> - 2011-05-31 21:57 +0200
Re: C programming in 2011 Francois Grieu <fgrieu@gmail.com> - 2011-05-31 22:03 +0200
Re: C programming in 2011 Kenneth Brody <kenbrody@spamcop.net> - 2011-05-26 12:27 -0400
Re: C programming in 2011 Nobody <nobody@nowhere.com> - 2011-05-26 18:02 +0100
Page 8 of 8 — ← Prev page 1 2 3 4 5 6 7 [8]
| From | Willem <willem@toad.stack.nl> |
|---|---|
| Date | 2011-06-01 09:07 +0000 |
| Message-ID | <slrniuc0b1.9ph.willem@toad.stack.nl> |
| In reply to | #5112 |
Kleuskes & Moos wrote:
) On May 31, 3:23?pm, James Kuyper <jameskuy...@verizon.net> wrote:
)> An obvious possibility is a platform with no hardware support for
)> unsigned integers - depending upon the precise details of it's
)> instruction set, it could be easiest to implement unsigned ints as
)> signed ints with a range restricted to non-negative values. However, I
)> claim no familiarity with any such system.
)
) Such a system would not be able to operate, since every relative jmp-
) instruction involves the addition (or subtraction, which is basically
) the same). So name that fabled platform.
What do relative jump instructions have to do with unsigned integers ?
SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2011-06-01 09:29 -0400 |
| Message-ID | <is5ero$k5s$1@dont-email.me> |
| In reply to | #5112 |
On 05/31/2011 10:50 AM, Kleuskes & Moos wrote: > On May 31, 3:23�pm, James Kuyper <jameskuy...@verizon.net> wrote: ... >> An obvious possibility is a platform with no hardware support for >> unsigned integers - depending upon the precise details of it's >> instruction set, it could be easiest to implement unsigned ints as >> signed ints with a range restricted to non-negative values. However, I >> claim no familiarity with any such system. > > Such a system would not be able to operate, since every relative jmp- > instruction involves the addition (or subtraction, which is basically > the same). ... You can't do addition or subtraction with signed integers? That's news to me. > ... So name that fabled platform. Can you not read? I said "I claim no familiarity with any such system". I suppose I could assign an arbitrary name to a purely hypothetical system, but to what end? -- James Kuyper
[toc] | [prev] | [next] | [standalone]
| From | David Thompson <dave.thompson2@verizon.net> |
|---|---|
| Date | 2011-06-07 02:18 -0400 |
| Message-ID | <jfgru69n2em3d0r1pio91cp6snlevbl4j1@4ax.com> |
| In reply to | #5112 |
On Tue, 31 May 2011 07:50:06 -0700 (PDT), "Kleuskes & Moos" <kleuske@xs4all.nl> wrote: > On May 31, 3:23 pm, James Kuyper <jameskuy...@verizon.net> wrote: <snip: UINT_MAX==INT_MAX ?> > > An obvious possibility is a platform with no hardware support for > > unsigned integers - depending upon the precise details of it's > > instruction set, it could be easiest to implement unsigned ints as > > signed ints with a range restricted to non-negative values. However, I > > claim no familiarity with any such system. > PDP-10 was (at least) one with integers only signed: 36bit word, 2sC sign+35; for a few double operations, sign+70=sign+35+ignored+35. > Such a system would not be able to operate, since every relative jmp- > instruction involves the addition (or subtraction, which is basically > the same). So name that fabled platform. > First, some systems don't have relative jumps. Second, branch address calculation, and for that matter other address calculation, need not use the same operations as data arithmetic, especially since they often use separate hardware i.e. wires/paths and gates and except for <=16-bit CPUs the address width has often been less than the (integer) data width and (well) within the range of signed-positive-half.
[toc] | [prev] | [next] | [standalone]
| From | "Kleuskes & Moos" <kleuske@xs4all.nl> |
|---|---|
| Date | 2011-06-07 09:31 -0700 |
| Message-ID | <2bc1fa35-aa10-4e51-88ba-d66187f992a8@r20g2000yqd.googlegroups.com> |
| In reply to | #5597 |
On Jun 7, 8:18 am, David Thompson <dave.thomps...@verizon.net> wrote: > On Tue, 31 May 2011 07:50:06 -0700 (PDT), "Kleuskes & Moos" > > <kleu...@xs4all.nl> wrote: > > On May 31, 3:23 pm, James Kuyper <jameskuy...@verizon.net> wrote: > > <snip: UINT_MAX==INT_MAX ?>> > An obvious possibility is a platform with no hardware support for > > > unsigned integers - depending upon the precise details of it's > > > instruction set, it could be easiest to implement unsigned ints as > > > signed ints with a range restricted to non-negative values. However, I > > > claim no familiarity with any such system. > > PDP-10 was (at least) one with integers only signed: 36bit word, 2sC > sign+35; for a few double operations, sign+70=sign+35+ignored+35. Which made it big in the '60, right along the Burroughs machine and borrowed it's architecture from the PDP-6, dating back to 1963... 36- bits appear to have been the 'in'-thing back in those days. The PDP-11, however, dropped all that crazy stuff and was a lot easier to program, being byte-adressable and all. And that's the machine that 'C' was developed on originally. So, all in all, it's on par with the Burroughs machine, in that it would probably not support 'C' at all. Nice fossil, though. > > Such a system would not be able to operate, since every relative jmp- > > instruction involves the addition (or subtraction, which is basically > > the same). So name that fabled platform. > > First, some systems don't have relative jumps. Then they're, ipso facto, excluded from the argument. > Second, branch address > calculation, and for that matter other address calculation, need not > use the same operations as data arithmetic, especially since they > often use separate hardware i.e. wires/paths and gates and except for > <=16-bit CPUs the address width has often been less than the (integer) > data width and (well) within the range of signed-positive-half. And ultimately all the specialized hardware will end up doing PC <-- PC + offset. Probably after a bunch of branch-prediction, reordering and/or flushing of pipelines and all kinds of other smart stuff, but the final result stays what it is. If you think otherwise, please bring an example of what you mean.
[toc] | [prev] | [next] | [standalone]
| From | Patrick Scheible <kkt@zipcon.net> |
|---|---|
| Date | 2011-06-09 14:55 -0700 |
| Message-ID | <86y61ak6uq.fsf@zipcon.net> |
| In reply to | #5612 |
"Kleuskes & Moos" <kleuske@xs4all.nl> writes: > On Jun 7, 8:18 am, David Thompson <dave.thomps...@verizon.net> wrote: >> On Tue, 31 May 2011 07:50:06 -0700 (PDT), "Kleuskes & Moos" >> >> <kleu...@xs4all.nl> wrote: >> > On May 31, 3:23 pm, James Kuyper <jameskuy...@verizon.net> wrote: >> >> <snip: UINT_MAX==INT_MAX ?>> > An obvious possibility is a platform >> with no hardware support for >> > > unsigned integers - depending upon the precise details of it's >> > > instruction set, it could be easiest to implement unsigned ints as >> > > signed ints with a range restricted to non-negative values. However, I >> > > claim no familiarity with any such system. >> >> PDP-10 was (at least) one with integers only signed: 36bit word, 2sC >> sign+35; for a few double operations, sign+70=sign+35+ignored+35. But PDP-10 addresses were 18 bits (extended to 23 bits later), so you never saw a negative address. Note that those address 36-bit words, not bytes. > Which made it big in the '60, right along the Burroughs machine and > borrowed it's architecture from the PDP-6, dating back to 1963... 36- > bits appear to have been the 'in'-thing back in those days. 36 bits made a lot of sense, especially for floats. 32-bit floats don't have enough precision for a lot of work. With the PDP-11, Vax, etc., lots of scientific users had to go to double precision at a substantial cost in speed when the 36-bit floats would have been enough. > The PDP-11, however, dropped all that crazy stuff and was a lot easier > to program, being byte-adressable and all. Byte addressing is generally wasteful. Address space is precious and you don't actually need to address bytes in isolation from each other very often. Character data is usually less than 8 bits wide. Sixbit is fine in situations where you don't need control characters or need to distinguish upper and lower case. ASCII is seven bits. When space is precious, you don't use 8 bits on data that can be represented in 7. On a machine with a good instruction set like the PDP-10, there's no speed penalty for choosing 7 bits instead of 8 to represent characters. On the PDP-11, on the other hand, programmers use 8 bit characters all the time, wasting 1/8 of their machine's memory, just because of the hassle and speed penalty for doing anything else. Lots of byte-addressed machines are quite a bit slower accessing data that isn't in word alignment. Generally speaking it's a mistake for a programming language to act as if there's nothing wrong with unaligned data when it actually involves a substantial penalty. > And that's the machine that > 'C' was developed on originally. So, all in all, it's on par with the > Burroughs machine, in that it would probably not support 'C' at all. I don't know about Burroughs, but there are a couple of C implementations on the PDP-10. Because of C's peculiar requirement that the word size must be a multiple of the char size, the implementers chose a 9-bit char (even more wasteful than the PDP-11!). C didn't become popular, partly because of the unfortunate size of char, partly because due to that it's hard to port between other Cs and PDP-10 C, partly because C was becoming popular at the same time the PDP-10 was being phased out, and partly because PDP-10 assembly language is a very nice language. -- Patrick
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <txr@alumni.caltech.edu> |
|---|---|
| Date | 2011-06-01 02:35 -0700 |
| Message-ID | <kfnlixlopvk.fsf@x-alumni2.alumni.caltech.edu> |
| In reply to | #5096 |
"Kleuskes & Moos" <kleuske@xs4all.nl> writes: > On May 31, 11:30 am, Tim Rentsch <t...@alumni.caltech.edu> wrote: >> "Kleuskes & Moos" <kleu...@xs4all.nl> writes: >> >> > On May 31, 10:03 am, Tim Rentsch <t...@alumni.caltech.edu> wrote: >> >> Francois Grieu <fgr...@gmail.com> writes: >> >> > On 26/05/2011 16:21, Branimir Maksimovic wrote: >> >> >> On 05/26/2011 04:04 PM, Francois Grieu wrote: >> >> >>> [3] some compilers know that, when j is an int, >> >> >>> if (j<1 || j>8) >> >> >>> foo(); >> >> >>> can be rewritten as >> >> >>> if ((unsigned)j-1u>7u) >> >> >>> foo(); >> >> >> >> No, it can't. >> >> >> > Would you please illustrate by an example when that does not stand? >> >> > Stick to C99, please. >> >> >> On most implementations it will work, but it can fail if >> >> UINT_MAX == INT_MAX. Of course an implementation is >> >> allowed to know that and take it into account. >> >> > I've been scratching my head for a bit, reading the above. In any >> > numbersystem i can come up with it seems that UINT_MAX > INT_MAX, if >> > only because of the sign bit required in integers. >> >> > So please, which situation did you have in mind where UINT_MAX == >> > INT_MAX? The only one i can think of is a very silly definition in one >> > of the standard headers, making me want to give strong advice not to >> > use that a compiler. God knows what other silliness is hidden in the >> > headers. >> >> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf >> >> Please refer to section 6.2.6.2, paragraph 2. > > Nice to know that you know where integers are defined in the standard, > but that does not really answer my question. [snip elaboration] I think it will if you take some time to re-read it carefully. To help, all text after "If the sign bit is zero," does not bear on the INT_MAX == UINT_MAX question.
[toc] | [prev] | [next] | [standalone]
| From | Francois Grieu <fgrieu@gmail.com> |
|---|---|
| Date | 2011-05-31 21:57 +0200 |
| Message-ID | <4de54827$0$28053$426a74cc@news.free.fr> |
| In reply to | #5089 |
On 31/05/2011 10:03, Tim Rentsch wrote: > Francois Grieu<fgrieu@gmail.com> writes: > >> On 26/05/2011 16:21, Branimir Maksimovic wrote: >>> On 05/26/2011 04:04 PM, Francois Grieu wrote: >>>> [3] some compilers know that, when j is an int, >>>> if (j<1 || j>8) >>>> foo(); >>>> can be rewritten as >>>> if ((unsigned)j-1u>7u) >>>> foo(); >>> >>> No, it can't. >> >> Would you please illustrate by an example when that does not stand? >> Stick to C99, please. > > On most implementations it will work, but it can fail if > UINT_MAX == INT_MAX.(..) I agree that an implementation could have UINT_MAX == INT_MAX (the example of using a floating point engine is fine). But, assuming that, for what value of j would the above rewriting become invalid? I do not find any. Francois Grieu
[toc] | [prev] | [next] | [standalone]
| From | Francois Grieu <fgrieu@gmail.com> |
|---|---|
| Date | 2011-05-31 22:03 +0200 |
| Message-ID | <4de54992$0$20692$426a74cc@news.free.fr> |
| In reply to | #5145 |
I just wrote:: > On 31/05/2011 10:03, Tim Rentsch wrote: >> Francois Grieu<fgrieu@gmail.com> writes: >> >>> On 26/05/2011 16:21, Branimir Maksimovic wrote: >>>> On 05/26/2011 04:04 PM, Francois Grieu wrote: >>>>> [3] some compilers know that, when j is an int, >>>>> if (j<1 || j>8) >>>>> foo(); >>>>> can be rewritten as >>>>> if ((unsigned)j-1u>7u) >>>>> foo(); >>>> >>>> No, it can't. >>> >>> Would you please illustrate by an example when that does not stand? >>> Stick to C99, please. >> >> On most implementations it will work, but it can fail if >> UINT_MAX == INT_MAX.(..) > > I agree that an implementation could have UINT_MAX == INT_MAX > (the example of using a floating point engine is fine). > > But, assuming that, for what value of j would the above > rewriting become invalid? I do not find any. Got it: j = -INT_MAX; I stand corrected. Francois Grieu
[toc] | [prev] | [next] | [standalone]
| From | Kenneth Brody <kenbrody@spamcop.net> |
|---|---|
| Date | 2011-05-26 12:27 -0400 |
| Message-ID | <VKidnS5YG7Pk4kPQnZ2dnUVZ_uWdnZ2d@bestweb.net> |
| In reply to | #4783 |
On 5/25/2011 11:50 PM, Stefan Ram wrote: > Duncan Bayne<dhgbayne@gmail.com> writes: [...] >> 4. Emacs > > Gesundheit! - Real C programms use vi. > Just kidding. [...] Butterflies. uggc://kxpq.pbz/378/ -- Kenneth Brody
[toc] | [prev] | [next] | [standalone]
| From | Nobody <nobody@nowhere.com> |
|---|---|
| Date | 2011-05-26 18:02 +0100 |
| Message-ID | <pan.2011.05.26.17.01.38.984000@nowhere.com> |
| In reply to | #4783 |
On Thu, 26 May 2011 03:50:50 +0000, Stefan Ram wrote: >>6. Autoconf + make (and see point 2 for VMS, HP-UX etc. goodness) > > Can this be used on, say, Microsoft® Windows? (I know that > make is available for Windows. I referred to Autoconf.) MSys provides bash and standard Unix utilities for Windows. Regardless of autoconf, you'll probably need MSys if you want to use Unix Makefiles on Windows. Writing Makefiles which work with either /bin/sh or cmd.exe is too much work. Cygwin is overkill if you just need to make a Unix build system work on Windows. It's only really necessary if you need to make complex Unix software work on Windows with minimal changes.
[toc] | [prev] | [standalone]
Page 8 of 8 — ← Prev page 1 2 3 4 5 6 7 [8]
Back to top | Article view | comp.lang.c
csiph-web