muta...@gmail.com
2022-11-16 09:06:00 UTC
There is a fantastic new development - a public domain
8086 assembler written in C90:
https://github.com/robertapengelly/as86
And there is a matching ld86 at the same place.
I've been working with the author, Robert, on getting
it to handle my hand-written assembler.
It uses a.out format, which has a 16-bit flavor.
Because of that, I can't really make use of it yet
until I have SubC able to handle my code base,
but I am preparing for that time, and have been
revamping my handwritten assembler.
However, I came across this unusual assembler,
the use of "seg", and have provided a dummy
program below.
It occurs to me that the a.out format may not be able
to handle the concept of only getting the segment
part of an address, and that I should instead rewrite
my code to reference it as an external address, so
that the concept exists of a simple address reference.
Anyone know?
Thanks. Paul.
C:\devel\pdos\src>wasm test.asm
Open Watcom Assembler Version 1.6
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
test.asm: 15 lines, 0 warnings, 0 errors
C:\devel\pdos\src>wlink file test.obj form dos
Open Watcom Linker Version 1.6
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
loading object files
creating a DOS executable
C:\devel\pdos\src>type test.asm
.model large
.stack 1000h
.code
top:
mov cx, seg dummy
dummy:
ret
end top
8086 assembler written in C90:
https://github.com/robertapengelly/as86
And there is a matching ld86 at the same place.
I've been working with the author, Robert, on getting
it to handle my hand-written assembler.
It uses a.out format, which has a 16-bit flavor.
Because of that, I can't really make use of it yet
until I have SubC able to handle my code base,
but I am preparing for that time, and have been
revamping my handwritten assembler.
However, I came across this unusual assembler,
the use of "seg", and have provided a dummy
program below.
It occurs to me that the a.out format may not be able
to handle the concept of only getting the segment
part of an address, and that I should instead rewrite
my code to reference it as an external address, so
that the concept exists of a simple address reference.
Anyone know?
Thanks. Paul.
C:\devel\pdos\src>wasm test.asm
Open Watcom Assembler Version 1.6
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
test.asm: 15 lines, 0 warnings, 0 errors
C:\devel\pdos\src>wlink file test.obj form dos
Open Watcom Linker Version 1.6
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
loading object files
creating a DOS executable
C:\devel\pdos\src>type test.asm
.model large
.stack 1000h
.code
top:
mov cx, seg dummy
dummy:
ret
end top