Reputation: 8529
I sometimes like to play with inline assembly in C(++) to learn more about it and easily interact with it. I looked into tutorials for assemblers like NASM, but it seems you have to pay attention to a lot of OS specific details to do just about anything.
Is there a way to play with assembly where I can just write simple functions and call them from C or something like that? Perhaps an assembler with object files as output?
Basically I'm interested in learning how to turn problems into low level instructions, I don't want to deal with the boilerplate code to print messages to the screen and all that.
Note that I'm not intending to write actual programs in assembly language. I know compilers do a much better job at it than I ever will. I'm just doing it for fun, essentially solving puzzles.
Upvotes: 0
Views: 229
Reputation: 62048
You may be interested in following Paul Carter's PC Assembly Tutorial. It's for NASM and pretty much any C compiler (gcc, Open Watcom, Borland's, Microsoft's).
Upvotes: 1