Hello,

I'm a newbie here, and ASM programming too!

My friend is finding a compiler for 80186 for his project. I said that he can use MASM 6.11 for his compiler. But he said that 80186 are combined by 80x86 and 8051, means it are a microcontroller and a microprocessor too, many functions! :confused: Because I'm a newbie, so I'm not sure I'm right. :stupid:

So please show me what is the compiler for 80186!

Thanks in advance!
Posted on 2003-12-01 20:50:14 by marring
Just use the .186 directive to limit the instruction set to 80186 instructions:

.186
.model tiny,stdcall
option casemap:none
Posted on 2003-12-01 20:53:05 by donkey
Well, the 186 is not an 8051, but yes (now that I've looked at the docs) it is a microcontroller.

The embedded peripherals are located in the PCB (peripheral control block) which is mapped into memory or I/O address space. The PCB starts out in I/O space from 0FF00h to 0FFFFh. The RELREG register which maps the PCB is located in the PCB.

What this means is that, immediately after reset, you can use standard x86 IN and OUT instructions to handle the embedded peripherals. After remapping, you use IN/OUT or ordinary non-I/O x86 instructions, depending on whether the PCB remains in I/O space or is remapped into memory space.

What this also means is that there are NO x86 instructions that are special to the 80186. In other words, any x86 assembler that handles 16-bit code for the 186 or later will do the job. You just need to use the restricted instruction set (8086 + a few instructions), and a linker for 16-bit code. If you aren't running DOS (or a compatible OS) on the 186, you may want to add a locator, such as JLoc, to your software toolset to gain more control over the final binary code.
Posted on 2003-12-02 19:36:29 by tenkey