Hello,
I noticed that NASM generates a different code than NASM for the register-to-register version of MOV, SUB, SBB, AND and some other instructions. And I am very curious why this is done. Technical reasons, speed? Or just first pick?
My reason for this curiosity: From the '80s on I disassembled various XT/AT (clone) BIOSes to see how they work and to be able to write my own own that is focussed on testing suspicious motherboards. Some years ago I switched to NASM and it wasn't until I disassembled the BIOS of a Commodore PC and assembled it again with NASM some months ago that I noticed that the generated code was different. FYI: after recalculating the checksum the 'new' BIOS worked as fine as the original one.
Lately I disassembled Turbo Pascal 3 and ran into the same problem. That's why I decided to write my own assembler; one that would accept (my) NASM code and could, if needed, generate the alternative code. That's how I found out about the exact differences.
FYI: my assembler and disassembler are written in Free Pascal and are based on ones I wrote for the 6502, Z80 and other CPUs. Another good reason to write them: it was fun! :)
And don't worry about a competitor: both are only able to handle 8088 and 80286 (partly) instructions and I won't expand that.
Kind regards, Ruud Baltissen