The other thing with assemblers. Different ones use different relocatable binary formats. In Linux you will likely use ELF, in Windows there's PE. Any assembler will have to support the binaries of your systems linker, many support several.
WRT other OS dependent stuff. It's mostly about calling conventions. You'll use different ABI's depending on platform. This goes from how they handle function calls to what interrupts the system uses. You can use one assembler to produce Linux code from Windows, it just probably won't work on Windows without modification.
As for not knowing C. Don't worry. Essentially you traditionally pick a register and say all returned values will be stored in that register (perhaps if you use a double word variable you will have a convention for the second register). Then you establish a similar convention for passed arguments. Once you've done this you are left handling what state you have to push on the stack (so it is saved) before a new function call so that function can use your registers. The best advice that can be given is to explicitly state in comments what each variable in a function is, there aren't nice labels in ASM programming (at least there aren't always nice labels).


LinkBack URL
About LinkBacks





Reply With Quote





Bookmarks
Algorithms and Data Structures
Java tutorials
Algorithms Forum