[MINIX LOGO]

Assembly Syntax Inconsistency in MINIX?

modified: 08 Jun 2004


From: drminix@naver.com (Sam)
Subject: assembly syntax inconsistency in MINIX.
Date: 31 May 2004 19:42:42 -0700

I was reading two different MINIX assembly files, masterboot.s and
mpx386.s. I then came across some differences between the assembly
syntax used in each files.

In mpx386.s, each section starts with .sect followed by the section
name. For example, a text section starts with .sect .text

However in masterboot.s, a text section starts with just .text 

MASTERBOOT.S       |        MPX386.s
---------------------------------------
.text              |     .sect .text
.data              |     .sect .data

And also, the pound sign(#) is used to indicate an immediate data in
masterboot.s whereas using a pound sign(#) in mpx386.s gives you an
error.

I guess minix compiler understands both syntax. Can anyone tell me why
there are two different ways to start a section?

From: kjb=733616@cs.vu.nl (Kees J Bot)
Subject: Re: assembly syntax inconsistency in MINIX.
Date: Tue, 1 Jun 2004 12:18:58 +0200

There's that, and there's this:

mov ax, #10         |     mov ax, 10
mov ax, variable    |     mov ax, (variable)

The syntax for the 16-bit assembler under the 16-bit version was changed
to be like Xenix or something.  I have no idea why.

The 32-bit assembler uses the syntax on the right, both with 8086 and
386 input.  I had to make an assembly syntax converter to allow this
assembler to process the Xenix syntax.  The -Was-ncc option tells the
compiler driver that the assembly input is the "new cc" syntax.  (Yes,
there's also an "old cc" syntax.  Luckily we buried that.)

From: Lew Pitcher <Lew.Pitcher@td.com>
Subject: Re: assembly syntax inconsistency in MINIX.
Date: Tue, 01 Jun 2004 07:57:02 -0400

Wasn't Minix 1.x asld developed to look like the IBM PC-IX assembler?

IIRC, the Minix 1.5 handbook mentions PC-IX compatability in the
"Extended Manual" page for asld, and the 1st edition OSDI says something
about Minix 1 being developed on a PC-IX system.

Date: Thu, 03 Jun 2004 07:30:48
Subject: Re: assembly syntax inconsistency in MINIX.
From: Kees J Bot <kjb=733618@cs.vu.nl>

That's true.  The only thing that was good about using the Xenix syntax
is that PC/IX --> Xenix translation could be done with a simple sed
script.  My own converter is a tad more complicated at 5000 lines of C...

[HOME] [HINTS/FAQ] [MINIX DOWNLOADS] [CONTRIB SOFTWARE]
[NET SOFTWARE] [MINIX-VMD] [TEXTBOOK] [LINKS]

All material on this site not otherwise attributed is copyright ©1994-2004 Albert S. Woodhull
Click here for information on copying and other use.
Mail comments on this page to: Al Woodhull <awoodhull@hampshire.edu>
Viewable With Any Browser    [Valid XHTML 1.0!]