FPC 16-bit (80186 cpu + NASM info) (Announce)
> 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,
Good to know. But note that inline assembler and backend-assembler are two different things.
The inline assembler is based on converted tables of NASM (for x86 likes at least).
The backend assembler happens to be nasm for the 16-bit port, but is not used otherwise. But e.g. the internal assembler can read an instruction as mnemonic, but output it to the backend assembler using db's.
> 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).
That's no problem. There is no use for a 16-bit hosted one, since the compiler won't be 16-bit hosted anyway.
> enter ; enter stack frame (nested procedure variables)
> leave ; leave stack frame
Not used in practice, due to nesting limits (31 or 32). Leave is sometimes used.
> bound ; array bounds checking (calls INT 5)
> into ; overflow checking (calls INT 4)
Not used afaik.
> insb, insw ; read from port in DX to [ES:DI]
> outsb, outsw ; write [DS:SI] to port in DX
No instructions a compiler would generate (manual assembler in libraries maybe)
> 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
> [/code]
Of those, probably only push sp could be generated by the compiler, and that that change is fairly known (detections are based on it).
And since I always had a 386+ (even in my 16-bit times), I'm not that well versed in this.
> 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!!
He might already have a look from time to time already.
Complete thread:
- FPC 16-bit - marcov, 26.04.2013, 09:41
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- 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
Mix view