FPC 16-bit (80186 cpu + NASM info) (Announce)
> > BTW: will be supported the inline assembler with all modetn instructions
> > known to FPC?
>
> Nikolay said that the assembler reader is basically the i386 one, only he
> has it now artificially limited to root out 186+ instructions easier.
NASM supports "cpu 8086" to avoid (most) invalid instructions. (I think it used to only miss catching near 386+ jumps. Perhaps out of range short jumps can be conveniently worked around by -O2, but I can't remember exactly without checking. That was useful for porting xWcopy, though.)
Anything NASM version after 0.98.39 only compiles (officially) with C99 and 32-bit host (probably due to higher requirements from adding 64-bit). In other words, the latest 16-bit DOS .EXE (0.98.39) was here. And IIRC there was a bug (only fixed in unofficial Apple 0.98.40) regarding crashes on 256 or more externs. Also, can't remember, but the newer NASM manuals omit the (large) instruction reference, though at least latest seems to have a small index of instructions and cpus when introduced (though not as friendly, IMHO, without full descriptions).
If it helps, there's also a 186 asm/disasm ASCII chart (table) made back in the day on Simtel.net mirrors under /asmutl/ : disasm.zip
I also made my own wimpy refernce for my own amusement:
+---------------------------------+
| Intel 80186, 80188 (aka, "186") |
+---------------------------------+
Features:
=========
shl cx,5 ; (shr,sar,rol,ror,rcl,rcr,...)
imul ax,5
imul ax,bx,5
push 5
pusha
popa
enter ; enter stack frame (nested procedure variables)
leave ; leave stack frame
bound ; array bounds checking (calls INT 5)
into ; overflow checking (calls INT 4)
insb, insw ; read from port in DX to [ES:DI]
outsb, outsw ; write [DS:SI] to port in DX
Quirks:
=======
shl ax,33 ; doesn't always clear AX anymore (now only uses 5 bits)
pop cs ; not allowed anymore
push sp ; still decremented before push, unlike 286
aam 10 ; not supported by NEC V20/V30
salc ; undocumented but "should" still work
P.S. Feel free to ignore all of this, you don't have to pass it along to Nikolai. Though if he's messing with DOS, perhaps he should visit here himself!!
Complete thread:
- FPC 16-bit - marcov, 26.04.2013, 09:41 (Announce)
- FPC 16-bit - Laaca, 26.04.2013, 16:14
- FPC 16-bit - marcov, 26.04.2013, 22:30
- FPC 16-bit - DOS386, 28.04.2013, 14:53
- FPC 16-bit - marcov, 29.04.2013, 10:17
- FPC 16-bit - Laaca, 29.04.2013, 12:52
- FPC 16-bit - marcov, 30.04.2013, 17:36
- FPC 16-bit - marcov, 01.05.2013, 19:47
- FPC 16-bit (80186 cpu + NASM info) - Rugxulo, 03.05.2013, 10:40
- FPC 16-bit (80186 cpu + NASM info) - marcov, 03.05.2013, 15:10
- FPC 16-bit (80186 cpu + NASM info) - Rugxulo, 03.05.2013, 10:40
- FPC 16-bit - Rugxulo, 30.04.2013, 14:00
- FPC 16-bit - marcov, 30.04.2013, 17:15
- FPC 16-bit - Rugxulo, 01.05.2013, 03:12
- FPC 16-bit - marcov, 03.05.2013, 23:27
- FPC 16-bit - Rugxulo, 06.05.2013, 17:43
- FPC 16-bit - marcov, 08.05.2013, 23:39
- FPC 16-bit - Rugxulo, 15.05.2013, 19:00
- FPC 16-bit - marcov, 15.05.2013, 21:27
- FPC 16-bit - Rugxulo, 15.05.2013, 22:44
- FPC 16-bit - Laaca, 16.05.2013, 10:15
- FPC 16-bit - Rugxulo, 16.05.2013, 20:35
- FPC 16-bit - marcov, 16.05.2013, 20:46
- FPC 16-bit - marcov, 16.05.2013, 21:26
- FPC 16-bit - marcov, 16.05.2013, 21:19
- FPC 16-bit - Rugxulo, 17.05.2013, 07:52
- FPC 16-bit - marcov, 05.06.2013, 13:34
- FPC 16-bit - Rugxulo, 06.06.2013, 00:03
- FPC 16-bit - marcov, 01.07.2013, 22:29
- FPC 16-bit - Rugxulo, 07.07.2013, 01:52
- FPC 16-bit - marcov, 01.07.2013, 22:29
- FPC 16-bit - Rugxulo, 06.06.2013, 00:03
- FPC 16-bit - marcov, 05.06.2013, 13:34
- FPC 16-bit - Rugxulo, 17.05.2013, 07:52
- FPC 16-bit - Laaca, 16.05.2013, 10:15
- FPC 16-bit - Rugxulo, 15.05.2013, 22:44
- FPC 16-bit - marcov, 15.05.2013, 21:27
- FPC 16-bit - Rugxulo, 15.05.2013, 19:00
- FPC 16-bit - marcov, 08.05.2013, 23:39
- FPC 16-bit - Rugxulo, 06.05.2013, 17:43
- FPC 16-bit - marcov, 03.05.2013, 23:27
- P5 (PCOM/PINT) with FPC 2.7.1 snapshot - Rugxulo, 03.05.2013, 10:53
- P5 (PCOM/PINT) with FPC 2.7.1 snapshot - marcov, 03.05.2013, 15:04
- FPC 16-bit - Rugxulo, 01.05.2013, 03:12
- FPC 16-bit - marcov, 30.04.2013, 17:15
- FPC 16-bit - Laaca, 29.04.2013, 12:52
- FPC 16-bit - marcov, 29.04.2013, 10:17
- FPC 16-bit - Laaca, 26.04.2013, 16:14