• public domain as86

    From Paul Edwards@mutazilah@nospicedham.gmail.com to comp.lang.asm.x86 on Sat Nov 5 21:14:55 2022
    From Newsgroup: comp.lang.asm.x86

    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.

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Alexei A. Frounze@alexfrunews@nospicedham.gmail.com to comp.lang.asm.x86 on Sat Nov 5 22:22:30 2022
    From Newsgroup: comp.lang.asm.x86

    On Saturday, November 5, 2022 at 9:22:38 PM UTC-7, Paul Edwards wrote:
    ...
    Masm doesn't like this:

    .data
    L2:
    db 'h'

    If it helps, you could probably do:

    L2 label byte
    db 'h'

    Alex

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Paul Edwards@mutazilah@nospicedham.gmail.com to comp.lang.asm.x86 on Sat Nov 5 22:52:25 2022
    From Newsgroup: comp.lang.asm.x86

    On Sunday, November 6, 2022 at 1:24:15 PM UTC+8, Alexei A. Frounze wrote:

    If it helps, you could probably do:

    L2 label byte
    db 'h'

    Thanks!

    That should be relatively simple to at least hack to be the
    equivalent of "L2:", so I'll ask for that.

    BFN. Paul.

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From =?UTF-8?Q?Pavel_vitsoft_=C5=A0ruba=C5=99?=@pavel.srubar@nospicedham.gmail.com to comp.lang.asm.x86 on Wed Nov 9 12:20:22 2022
    From Newsgroup: comp.lang.asm.x86

    On Sunday, November 6, 2022 at 5:22:38 AM UTC+1, Paul Edwards wrote:
    tiny, small, large and huge, so I can't easily just pick one.

    Perhaps you could look at EuroAssembler, it is free, supports PROC, STRUC, %MACRO etc. and of course it assembles both
    L2:
    db 'h'
    and
    L2 db 'h' .

    Example of 16bit MZ program for DOS in large memory model: https://euroassembler.eu/eatests/t7933.htm

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Paul Edwards@mutazilah@nospicedham.gmail.com to comp.lang.asm.x86 on Wed Nov 9 19:50:45 2022
    From Newsgroup: comp.lang.asm.x86

    On Thursday, November 10, 2022 at 4:57:28 AM UTC+8, Pavel vitsoft +aruba+O wrote:
    On Sunday, November 6, 2022 at 5:22:38 AM UTC+1, Paul Edwards wrote:
    tiny, small, large and huge, so I can't easily just pick one.
    Perhaps you could look at EuroAssembler, it is free, supports PROC, STRUC, %MACRO etc. and of course it assembles both
    L2:
    db 'h'
    and
    L2 db 'h' .

    Example of 16bit MZ program for DOS in large memory model: https://euroassembler.eu/eatests/t7933.htm
    It took a while to find the copyright notice: https://euroassembler.eu/eadoc/#Licence
    I already have a copyrighted assembler that is suitable for my
    purposes - wasm, although I guess one thing that is missing
    is that it isn't C90-compliant and even if it was, it hasn't been
    recompiled so that it runs under PDOS/386.
    If Euroassembler was C90-compliant already and could handle
    my code, and was compiled into a Windows executable that
    was only dependent on msvcrt.dll and could be shipped as
    part of PDOS/386, I would have a use for it in the short term
    perhaps.
    But long term I'm trying to move to a public domain one, even
    if it is bare bones. I'm happy for my assembler source to be
    made neater as the PD assembler improves over time, like
    over the next 500 years.
    The PD one is being actively worked on now (like, minutes ago),
    as I try to find out what is possible.
    BFN. Paul.
    --- Synchronet 3.21d-Linux NewsLink 1.2