Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

segmentation revisited

35 views
Skip to first unread message

muta...@gmail.com

unread,
Dec 11, 2022, 9:04:20 PM12/11/22
to
I spent a lot of time on 16-bit segmentation, because
I wanted to understand what it was capable of, and
the implications.

But I was surprised to see someone deliberately ask
for non-flat, and I asked why. Here is the answer:

https://forum.osdev.org/viewtopic.php?f=2&t=56200&sid=6573207586407a694e722e430669a148#p343839

https://forum.osdev.org/viewtopic.php?f=2&t=56200&sid=6573207586407a694e722e430669a148#p343845

And here is 7.3.3:

https://web.archive.org/web/20201101132957/http://ftp.openwatcom.org/manuals/current/clr.pdf

And here is another public domain compiler being actively written:

https://git.sr.ht/~pitust/funicc

He is collaborating with this author:

https://github.com/wxwisiasdf/cc23/tree/master

And also, with the advent of these public domain compilers,
I am willing to upgrade language after about 35 years of
coding to C90 (the ANSI C draft was available earlier than
1990).

But I would like to discuss an acceptable language.

I consider C99 to be an abortion.

One deviation from C99 I would make is to make int32_t
have the same meaning as int_least32_t, as the former
as defined by ISO, in combination with actual users who
keep leaving out "least", has broken the spirit of C.

"long long" could be reserved solely for internal use by
a (e.g.) 32-bit C compiler building a 64-bit C compiler.

Nothing set in stone, just thoughts.

Also I'm not claiming to understand 7.3.3 or access
registers or microkernels. But I thought it might be of
interest.

BFN. Paul.

Alexei A. Frounze

unread,
Dec 12, 2022, 12:23:41 AM12/12/22
to
On Sunday, December 11, 2022 at 6:04:20 PM UTC-8, muta...@gmail.com wrote:
...
> And also, with the advent of these public domain compilers,
> I am willing to upgrade language after about 35 years of
> coding to C90 (the ANSI C draft was available earlier than
> 1990).
>
> But I would like to discuss an acceptable language.
>
> I consider C99 to be an abortion.

There are some nice and small C99 features:
- // comments
- __func__
- removal of implicit int and implicit function declaration
(true abominations/abortions of the early C)
- hex floating point constants and %a format conversion specifier
- <stdint.h> types and <inttypes.h> to go with it
- strictly defined signed integer division
- declarations (almost) anywhere (including for())
- flexible array member at struct's end
- non-const initializers of automatic variables
- compound literals
- designated initializers (specifically, .name=...;
go especially well with compound literals)
- trailing commas in initializers and enum declarations
- inline (most notably in combination with static)
- type punning via unions (somewhat better than memcpy())
- a few more <math.h> functions, in particular, rounding
and rounding-like functions
- overall improvements in floating point support, including
INFINITY, NAN, etc
From recent standards it's also nice to have:
- anonymous union member
- static assertions

Things I dislike:
- old/K&R-style declarations
- tentative definitions
- variable-length arrays (bad idea to have arbitrarily large
stuff on the stack)
- too much UB, especially creeping UB, little help from
the language proper or its library to deal with UB

Things I don't care much about:
- complex numbers (real scientists may disagree)

There's more to speak about, but this likely covers most of it.

Alex
0 new messages