// JP opened flex table

Click to See Complete Forum and Search --> : 3pass-assembler


Alpha Vijayan
May 5th, 2004, 02:38 AM
How 3 pass assembler is different from 2 pass assembler?While simulating a 3 pass assembler, what should be done in the third pass( 1st pass -symbol table creation, 2nd pass- getting the addresses, third pass?)
Thank you for reading this thread

OReubens
May 5th, 2004, 03:58 PM
3rd step would involve (multiple fases) of demoting relative jumps to a smaller size (jump relative with 32bit offset to 16 or 8 bit offset and jump relative 16bit to 8 bit). This of course requires you to shift code to smaller addresses requiring you to recalculate other target addresses/offsets. This may again allow you to decrease the size of other relative jumps.

If you automatically assembled (short) conditional jumps into the inverse to allow long jumps. (ex. turning a JC x into JNC cont; JMP X; cont:), the third step would also involve folding this construct back into the single jump if the target address now lies within range.

//JP added flex table