Original Post
I'm currently trying to build a assembler backend for my scripting language, which is luckily already a C like language (as in simplicity in variable handling, it is kinda useless as a scripting engine). I already knew quite a bit about assembler but not on the actual machine code level. Now that I'm able to write simple helloworld bootloaders with my own assembler I begin to wonder why certain instructions have multiple opcodes. For instance several 'mov' instructions dealing with the 'ax' register have separate op codes. These are smaller then the ones who apply to any register. Are these instructions faster or do they serve no other point then reducing binary size? How does this apply to jmp's? I can understand that a far jump is slower then a short jump because of the need to update registers. Does this also apply to jmp rel8 vs jmp rel16/32? I did some Google searches but I couldn't find anything useful. Are there more people out there who are writing there own assembler/compiler because they spent so much time on their scripting engine that it seems quite a waste not to do so, my intermediate language (which is interpreted by my scripting engine) is already nothing more then a glorified assembler language.
Chargh,
Chargh,