Paul Edwards
2022-11-06 04:14:55 UTC
Hi.
This has just been released:
https://github.com/robertapengelly/as86
along with a corresponding:
https://github.com/robertapengelly/ld86
Previously the only public domain 8086 assembler
I had access to is the one that came with SubC.
This new assembler produces 16-bit a.out, which is a
format I am happy to standardize on.
What I'm more hazy about is the assembly language.
Basically what I'm looking for is the lowest common
denominator of the latest versions of DOS-supporting
masm, wasm, and as86.
Unfortunately multiple memory models interest me -
tiny, small, large and huge, so I can't easily just pick one.
It is unclear to me how much effort would be required to
change SubC to generate large memory model instead of
small memory model, which would eliminate my interest
in small.
Tiny I am interested in due to boot sector code, but since
that is hand-written anyway, it could probably be considered
large anyway.
Also during booting (of PDOS/86) I have an IO.SYS which is
tiny memory model, but since it will always be loaded at a
fixed address, I may be able to get ld86 to generate an
appropriate binary image and I can switch to large.
I don't use huge at the moment - that is a future plan - so that
can be deferred.
The author of as86, Robert, is willing to make enhancements,
but I don't want to ask for too much.
I'm happy to rewrite my assembler source - there's not that
much.
I'm not interested in other dialects like nasm - in the long term
I am looking for 100% masm-compatibility, but in the short
term I'm willing to use conditional assembly as required.
Sophisticated things like "proc" which gives you variables
and saves registers, like this:
int86 proc uses ax bx cx dx si di ds es, \
intnum:word, regsin:ptr, regsout:ptr
are probably a bridge too far at the moment, so I will
define those manually, e.g. intnum [bp+6] for large
memory model.
Maybe he can easily add @DataSize - I assume there is
a corresponding @CodeSize - which may help.
I noticed one divergence from masm.
Masm doesn't like this:
.data
L2:
db 'h'
And instead requires:
L2 db 'h'
(for the beginning of a hello world string generated by SubC)
as86 doesn't like the other way around.
Is there a way of coding acceptable to both?
Otherwise I need to see if I can get Robert to accept
both (as wasm does).
Any suggestions on where I stand?
In the short term I'm willing to accept hacks in order
to move onto the public domain tools.
Thanks. Paul.
This has just been released:
https://github.com/robertapengelly/as86
along with a corresponding:
https://github.com/robertapengelly/ld86
Previously the only public domain 8086 assembler
I had access to is the one that came with SubC.
This new assembler produces 16-bit a.out, which is a
format I am happy to standardize on.
What I'm more hazy about is the assembly language.
Basically what I'm looking for is the lowest common
denominator of the latest versions of DOS-supporting
masm, wasm, and as86.
Unfortunately multiple memory models interest me -
tiny, small, large and huge, so I can't easily just pick one.
It is unclear to me how much effort would be required to
change SubC to generate large memory model instead of
small memory model, which would eliminate my interest
in small.
Tiny I am interested in due to boot sector code, but since
that is hand-written anyway, it could probably be considered
large anyway.
Also during booting (of PDOS/86) I have an IO.SYS which is
tiny memory model, but since it will always be loaded at a
fixed address, I may be able to get ld86 to generate an
appropriate binary image and I can switch to large.
I don't use huge at the moment - that is a future plan - so that
can be deferred.
The author of as86, Robert, is willing to make enhancements,
but I don't want to ask for too much.
I'm happy to rewrite my assembler source - there's not that
much.
I'm not interested in other dialects like nasm - in the long term
I am looking for 100% masm-compatibility, but in the short
term I'm willing to use conditional assembly as required.
Sophisticated things like "proc" which gives you variables
and saves registers, like this:
int86 proc uses ax bx cx dx si di ds es, \
intnum:word, regsin:ptr, regsout:ptr
are probably a bridge too far at the moment, so I will
define those manually, e.g. intnum [bp+6] for large
memory model.
Maybe he can easily add @DataSize - I assume there is
a corresponding @CodeSize - which may help.
I noticed one divergence from masm.
Masm doesn't like this:
.data
L2:
db 'h'
And instead requires:
L2 db 'h'
(for the beginning of a hello world string generated by SubC)
as86 doesn't like the other way around.
Is there a way of coding acceptable to both?
Otherwise I need to see if I can get Robert to accept
both (as wasm does).
Any suggestions on where I stand?
In the short term I'm willing to accept hacks in order
to move onto the public domain tools.
Thanks. Paul.