From: Clem Cole <clemc at ccc.com>
Remember, the OSX stuff, darwin, etc - really was before Jobs.
Or between Jobs ... ironically while Jobs himself was between jobs.
(I'm sure this has been covered.)
Let me talk to the compiler guys next time I'm in my NH office [I usually
work from home].
Thanks!!
I fear its something like a
special tree walker that generates macho files from the internal form.
... which is what try to I'd write myself if I understood WLINK's internal
form. But the code's barely commented and I'm too dumb to trace it out.
But they may have some tools. You never know - you're not the first guy
that has had to deal with this.
My suspicion is that every guy who's *successfully* dealt with this kind of
thing is in such a foul mood by the time it's working that they aren't really
up for paving the way for the next person to smack into it.
Paul might have some suggestions.
[I also know he loathes the Microsoft format].
He sounds smart! :-) There are few truly beautiful formats, although
the VMS .OBJ format was way above average from what I remember reading --
the linker was an RPN calculator and could do anything, so they didn't fall
into the usual trap of special-casing the 17 situations the then-in-vogue
compiler wanted and figuring that's good enough, until someone needs an
18th case and now what?
The
GNU guys were actually no very helpful here. They defined their own crap
and the confer everything to that.
That baffles me. I haven't checked in ages but every time I do, binutils
is all things to all people *except* there's no support for OMF-386 or
any of the .EXE formats. I'm not surprised that that crowd is a little
snippy about MICROS~1 but it still seems like it's better for the tool to
do what needs doing even if it's a bit distasteful.
As I argue at Intel, when you build a tool for a specific environment, you
need to be "socially compliant" with the target. That means you need to
deal with native formats, native installers, etc.
That's a really good way of putting it. I use tons of GNU stuff on Linux
but not on DOS (seems to crash a lot) and it's uncomfortable on Windows
because the pieces so often don't fit together. I mean a lot of it won't
even write normal text files with CRLFs! Sure people feel really strongly
about stupid stuff like that but ... when in Rome ...
Well if you have linux already - *BSD should be easy.
Almost. Here's where my assembly language extremism gets me -- instead
of having wrapper routines named read or fork or kill, my code is all full
of places that load up the registers and do INT 80h, which would instead
have to ... what is it? Push a bunch of junk on the stack, load EAX, and
INT 40h? And is stack cleanup my problem? It's mechanically but annoyingly
different, is my point. But yes the actual calls should be 99% the same
(probably even a lot of the syscall #s), except maybe some funny business
like sigaltstack or modify_ldt or clone or who knows what that might have
local differences.
Where they differ is in UI
and specifically GUI.
Well then, good news! I haven't been doing a GUI on Linux, again due to
linker issues (no problem on Win32 or OS/2 since WLINK does support imports
there). I looked into writing an X client entirely from scratch and ...
nah, I think waiting around for someone smarter than me to fix WLINK might
be a lot faster.
That said, since you said the DOS version is the native version, I fear it
might be huge surgery to get there and not worth the effort.
Not worth the ... huh? I did a port to OS/2 for chrissake. *Recently!*
Pointless effort is its own reward.
Speaking of which, I hate to say it (I've had my heart broken SO many
times) but I'm actually excited about the Intel Galileo board. They're
positioning it against the Arduino because they've lost their !@*&^% minds,
but apparently it's a semi normal (screen shots show it booting to grub,
with enough mismapped characters to imply that it's a whole imaginary
VGA with a serial console on top of it???) 400 MHz Intel PC, for $69.
I might be all wrong about its vanilla-ness (what little documentation
there is seems to be trying to downplay the idea that it's anything more
than a ridiculously overpowered Arduino knockoff), and if UEFI means UEFI
*only* and it can't boot legacy stuff all (and there may be all kinds of
rules above that about what's missing or non-standard) then it'd be a ton
of work figuring out how to run stand-alone on UEFI (they've got Linux in
there but as always I think that misses the point of embedded systems,
and it's absolute lunacy if all they want to do is emulate an Arduino).
But E11 on a 400 MHz x86 should handily beat a real PDP-11/70. (I've
still got a grudge with the RPi people so I'd love to see this.)
It used to be $65 with delivery two weeks from now, now it's $69 at the end
of the month, and those both may be just the beginning ... but still, cute!
John Wilson
D Bit