[comp.unix.microport] Microport System V/AT Assembly Language not documented

whna@cgcha.uucp (Heinz Naef) (02/02/89)

The assembly language processed by the as(1) command of Microport System V/AT
has a completely different semantics, different instruction mnemonics and a
different assembler control (macro) language than usual assemblers for the
80x86 personal computers.

When writing a device driver at the lowest level (i. e. not on top of another
device driver) then there is a need to develop certain parts in assembly
language. With the documentation supplied by Microport for the System V/AT
program development and runtime system, it is *impossible* to even attempt to
write a minimum assembler program. Compared to the excellent documentation of
the linkkit, it is strange that there is no chapter on usage of the assembler
and on coding guidelines.

I repeatedly tried to directly contact technical support of Microport and
also Mr. Plocher and Mr. Sully. Even though I included the serial# of my
distribution, I didn't get any response.

Could anyone give me a pointer to related documentation, or post an
existing assembler program of reasonable size? Thanks in advance.

Regards,
Heinz Naef, cgch!whna

buck@siswat.UUCP (A. Lester Buck) (02/06/89)

In article <750@cgch.UUCP>, whna@cgcha.uucp (Heinz Naef) writes:
> The assembly language processed by the as(1) command of Microport System V/AT
> has a completely different semantics, different instruction mnemonics and a
> different assembler control (macro) language than usual assemblers for the
> 80x86 personal computers.
> 
> When writing a device driver at the lowest level (i. e. not on top of another
> device driver) then there is a need to develop certain parts in assembly
> language. With the documentation supplied by Microport for the System V/AT
> program development and runtime system, it is *impossible* to even attempt to
> write a minimum assembler program. Compared to the excellent documentation of
> the linkkit, it is strange that there is no chapter on usage of the assembler
> and on coding guidelines.

I was asking Microport for as(1) documentation over two years ago.
Guess they still haven't found it. ;-)  They claimed that AT&T
did not supply any, and that was that.

There are several obvious ways to get a handle on as(1) syntax.
The linkkit includes gdt.s as an example.  You can also get
.s output from cc(1).  And sdb can be coerced into disassembling
pieces of working code.  The C User's Group has some public
domain assemblers for various 8- and 16-bit chips, and the author
picked a uniform assembler syntax based on the Unix System V
assembler.  These disks must (?) come with some documentation
on the syntax, but I haven't seen it.  I guess the same author
is now selling versions of the code, as the Feb 89 issue of
Embedded Systems Programming magazine has a review of ten
cross assemblers and mentions PseudoCode distributed by KORE
at (616)791-933 based on the same System V as(1) syntax.

But the real question is why do you need to write large
amounts of as(1)?  The table of contents for 7th Edition
Unix, dated Jan 10, 1979, has the entry

UNIX Assembler Reference Manual.  D. M. Richie.
	The ultimate dead language.

[It describes the PDP-11 Unix assembler in 12 pages, might
help you as a last resort]

Make your first pass in C, profile your _working_ driver
to find its bottlenecks, and only then think of tweaking those
routines by hand.  

Didn't Knuth say something like

"Premature optimization is the root of all programming evil."


-- 
A. Lester Buck		...!texbell!moray!siswat!buck

james@bigtex.cactus.org (James Van Artsdalen) (02/06/89)

In <750@cgch.UUCP>, whna@cgcha.uucp (Heinz Naef) wrote:

> Could anyone give me a pointer to related documentation, or post an
> existing assembler program of reasonable size? Thanks in advance.

You can deduce a lot with a little effort by using "cc -S foo.c".  You
could also look at GNU C source, which knows how to output that stuff.
-- 
James R. Van Artsdalen          james@bigtex.cactus.org   "Live Free or Die"
DCC Corporation     9505 Arboretum Blvd Austin TX 78759         512-338-8789

phil@bcscal.UUCP (Phil Kemp) (02/07/89)

Seems to me that Microport's bbs has in the general directory a file
which contains the 386 version docs.. I downloaded them to my system
sometime last year. The docs aren't complete but they should give you
the needed information.

BTW, if you need a copy I could FAX you one.  Please E-Mail directly. 
( Sorry, I don't have the doc's online anymore. )

Good luck.
-- 
Phil Kemp
Boeing Computer Services, Calgary
Voice - (403)-269-8281
phil@bcscal.uucp

mike@cimcor.mn.org (Michael Grenier) (02/07/89)

From article <375@siswat.UUCP>, by buck@siswat.UUCP (A. Lester Buck):
> In article <750@cgch.UUCP>, whna@cgcha.uucp (Heinz Naef) writes:
>> The assembly language processed by the as(1) command of Microport System V/AT
>> write a minimum assembler program. Compared to the excellent documentation of
>> the linkkit, it is strange that there is no chapter on usage of the assembler
>> and on coding guidelines.
# 
# I was asking Microport for as(1) documentation over two years ago.
# Guess they still haven't found it. ;-)  They claimed that AT&T
# did not supply any, and that was that.


Come on guys, the documentation has been on the Microport BBS
for about a year now. I believe the new phone for it is
1-408-441-0137 for 2400/1200 baud. Its really the 386 Assembly Language
Docs but the assembler is identical except that the 286 is a
subset (the 386 instructions are documented as such).



   -Mike Grenier
    mike@cimcor.mn.org
    uunet!rosevax!cimcor!mike

dave@viper.Lynx.MN.Org (David Messer) (02/07/89)

In article <750@cgch.UUCP> whna@cgcha.uucp (Heinz Naef) writes:
 >The assembly language processed by the as(1) command of Microport System V/AT
 >has a completely different semantics, different instruction mnemonics and a
 >different assembler control (macro) language than usual assemblers for the
 >80x86 personal computers.

It's pretty close to PDP-11 assembler though... :-)

 >When writing a device driver at the lowest level (i. e. not on top of another
 >device driver) then there is a need to develop certain parts in assembly
 >language. With the documentation supplied by Microport for the System V/AT
 >program development and runtime system, it is *impossible* to even attempt to
 >write a minimum assembler program. Compared to the excellent documentation of
 >the linkkit, it is strange that there is no chapter on usage of the assembler
 >and on coding guidelines.

It is difficult, but not quite impossible.  I wrote a driver for the
IBM joystick port that incorporated a small assembly language routine
to access the hardware.  (It is highly timing dependent.)

What I did was write a C program that did approximatly what I wanted and
generated an assembly language version using the C-compiler.  (I.e.
the command "cc -S file.c" produces file.s)  I then hacked this file
to do what I wanted.  I posted this driver a year or so ago, but if
there is interest, I'll post it again.

I am curious as to what you are doing that requires assembly-language.
Unless you have extreme timing or efficiency requirements, there isn't
very much that you can't do in C.


-- 
_____________________________________________________________________________
   __                     _ _ _              David Messer - Lynx Data Systems
  /  )              /    ' ) ) )                 dave@Lynx.MN.Org  -or-
 /  / __. , __o  __/      / / / _  _   _   _  __     ...{amdahl,hpda}!bungia!
/__/_(_/|_\\/ <__(_/_     / ' (_</_/_)_/_)_</_/ (_                 viper!dave

mdm@cocktrice.UUCP (Mike Mitchell) (02/08/89)

In article <750@cgch.UUCP> whna@cgcha.uucp (Heinz Naef) writes:
>The assembly language processed by the as(1) command of Microport System V/AT
>has a completely different semantics, different instruction mnemonics and a
>different assembler control (macro) language than usual assemblers for the
>80x86 personal computers.
>
>I repeatedly tried to directly contact technical support of Microport and
>also Mr. Plocher and Mr. Sully. Even though I included the serial# of my
>distribution, I didn't get any response.

Microport will not give you doo doo on this, I called a long time ago and
tried to get even a simple table of opcodes which were implemented, no luck.

The best thing I have found is the combination of compiling various C programs
with the -S switch and see what type of assembly output is generated, and 
running various .o modules through "dis" (which is undocumented anywhere I
have looked).

If you find a source which has good details on this, please drop me a line.


-- 
Mike Mitchell				BELL:	(505) 471-7639
2020 Calle Lorca #43			ARPA:	mdm@cocktrice.UUCP
Santa Fe, NM 87505			UUCP:	...!uunet!dmk3b1!cocktrice!mdm