MSA2 and one-pass assemblers (Announce)
> Code for CALLER.PAS was wroten very fast - so i am ask for leniency.
> You are right, ut is good point - fix it for TP5.5.
No worries, I don't demand anyone fix it. Just saying, I can't properly build it. But I still wanted to pass along the tip about the length function.
> PS: I am little be stuck in code generation process (problem when label
> change offset betweet compiler pass) - i am try convert msa2 into single
> pass assembler. When i solve this trouble in my way - i will be very near
> to obj generation. This is the reason, why i have no new commits now
> (nothing ready).
I'm not fully sure what "one pass" means. It must mean different things to different people.
A86 is one pass and fast. TASM was originally one-pass only (until version 2.0). PSR Invaders comes with a pre-assembled .COM, but he forgot to use multi-pass (/m or /m3), so it's inefficient output (9356 vs. 9194 bytes). Even A86 won't automatically shorten forward jumps (except local labels), only backwards jumps, but otherwise it optimizes for size where it can.
NASM 0.97 was two-pass only but didn't optimize for size. That was added later (-O3 or -Ox), eventually becoming default. Some assemblers are better about size than others. I don't blame those that don't, simplicity is a virtue, and slow hardware of the time hampered everyone. Still, verbose source annotations just to save a few bytes are redundant. But usually it doesn't practically matter at all anyways.
Just saying, adapting non-standard x86 asm syntax across various assemblers is a bit of a chore, but it's worse when instruction opcode sizes don't match up (changing all offsets and displacements). The varying instruction size (unlike RISC) makes it much harder to verify that the program is accurate to the original. In other words, unless INVADERS.COM is exactly 9194 bytes, I don't know how to "prove" it's correct (even with disassembly). Sometimes I've had to do some weird kludges just to get it to match 100% exactly (with instructions, not encodings).
Complete thread:
- MSA assembler released under MIT - DosWorld, 10.11.2019, 13:44 (Announce)
- MSA assembler released under MIT - tom, 10.11.2019, 19:00
- MSA assembler released under MIT - DosWorld, 12.11.2019, 14:42
- MSA assembler released under MIT - Rugxulo, 15.11.2019, 03:24
- MSA assembler released under MIT - DosWorld, 15.11.2019, 16:38
- MSA2 and TP7 overlays - Rugxulo, 02.12.2019, 20:47
- MSA2 and TP7 overlays - marcov, 03.12.2019, 16:37
- MSA2 and TP7 overlays - Rugxulo, 04.12.2019, 03:59
- MSA2 and TP7 overlays - marcov, 04.12.2019, 10:41
- Turbo Pascal overlays (overleden? ha!) - Rugxulo, 16.02.2020, 03:48
- Turbo Pascal overlays - Rugxulo, 18.02.2020, 03:03
- Turbo Pascal overlays & NASM Preprocessor - ecm, 05.03.2020, 16:42
- Turbo Pascal overlays (overleden? ha!) - Rugxulo, 16.02.2020, 03:48
- MSA2 and TP7 overlays - marcov, 04.12.2019, 10:41
- MSA2 and TP7 overlays - Rugxulo, 04.12.2019, 03:59
- MSA2 and TP7 overlays - rr, 03.12.2019, 21:34
- MSA2 and TP7 overlays - Rugxulo, 14.12.2019, 13:28
- MSA2 and TP7 overlays - rr, 14.12.2019, 23:42
- MSA2 and TP7 overlays - marcov, 15.12.2019, 21:07
- MSA2 and TP7 overlays - Rugxulo, 16.12.2019, 19:15
- MSA2 and TP7 overlays - marcov, 15.12.2019, 21:07
- MSA2 and TP7 overlays - rr, 14.12.2019, 23:42
- MSA2 and TP7 overlays - DosWorld, 15.12.2019, 21:42
- MSA2 and one-pass assemblers - Rugxulo, 16.12.2019, 19:32
- MSA2 compilation with GCC - Rugxulo, 12.02.2020, 08:18
- MSA2 and TP7 overlays - marcov, 03.12.2019, 16:37
- MSA assembler released under MIT - Rugxulo, 15.11.2019, 03:24
- MSA assembler released under MIT - DosWorld, 12.11.2019, 14:42
- MSA assembler released under MIT - tom, 10.11.2019, 19:00