Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

MSA2 and one-pass assemblers (Announce)

posted by Rugxulo Homepage, Usono, 16.12.2019, 19:32

> 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:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 253 users online (0 registered, 253 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum