Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

!07/11 PDP a ni deppart m'I !pleH


programming / alt.lang.asm / Re: new 80386 assembler

SubjectAuthor
* new 80386 assemblerPaul Edwards
+* Re: new 80386 assemblerFrank Kotler
|`* Re: new 80386 assemblerPaul Edwards
| `* Re: new 80386 assemblerFrank Kotler
|  +- Re: new 80386 assemblerPaul Edwards
|  `* Re: new 80386 assemblerKerr-Mudd, John
|   `* Re: new 80386 assemblerPaul Edwards
|    `- Re: new 80386 assemblerKerr-Mudd, John
+* Re: new 80386 assemblerRod Pemberton
|`* Re: new 80386 assemblerPaul Edwards
| `- Re: new 80386 assemblerRod Pemberton
+* Re: new 80386 assemblerRod Pemberton
|`* Re: new 80386 assemblerPaul Edwards
| `- Re: new 80386 assemblerRod Pemberton
`* Re: new 80386 assemblerPaul Edwards
 `- Re: new 80386 assemblerPaul Edwards

1
Subject: new 80386 assembler
From: Paul Edwards
Newsgroups: alt.lang.asm
Date: Thu, 27 Jan 2022 17:16 UTC
X-Received: by 2002:ad4:5941:: with SMTP id eo1mr3588518qvb.50.1643303767954;
Thu, 27 Jan 2022 09:16:07 -0800 (PST)
X-Received: by 2002:aca:5c8a:: with SMTP id q132mr7914087oib.160.1643303767663;
Thu, 27 Jan 2022 09:16:07 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Thu, 27 Jan 2022 09:16:07 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=202.169.113.201; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 202.169.113.201
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com>
Subject: new 80386 assembler
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Thu, 27 Jan 2022 17:16:07 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 60
View all headers
There is a C compiler called SubC which is a now,
sort of, a usable subset of C90.

I am interested in modifying it to emit intel syntax
instead of the current AT&T syntax which is fed
into gnu as.

At the same time I would like to write an assembler
that takes that emitted source and produces a.out
object code, and later a linker to produce a.out
executables. I'm after simplicity at the moment.

I would like the assembler code above to be able
to be assembled with Microsoft's assembler.

The example of Microsoft code I have at the moment
looks like this:

..386

..model flat,c

_DATA   segment dword 'DATA'
_DATA   ends
_BSS    segment dword 'BSS'
_BSS    ends

_TEXT segment 'CODE'


public __setj
__setj proc env:dword
        mov eax, env
        push ebx


My expectation is that the "proc" would not be
supported by my assembler because it would not
be generated assembler. I would have a label instead.

My understanding is that Microsoft now supports
simplified directives of .code (or is it .text?) and .data.
I assume there is also a .bss. When did Microsoft start
supporting this syntax? I'm wondering whether I should
stick to the "segment" syntax.

The assembler will be public domain.

I have my own build of binutils 2.14a and I might be able
to modify "as" so that it also handles the above assembler
format. E.g. by making the ".intel_syntax" directive a
command line option.

I'm only vaguely aware of what I am trying to do.

What is a sensible goal? All the masm-compatible
assemblers that I am aware of, like wasm, are
copyrighted, and I would like to introduce
something, anything, that is public domain.

Thanks. Paul.


Subject: Re: new 80386 assembler
From: Frank Kotler
Newsgroups: alt.lang.asm
Organization: Aioe.org NNTP Server
Date: Thu, 27 Jan 2022 22:07 UTC
References: 1
Path: i2pn2.org!i2pn.org!aioe.org!sXHLdz67tdmFId1HQoSTJA.user.46.165.242.75.POSTED!not-for-mail
From: fbkot...@myfairpoint.net (Frank Kotler)
Newsgroups: alt.lang.asm
Subject: Re: new 80386 assembler
Date: Thu, 27 Jan 2022 17:07:18 -0500
Organization: Aioe.org NNTP Server
Message-ID: <ssv52g$dc1$1@gioia.aioe.org>
References: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="13697"; posting-host="sXHLdz67tdmFId1HQoSTJA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.5.2
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
View all headers
....
I'm only vaguely aware of what I am trying to do.

No offense intended, Paul, but this sounds like a bad idea!

Best,
Frank


Subject: Re: new 80386 assembler
From: Paul Edwards
Newsgroups: alt.lang.asm
Date: Thu, 27 Jan 2022 23:14 UTC
References: 1 2
X-Received: by 2002:a05:620a:849:: with SMTP id u9mr4102659qku.408.1643325243765;
Thu, 27 Jan 2022 15:14:03 -0800 (PST)
X-Received: by 2002:a05:6808:2306:: with SMTP id bn6mr7989467oib.70.1643325243556;
Thu, 27 Jan 2022 15:14:03 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Thu, 27 Jan 2022 15:14:03 -0800 (PST)
In-Reply-To: <ssv52g$dc1$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=202.169.113.201; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 202.169.113.201
References: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com> <ssv52g$dc1$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <917e1a38-a077-4db1-a5c2-e128d4842ebcn@googlegroups.com>
Subject: Re: new 80386 assembler
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Thu, 27 Jan 2022 23:14:03 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 8
View all headers
On Friday, January 28, 2022 at 9:07:16 AM UTC+11, Frank Kotler wrote:
...
I'm only vaguely aware of what I am trying to do.

No offense intended, Paul, but this sounds like a bad idea!

Can you elaborate?

Thanks. Paul.


Subject: Re: new 80386 assembler
From: Frank Kotler
Newsgroups: alt.lang.asm
Organization: Aioe.org NNTP Server
Date: Fri, 28 Jan 2022 05:42 UTC
References: 1 2 3
Path: i2pn2.org!i2pn.org!aioe.org!sXHLdz67tdmFId1HQoSTJA.user.46.165.242.75.POSTED!not-for-mail
From: fbkot...@myfairpoint.net (Frank Kotler)
Newsgroups: alt.lang.asm
Subject: Re: new 80386 assembler
Date: Fri, 28 Jan 2022 00:42:53 -0500
Organization: Aioe.org NNTP Server
Message-ID: <ssvvod$r7v$1@gioia.aioe.org>
References: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com>
<ssv52g$dc1$1@gioia.aioe.org>
<917e1a38-a077-4db1-a5c2-e128d4842ebcn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="27903"; posting-host="sXHLdz67tdmFId1HQoSTJA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.5.2
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
View all headers
On 01/27/2022 06:14 PM, Paul Edwards wrote:
On Friday, January 28, 2022 at 9:07:16 AM UTC+11, Frank Kotler wrote:
...
I'm only vaguely aware of what I am trying to do.

No offense intended, Paul, but this sounds like a bad idea!

Can you elaborate?


Well, yeah. If you're going to try to create another assembler, on top of all the assemblers out there, I think you ought to have a firm idea what you want to do. You actually seem to have a pretty good idea. You want it to be Masm syntax. (why?) And you want it to be Public Domain. Some people like Public Domain. I guess you do. Some people will tell you that Public Domain is like freeing your slaves but allowing someone else to enslave them again. I am not a lawyer.

If that's what you want to do, fine. You were the one who said  you didn't have a clear idea...

For example:
Masm:
mov eax, offset foo ; address
mov eax, foo ; contents
Nasm:
mov eax, foo ; address
mov eax, [foo] ; contents

Is there a reason to prefer one over the other? Perhaps so.
Just random? That's what doesn't seem like a good idea to me. Maybe you just don't like AT&T? (G)as and Yasm will accept either Intel or AT&T.

I like Nasm, but I don't have a good reason why. But then, I'm not writing it...

That's all I meant...

Best,
Frank



Subject: Re: new 80386 assembler
From: Paul Edwards
Newsgroups: alt.lang.asm
Date: Fri, 28 Jan 2022 09:07 UTC
References: 1 2 3 4
X-Received: by 2002:a05:6214:e84:: with SMTP id hf4mr6634469qvb.12.1643360878592;
Fri, 28 Jan 2022 01:07:58 -0800 (PST)
X-Received: by 2002:a05:6830:457:: with SMTP id d23mr4356173otc.371.1643360878374;
Fri, 28 Jan 2022 01:07:58 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Fri, 28 Jan 2022 01:07:58 -0800 (PST)
In-Reply-To: <ssvvod$r7v$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=202.169.113.201; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 202.169.113.201
References: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com>
<ssv52g$dc1$1@gioia.aioe.org> <917e1a38-a077-4db1-a5c2-e128d4842ebcn@googlegroups.com>
<ssvvod$r7v$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3056ffc6-f96a-4aef-b1b7-6c6fbcd6ba1an@googlegroups.com>
Subject: Re: new 80386 assembler
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Fri, 28 Jan 2022 09:07:58 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 40
View all headers
On Friday, January 28, 2022 at 4:42:44 PM UTC+11, Frank Kotler wrote:

Well, yeah. If you're going to try to create another assembler, on top
of all the assemblers out there, I think you ought to have a firm idea
what you want to do. You actually seem to have a pretty good idea. You
want it to be Masm syntax. (why?) And you want it to be Public Domain.

I was brought up with Microsoft being the industry
standard and everyone looking for compatibility with
them.

For my MSDOS programming I have written my code
such that it assembles with tasm and wasm, with the
belief that it will also assemble on masm, but not
actually testing that.

Now I am doing something new - writing an OS in C.
Actually I've already done that (PDOS/386), but now
I have a new design, PDOS-generic, and I'm on the
verge of having a new compiler, SubC. But SubC
generates AT&T syntax and depends on the rest of
the GNU toolchain.

But this switch of toolchain is just a new idea I had.
It is only in the last week or so that SubC has sort of
become viable, and only in the last few days that I
found out that a simple assembler/archiver/linker
is only 2500 lines of code in total (based on the DOS
one that comes with SubC), so something I may
be able to achieve.

If I combine this with msged's ability to import and
export text files, I should be able to put together an
entirely public domain development environment.
This would allow freeware people to have a base to
work with instead of contributing to copyrighted
projects, and unrestricted commercial derivatives.

Part of competing with Microsoft's monopoly.

BFN. Paul.


Subject: Re: new 80386 assembler
From: Kerr-Mudd, John
Newsgroups: alt.lang.asm
Organization: Dis
Date: Fri, 28 Jan 2022 09:14 UTC
References: 1 2 3 4
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: adm...@127.0.0.1 (Kerr-Mudd, John)
Newsgroups: alt.lang.asm
Subject: Re: new 80386 assembler
Date: Fri, 28 Jan 2022 09:14:53 +0000
Organization: Dis
Lines: 35
Message-ID: <20220128091453.603cbfbe2e7b1f7ee154a80a@127.0.0.1>
References: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com>
<ssv52g$dc1$1@gioia.aioe.org>
<917e1a38-a077-4db1-a5c2-e128d4842ebcn@googlegroups.com>
<ssvvod$r7v$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="70f7e88fb4a7c7d331a7f582bb43ff02";
logging-data="14989"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nyeKvlJWcgDYM6lHSMP/AI9cDyWI6/go="
Cancel-Lock: sha1:1baph4TZWtTdUKveHvuT+K/eJJw=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
;X-no-Archive: Maybe
GNU: Terry Pratchett
View all headers
On Fri, 28 Jan 2022 00:42:53 -0500
Frank Kotler <fbkotler@myfairpoint.net> wrote:

On 01/27/2022 06:14 PM, Paul Edwards wrote:
On Friday, January 28, 2022 at 9:07:16 AM UTC+11, Frank Kotler wrote:
...
I'm only vaguely aware of what I am trying to do.

No offense intended, Paul, but this sounds like a bad idea!

Can you elaborate?


Well, yeah. If you're going to try to create another assembler, on top
of all the assemblers out there, I think you ought to have a firm idea
[]

Is there a reason to prefer one over the other? Perhaps so.
Just random? That's what doesn't seem like a good idea to me. Maybe you
just don't like AT&T? (G)as and Yasm will accept either Intel or AT&T.

I like Nasm, but I don't have a good reason why. But then, I'm not
writing it...

I use Nasm; it took me a little while (mostly learning the macro language) and I really don't like that they force [segreg:reg] e.g.

mov al,[es:di] ; nasm
mov al,es:[di] ; no good under nasm

I'm a lot happier not to have to specify
assume cs:code, ds:code
like you do in Masm *every time*!

--
Bah, and indeed Humbug.


Subject: Re: new 80386 assembler
From: Rod Pemberton
Newsgroups: alt.lang.asm
Organization: Aioe.org NNTP Server
Date: Sat, 29 Jan 2022 19:54 UTC
References: 1
Path: i2pn2.org!i2pn.org!aioe.org!JKehOyGOGgs2f2NKLRXdGg.user.46.165.242.75.POSTED!not-for-mail
From: noem...@basdxcqvbe.com (Rod Pemberton)
Newsgroups: alt.lang.asm
Subject: Re: new 80386 assembler
Date: Sat, 29 Jan 2022 14:54:48 -0500
Organization: Aioe.org NNTP Server
Message-ID: <st45v3$toq$2@gioia.aioe.org>
References: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="30490"; posting-host="JKehOyGOGgs2f2NKLRXdGg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
View all headers
On Thu, 27 Jan 2022 09:16:07 -0800 (PST)
Paul Edwards <mutazilah@gmail.com> wrote:

There is a C compiler called SubC which is a now,
sort of, a usable subset of C90.

In regards to using SubC or another C compiler,
see my reply on a.o.d.

Just an FYI, Nils M Holm, the author of SubC is a
citizen of Germany.  Germany's legal system doesn't
have a public domain concept, which is a U.S. legal
system concept used to represent works of the U.S.
government owned by it's citizens.  The concept of
public domain has never been tested for individuals
in the U.S. and may not be legal.  I.e., everything
produced by Nils is automatically copyrighted under
German laws, and the same is probably true for you
as well as an Australian citizen ...

I didn't bring up copyrights again to start an
argument, but just so that you could compare with
the open source licensed software below, which are
"irrelevant" if you're not modifying their code, i.e.,
if you're just using the software.

I am interested in modifying it to emit intel syntax
instead of the current AT&T syntax which is fed
into gnu as.

Ok.

At the same time I would like to write an assembler
that takes that emitted source and produces a.out
object code, and later a linker to produce a.out
executables. I'm after simplicity at the moment.

You might look at JWasm, Japheth's replacement
version of OpenWatcom's WASM, which is a
MASM-compatible assembler.  It's not public domain,
but is open source (Sybase license).

https://www.japheth.de/JWasm.html

Personally, I prefer NASM's syntax to MASM or
AT&T/GAS.  I'm the least comfortable with MASM.
YASM also uses NASM syntax, which is supposedly
like TASM's ideal-mode syntax.  NASM and YASM
are both open source, under 2- and 3- clause
BSD licenses.  BSD and MIT licenses are usually
about as close to public domain as you can get.

https://www.nasm.us/
https://yasm.tortall.net/


--
Biden is proving that Trump was correct all along.



Subject: Re: new 80386 assembler
From: Paul Edwards
Newsgroups: alt.lang.asm
Date: Sat, 29 Jan 2022 20:57 UTC
References: 1 2
X-Received: by 2002:a05:6214:e6f:: with SMTP id jz15mr11812547qvb.22.1643489875416;
Sat, 29 Jan 2022 12:57:55 -0800 (PST)
X-Received: by 2002:a05:6808:171c:: with SMTP id bc28mr9407268oib.178.1643489875170;
Sat, 29 Jan 2022 12:57:55 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Sat, 29 Jan 2022 12:57:55 -0800 (PST)
In-Reply-To: <st45v3$toq$2@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=202.169.113.201; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 202.169.113.201
References: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com> <st45v3$toq$2@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <09cc01cc-8584-4dc5-ac1a-846859b90a28n@googlegroups.com>
Subject: Re: new 80386 assembler
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Sat, 29 Jan 2022 20:57:55 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 83
View all headers
On Sunday, January 30, 2022 at 6:53:10 AM UTC+11, Rod Pemberton wrote:

Just an FYI, Nils M Holm, the author of SubC is a
citizen of Germany. Germany's legal system doesn't
have a public domain concept, which is a U.S. legal
system concept used to represent works of the U.S.
government owned by it's citizens.

It's also what happens to all copyrighted work 70 years
after the death of the author. Not just in the US either.
What did you think the legal status of Shakespeare's
Hamlet was in Germany? GPL v2?

What is different in Germany etc is whether you can
release your work into the public domain with a PD
notice. Nils has CC0 to cover that in jurisdictions
where that is an issue. As do I for PDOS.

The concept of
public domain has never been tested for individuals
in the U.S. and may not be legal.

The fact that no individual has ever released their work
to the public domain and then turned around and attempted
to sue someone for copyright infringement is a good track
record, not something to be concerned about.

I.e., everything
produced by Nils is automatically copyrighted under
German laws, and the same is probably true for you
as well as an Australian citizen ...

Even if things are copyrighted by default, that doesn't
mean you need to make matters worse by explicitly
including a copyright statement.

Even if a jurisdiction doesn't recognize releasing things
to the public domain as valid, that doesn't mean there is
something wrong with writing those words regardless,
to show what you really want to do, even if some
jurisdictions ignore it.

I didn't bring up copyrights again to start an
argument, but just so that you could compare with
the open source licensed software below, which are
"irrelevant" if you're not modifying their code, i.e.,
if you're just using the software.

It's not "irrelevant" to me. I don't trust that a court
won't find that one of the 273 license conditions in
GPL was violated by me using the software. Only a
court can decide that, repeatedly. Until the court
decision is overturned, repeatedly.

But it's irrelevant anyway - if I discover a problem with
software I am using, I want to be able to debug it and
fix it and recoup my costs by distributing a closed-source
version of the software that is better than the original.

At the same time I would like to write an assembler
that takes that emitted source and produces a.out
object code, and later a linker to produce a.out
executables. I'm after simplicity at the moment.

You might look at JWasm, Japheth's replacement

That doesn't produce a.out:

native support for output formats Intel OMF, MS Coff (32/64-bit), Elf (32/64-bit), Binary, Windows PE (32/64-bit) and DOS MZ

But again, I'm after a public domain assembler, and it
sounds like mine is going to be the best one on the
market after I've written 1 line of code.

NASM and YASM
are both open source, under 2- and 3- clause
BSD licenses. BSD and MIT licenses are usually
about as close to public domain as you can get.

Besides actual public domain/CC0, like mine will be.
Mine might be based on Nils's public domain 8086
assembler though.

BFN. Paul.


Subject: Re: new 80386 assembler
From: Rod Pemberton
Newsgroups: alt.lang.asm
Organization: Aioe.org NNTP Server
Date: Sat, 29 Jan 2022 21:00 UTC
References: 1
Path: i2pn2.org!i2pn.org!aioe.org!JKehOyGOGgs2f2NKLRXdGg.user.46.165.242.75.POSTED!not-for-mail
From: noem...@basdxcqvbe.com (Rod Pemberton)
Newsgroups: alt.lang.asm
Subject: Re: new 80386 assembler
Date: Sat, 29 Jan 2022 16:00:59 -0500
Organization: Aioe.org NNTP Server
Message-ID: <st49r5$t0m$1@gioia.aioe.org>
References: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="29718"; posting-host="JKehOyGOGgs2f2NKLRXdGg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
View all headers
On Thu, 27 Jan 2022 09:16:07 -0800 (PST)
Paul Edwards <mutazilah@gmail.com> wrote:

There is a C compiler called SubC which is a now,
sort of, a usable subset of C90.

I am interested in modifying it to emit intel syntax
instead of the current AT&T syntax which is fed
into gnu as.


There appears to be a limited 8086 assembler
s86 included with Subc.

At the same time I would like to write an assembler
that takes that emitted source and produces a.out
object code, and later a linker to produce a.out
executables. I'm after simplicity at the moment.

I would like the assembler code above to be able
to be assembled with Microsoft's assembler.


It appears you need to change the code in:

cgsynth() in files in src/targets/cg/
cgsynth() in src/cg.c
ngen() sgen() lgen() etc in src/gen.c

Most of this appears to be simple text strings.
So, you just need to replace with equivalent syntax.


--
Biden is proving that Trump was correct all along.



Subject: Re: new 80386 assembler
From: Rod Pemberton
Newsgroups: alt.lang.asm
Organization: Aioe.org NNTP Server
Date: Sat, 29 Jan 2022 21:19 UTC
References: 1 2 3
Path: i2pn2.org!i2pn.org!aioe.org!JKehOyGOGgs2f2NKLRXdGg.user.46.165.242.75.POSTED!not-for-mail
From: noem...@basdxcqvbe.com (Rod Pemberton)
Newsgroups: alt.lang.asm
Subject: Re: new 80386 assembler
Date: Sat, 29 Jan 2022 16:19:48 -0500
Organization: Aioe.org NNTP Server
Message-ID: <st4aue$hhu$1@gioia.aioe.org>
References: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com>
<st45v3$toq$2@gioia.aioe.org>
<09cc01cc-8584-4dc5-ac1a-846859b90a28n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="17982"; posting-host="JKehOyGOGgs2f2NKLRXdGg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
View all headers
On Sat, 29 Jan 2022 12:57:55 -0800 (PST)
Paul Edwards <mutazilah@gmail.com> wrote:

On Sunday, January 30, 2022 at 6:53:10 AM UTC+11, Rod Pemberton wrote:

You might look at JWasm, Japheth's replacement

That doesn't produce a.out:


What does?

native support for output formats Intel OMF, MS Coff (32/64-bit), Elf
(32/64-bit), Binary, Windows PE (32/64-bit) and DOS MZ

There are object converters.  Maybe, there is one for a.out?

I know of GNU objcopy and Agner Fog's objconv.  On 64-bit Linux,
objcopy lists "a.out-i386-linux".  a.out isn't listed for objconv.


--
Biden is proving that Trump was correct all along.



Subject: Re: new 80386 assembler
From: Paul Edwards
Newsgroups: alt.lang.asm
Date: Sun, 30 Jan 2022 00:55 UTC
References: 1 2
X-Received: by 2002:ad4:5f89:: with SMTP id jp9mr12567053qvb.130.1643504137914;
Sat, 29 Jan 2022 16:55:37 -0800 (PST)
X-Received: by 2002:a05:6808:2022:: with SMTP id q34mr13400604oiw.228.1643504137694;
Sat, 29 Jan 2022 16:55:37 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Sat, 29 Jan 2022 16:55:37 -0800 (PST)
In-Reply-To: <st49r5$t0m$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=202.169.113.201; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 202.169.113.201
References: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com> <st49r5$t0m$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <39ab2900-b50e-42e0-9610-464ad66d95fan@googlegroups.com>
Subject: Re: new 80386 assembler
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Sun, 30 Jan 2022 00:55:37 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 28
View all headers
On Sunday, January 30, 2022 at 7:59:20 AM UTC+11, Rod Pemberton wrote:

There is a C compiler called SubC which is a now,
sort of, a usable subset of C90.

I am interested in modifying it to emit intel syntax
instead of the current AT&T syntax which is fed
into gnu as.

There appears to be a limited 8086 assembler
s86 included with Subc.

Yes, that's what made me realize that I should be able
to write an 80386 assembler too. It's only 1400 lines
of code.

That doesn't produce a.out:

What does?

The binutils included with EMX 0.9d does, which is where
I was introduced to a.out in the first place, and saw that it
was simple.

So I built binutils 2.14a myself with the a.out target, and still
use it today for PDOS/386. I also built the PE target which
PDOS/386 now also supports.

BFN. Paul.


Subject: Re: new 80386 assembler
From: Rod Pemberton
Newsgroups: alt.lang.asm
Organization: Aioe.org NNTP Server
Date: Sun, 30 Jan 2022 06:11 UTC
References: 1 2 3
Path: i2pn2.org!i2pn.org!aioe.org!JKehOyGOGgs2f2NKLRXdGg.user.46.165.242.75.POSTED!not-for-mail
From: noem...@basdxcqvbe.com (Rod Pemberton)
Newsgroups: alt.lang.asm
Subject: Re: new 80386 assembler
Date: Sun, 30 Jan 2022 01:11:02 -0500
Organization: Aioe.org NNTP Server
Message-ID: <st5a2f$1b8e$1@gioia.aioe.org>
References: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com>
<st49r5$t0m$1@gioia.aioe.org>
<39ab2900-b50e-42e0-9610-464ad66d95fan@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="44302"; posting-host="JKehOyGOGgs2f2NKLRXdGg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
View all headers
On Sat, 29 Jan 2022 16:55:37 -0800 (PST)
Paul Edwards <mutazilah@gmail.com> wrote:

On Sunday, January 30, 2022 at 7:59:20 AM UTC+11, Rod Pemberton wrote:

There is a C compiler called SubC which is a now,
sort of, a usable subset of C90.

I am interested in modifying it to emit intel syntax
instead of the current AT&T syntax which is fed
into gnu as.

There appears to be a limited 8086 assembler
s86 included with Subc.

Yes, that's what made me realize that I should be able
to write an 80386 assembler too. It's only 1400 lines
of code.


Well, I created a disassembler, which very closely
matches NDISASM's output (comes with NASM), but only
for 16-bit code, in about 250 lines of C.  It is much
faster than NDISASM, but it can't do 32-bit, 64-bit,
mixed-mode code, etc.  I haven't been able to do a full
brute force comparison of the entire 16-bit x86 instruction
set between the two because of size of the output.

A GAS syntax style disassembler  (again, not an assembler)
called 486DIS (486dis_c.zip) is only about 1500 lines
of C code.  I worked on updating it for a while, but
never released my fixes.  It has a very simple design,
and used char arrays of strings for the instructions.
It was very easy to modify.  It was for DOS, open source.

486dis_c.zip is on Simtel.  Maybe, there is a decently
designed assembler there too, which could provide ideas.

disassemblers
(index)
http://www.lanet.lv/simtel.net/msdos/disasm-pre.html
(files)
https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/disasm/

assemblers
(index)
http://www.lanet.lv/simtel.net/msdos/asmutl-pre.html
(files)
https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/asmutl/


--
Biden is proving that Trump was correct all along.



Subject: Re: new 80386 assembler
From: Paul Edwards
Newsgroups: alt.lang.asm
Date: Thu, 24 Feb 2022 19:08 UTC
References: 1
X-Received: by 2002:a5d:58e3:0:b0:1ed:b97e:18b6 with SMTP id f3-20020a5d58e3000000b001edb97e18b6mr3531103wrd.77.1645729733227;
Thu, 24 Feb 2022 11:08:53 -0800 (PST)
X-Received: by 2002:a05:6808:1208:b0:2cf:433f:1a17 with SMTP id
a8-20020a056808120800b002cf433f1a17mr7915246oil.252.1645729732853; Thu, 24
Feb 2022 11:08:52 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.88.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Thu, 24 Feb 2022 11:08:52 -0800 (PST)
In-Reply-To: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=202.169.113.201; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 202.169.113.201
References: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6c7e9e3a-2097-4217-a654-5e0e5cd08c53n@googlegroups.com>
Subject: Re: new 80386 assembler
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Thu, 24 Feb 2022 19:08:53 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
Someone else (from Slovakia) volunteered to write the
assembler, but wanted AT&T syntax instead of masm,
which is certainly fine for now. It can produce a.out or
coff object code. You can find the code here:

https://sourceforge.net/p/pdos/gitcode/ci/master/tree/pdas/

We're still debugging it so that it can assemble the output
of SubC. It currently assembles it, but there are problems
with the generated code.

BFN. Paul.


Subject: Re: new 80386 assembler
From: Paul Edwards
Newsgroups: alt.lang.asm
Date: Thu, 24 Feb 2022 19:10 UTC
References: 1 2 3 4 5
X-Received: by 2002:a5d:408c:0:b0:1ee:6c0f:1830 with SMTP id o12-20020a5d408c000000b001ee6c0f1830mr2252629wrp.687.1645729855005;
Thu, 24 Feb 2022 11:10:55 -0800 (PST)
X-Received: by 2002:aca:d7d6:0:b0:2d4:5514:1765 with SMTP id
o205-20020acad7d6000000b002d455141765mr8242832oig.38.1645729854529; Thu, 24
Feb 2022 11:10:54 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.88.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Thu, 24 Feb 2022 11:10:54 -0800 (PST)
In-Reply-To: <20220128091453.603cbfbe2e7b1f7ee154a80a@127.0.0.1>
Injection-Info: google-groups.googlegroups.com; posting-host=202.169.113.201; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 202.169.113.201
References: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com>
<ssv52g$dc1$1@gioia.aioe.org> <917e1a38-a077-4db1-a5c2-e128d4842ebcn@googlegroups.com>
<ssvvod$r7v$1@gioia.aioe.org> <20220128091453.603cbfbe2e7b1f7ee154a80a@127.0.0.1>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a2648b6e-129b-4da7-a50d-394ef501c87an@googlegroups.com>
Subject: Re: new 80386 assembler
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Thu, 24 Feb 2022 19:10:54 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
On Friday, January 28, 2022 at 8:14:54 PM UTC+11, Kerr-Mudd, John wrote:

I'm a lot happier not to have to specify
assume cs:code, ds:code
like you do in Masm *every time*!

Are you sure you need to specify that in masm?

masm is happy with this code:

https://sourceforge.net/p/pdos/gitcode/ci/master/tree/pdpclib/winsupa.asm

BFN. Paul.


Subject: Re: new 80386 assembler
From: Kerr-Mudd, John
Newsgroups: alt.lang.asm
Organization: Dis
Date: Thu, 24 Feb 2022 20:37 UTC
References: 1 2 3 4 5 6
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: adm...@127.0.0.1 (Kerr-Mudd, John)
Newsgroups: alt.lang.asm
Subject: Re: new 80386 assembler
Date: Thu, 24 Feb 2022 20:37:25 +0000
Organization: Dis
Lines: 20
Message-ID: <20220224203725.d69e970a855ffcd7676513a2@127.0.0.1>
References: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com>
<ssv52g$dc1$1@gioia.aioe.org>
<917e1a38-a077-4db1-a5c2-e128d4842ebcn@googlegroups.com>
<ssvvod$r7v$1@gioia.aioe.org>
<20220128091453.603cbfbe2e7b1f7ee154a80a@127.0.0.1>
<a2648b6e-129b-4da7-a50d-394ef501c87an@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="9f43b692cbe47d8ebf5cd0bcb8fa7e04";
logging-data="22822"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1967LPDGKmFcJKb0Ha0lvWOJmkMFUAfg0Y="
Cancel-Lock: sha1:QNrhru+Y31/SISJVNDo4GIhFLnA=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
;X-no-Archive: Maybe
GNU: Terry Pratchett
View all headers
On Thu, 24 Feb 2022 11:10:54 -0800 (PST)
Paul Edwards <mutazilah@gmail.com> wrote:

On Friday, January 28, 2022 at 8:14:54 PM UTC+11, Kerr-Mudd, John wrote:

I'm a lot happier not to have to specify
assume cs:code, ds:code
like you do in Masm *every time*!

Are you sure you need to specify that in masm?

masm is happy with this code:

https://sourceforge.net/p/pdos/gitcode/ci/master/tree/pdpclib/winsupa.asm


Ah, well I was/am talking about early masm (2.0?)

--
Bah, and indeed Humbug.


Subject: Re: new 80386 assembler
From: Paul Edwards
Newsgroups: alt.lang.asm
Date: Wed, 16 Mar 2022 07:42 UTC
References: 1 2
X-Received: by 2002:a05:622a:5d1:b0:2e0:70c7:1678 with SMTP id d17-20020a05622a05d100b002e070c71678mr25207282qtb.43.1647416541336;
Wed, 16 Mar 2022 00:42:21 -0700 (PDT)
X-Received: by 2002:aca:36c1:0:b0:2ec:cf67:b8ef with SMTP id
d184-20020aca36c1000000b002eccf67b8efmr3226591oia.115.1647416540986; Wed, 16
Mar 2022 00:42:20 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Wed, 16 Mar 2022 00:42:20 -0700 (PDT)
In-Reply-To: <6c7e9e3a-2097-4217-a654-5e0e5cd08c53n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=202.169.113.201; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 202.169.113.201
References: <2a70d64b-388d-4f8e-82ca-a786497b70d1n@googlegroups.com> <6c7e9e3a-2097-4217-a654-5e0e5cd08c53n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7b6bba7c-0303-486a-a5b8-a57502fab886n@googlegroups.com>
Subject: Re: new 80386 assembler
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Wed, 16 Mar 2022 07:42:21 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 14
View all headers
On Friday, February 25, 2022 at 6:08:54 AM UTC+11, Paul Edwards wrote:

https://sourceforge.net/p/pdos/gitcode/ci/master/tree/pdas/

We're still debugging it so that it can assemble the output
of SubC. It currently assembles it, but there are problems
with the generated code.

As of a few hours ago, the debugging has been done and
we now have an 80386 assembler capable of handling
SubC recompiling itself, so we have a totally public domain
development suite, limited to the subset of C90 that SubC
supports.

BFN. Paul.


1
rocksolid light 0.7.2
clearneti2ptor