Hi,

On Tue, Jul 5, 2022 at 12:59 PM Carlos Teixeira <carlos.t...@gmail.com> wrote:
>
> What i don't like about A86 is that allows you to do stuff that is actually 
> "forbidden".

I believe A86 intends to be "mostly" compatible with old MASM v5, but
it does have some shortcuts and enhancements.

> For instance, from what i remember, A86 allows you to do something like:
>
> MOV ES, B800h
>
> This is absolutely not supported by the CPU, and you need to use a general 
> purpose register to move a value
> onto a segment register. So the actual A86 assembled code looks like this:
>
> PUSH AX
> MOV AX, B800h
> MOV ES, AX
> POP AX

Of course, just do this (requires 186):

PUSH 0B800h
POP ES

By default, I think A86 targets whatever your host cpu supports, but
you can lower it (e.g. +P0 cmdline for 8086) or let it "emulate" (186
vs. 8086 output via +P64 from same source).

The manual is very clear on matters like this.

But most code isn't written for (or compatible) with A86, sadly. There
used to be AFIX for various PC Magazine sources, but those aren't
available anymore. You can probably still search for ASNIP40[abc].ZIP
and 80xxx_9[56].zip snippets, but A86 support is rare. (Honestly, it
bugs me how unportable code is between assemblers.)

> I believe that it is very important for a begginer to understand how the ISA 
> works otherwise this will just lead to confusion later.

Assuming they care about segmentation (CS, DS, ES, SS) and 8086 vs.
186 (push immediate) at all.

> What i like about FASM is that it is very strict so you learn to do things 
> properly from the get go.
> Its raw and gritty so it might be a little more frustrating at start but 
> you'll really learn things.

FASM from the beginning was "flat", i.e. 386 host, and it doesn't
support 16-bit OMF/OBJ output at all. A86 is in a different field
entirely, but both are good for what they're meant for. (FASM
assembles itself and has a nice DOS IDE. You can link COFF output with
DJGPP.)

For AMD64 / x64, there's modern books (for Linux, OS X, Windows) and
supporting tools like Ray Seyfarth's (N.B. PDF version):

* http://rayseyfarth.com/asm/


_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to