Robert Clausecker <fuz(a)fuz.su> wrote:
> > I've tried Microport SystemV /386 (SysV R3.2). It uses COFF
> Nice find! It seems to use lcall to selector 7 for system calls. A
> similar choice was made in 386BSD all the way through FreeBSD 2.2.8
> where it was replaced with int $0x80 as in Linux.
Technically speaking
lcall $0x07,$0
uses selector 0 with RPL=3 (bit0 and bit1==1) and LDT (bit2==1)
It seems it's oldest way to call kernel from userspace on x86 architecture.
AT&T's programmers used this sycall convention for SysVR3 and
SysVR4 on i386 (not sure about SysVR2 on i286).
There are very few examples with lcall-type syscall i.e.
http://www.sco.com/developers/devspecs/abi386-4.pdf
(figure 3-26)
(and leaked SysVR4 i386 sources)
William Jolitz used this convention in his amazing articles about
porting BSD4.3 to the i386 (c)1991
http://www.informatica.co.cr/unix-source-code/research/1991/0101.html
(p."System Call Inteface"). See also 386BSD 0.0:
https://github.com/386bsd/386bsd/blob/0.0/arch/i386/i386/locore.s#L361
(Did he run AT&T userspace on his kernel ???)
As you mentioned, most of early *BSD systems on i386 also used lcall.
Linus selected to use "DOS-style" call with INT 0x80.
More recent BSD on i386 also use INT.
https://john-millikin.com/unix-syscallshttp://asm.sourceforge.net/intro/hello.html
Solaris on x86 (ex. SysVR4) also uses lcall. See a
https://www.cs.dartmouth.edu/sergey/cs258/solaris-on-x86.pdf
p.4.2.3
and Solaris (later OpenSolaris and later Illumos) sourcecode.
All, I just received this from Stephen Jones at the LCM+L.
----- Forwarded message from Stephen Jones <StephenJo(a)livingcomputers.org> -----
Subject: UNIX-7 boots on sn 129
Hello Folks .. you’ll hear through official channels along with videos
and pictures (hopefully soon) that we just got PDP-7 UNICS to boot on
a real PDP-7 (sn 129) using our newly designed “JK09” disk drive.
The recent posting of source is going to be great .. we’ve been using
the simh image that has been available for a while.
BTW, compiling the B Hello World on a real 7 is much more satisfying
than it is under simh …
More to come, please watch Living Computers for updates.
(PS sorry we’re late to the BTL party).
Stephen M. Jones
----- End forwarded message -----
> 10-36-55.pdf user-mode programs: pool game
This game, written by ken, used the Graphic 2. One of its
earliest tests--random starting positions and velocities on
a frictionless table with no collision detection--produced
a mesmerizing result. This was saved in a program called
"weird1", which was carried across to the PDP11.
Weird1 was a spectacular accidental demonstration of structure
in pseudo-random numbers. After several minutes the dots
representing pool balls would evanescently form short local
alignments. Thereafter from time to time ever-larger alignments
would materialize. Finally in a grand climax all the balls
converged to a single point.
It was stunning to watch perfect order emerge from apparent
chaos. One of my fondest hopes is to see weird1 revived.
Doug
Some time ago, I wrote a piece [1] about the design of the AT&T
assembler syntax. While I'm still not quite sure if everything in there
is correct, this explanation seemed plausible to me; the PDP-11
assembler being adapted for the 8086, then the 80386 and then ELF
targets, giving us today's convoluted syntax.
The one thing in this chain I have never found is an AT&T style
assembler for x86 before ELF was introduced. Supposedly, it would get
away without % as a register prefix, thus being much less obnoxious to
use. Any idea if such an assembler ever existed and if yes where?
I suppose Xenix might have shipped something like that.
The only AT&T syntax assemblers I know today are those from Solaris,
the GNU project, the LLVM project, and possibly whatever macOS ships.
Are there (or where there) any other x86 AT&T assemblers? Who was
the first party to introduce this?
Yours,
Robert Clausecker
[1]: https://stackoverflow.com/a/42250270/417501
--
() ascii ribbon campaign - for an 8-bit clean world
/\ - against html email - against proprietary attachments
Some time ago, I wrote a piece [1] about the design of the AT&T
assembler syntax. While I'm still not quite sure if everything in there
is correct, this explanation seemed plausible to me; the PDP-11
assembler being adapted for the 8086, then the 80386 and then ELF
targets, giving us today's convoluted syntax.
The one thing in this chain I have never found is an AT&T style
assembler for x86 before ELF was introduced. Supposedly, it would get
away without % as a register prefix, thus being much less obnoxious to
use. Any idea if such an assembler ever existed and if yes where?
I suppose Xenix might have shipped something like that.
The only AT&T syntax assemblers I know today are those from Solaris,
the GNU project, the LLVM project, and possibly whatever macOS ships.
Are there (or where there) any other x86 AT&T assemblers? Who was
the first party to introduce this?
Yours,
Robert Clausecker
[1]: https://stackoverflow.com/a/42250270/417501
--
() ascii ribbon campaign - for an 8-bit clean world
/\ - against html email - against proprietary attachments
Robert Clausecker <fuz(a)fuz.su>wrote:
> The one thing in this chain I have never found is an AT&T style
> assembler for x86 before ELF was introduced.
There were alot of AT&T codebase ports to x86 architecture except Xenix:
Microport, INTERACTIVE, Everex, Wyse e.t.c. using AT&T x86 syntax.
I've tried Microport SystemV /386 (SysV R3.2). It uses COFF
as format for executables:
See:
http://www.vcfed.org/forum/showthread.php?67736-History-behind-the-disk-ima…
(Rather interesting kernel ABI/Call convention)
and
https://gunkies.org/wiki/Unix_SYSVr3
There were also SystemV R2 to i286 ports i.e.:
https://gunkies.org/wiki/Microport_System_V
with a.out binary format.
Bother:
Here's a good pictore of G R herself, with what I believe to be at
least a second-generation badge.
Forgot to paste in the URL. Here it is:
http://www.peteradamsphoto.com/g-r-emlin/
Mary Ann Horton:
I'm enjoying bwk's book very much, but it has me wondering. There are
two stories I've heard that supposedly occurred at Murray Hill, but he
didn't include them.
====
You can't expect every story to be there. The book would be too
heavy to lift!
Could the `monkey picture on a badge' story be that of G. R. Emlin's
badge? She was a gremlin doll, not a monkey, but it would be
reasonable to mistake the former for the latter.
Here's a good pictore of G R herself, with what I believe to be at
least a second-generation badge. The original badge was an old-style
Bell Labs one with a green border; I forget whether that meant
contractor or something else, but a regular MTS badge was blue-bordered
at the time.
Norman Wilson
Toronto ON
> What is the special meaning of using / as directory partition in UNIX? And \ as the escape character.
\ came from Multics. The first day Multics ran at Bell Labs Bob Morris
famously typed backslash-newline at the login prompt and crashed the
system.
Multics had a hierarchical file system, too, but I don't recall how
pathnames were punctuated.
Doug
> From: Charles Anthony
>> I think it was >user_dir_dir>Group>User, wasn't it?
> user_dir_dir>Project>User
Oh, right. Too many years spent on Unix! :-)
> "Names" are aliases, similar to soft links
I feel like they are more similar to hard links; they belong to a segment, and
if the name is given to another segment, and the original segment has only
that name, it goes away. (See the discussion under "add_name" in the MPM
'Commands and Active Fuinctions'). Also, Multics does real soft links (too),
so names can't be soft links! :-)
Noel