|Hello, I've been trying to learn assembly language using NASM(Netwide assembler) as compiler. It feels like I've searched the entire net, twice but still can't find anything good. I know basic instructions like mov, add,sub,dec,inc and various interrupts, and I know how to work with the registers(good enough, I believe). Problem is, I've just installed windows 7 64bit on the computer I work with most of the time and I write 16 bit programs with nasm. Win7 64bit can't execute 16 bit programs for some reason I don't know. Anyway I need to know how to compile my 16 bit code to 32 bit PE's. I also need to know how to call a c function from nasm, and not some function like printf, but my own function. I wan't to use the winAPI as little as possible, and I want my programs to be as small as possible(the reason I'm using assembly, it seems even c loads all kinds of crap into the final executable.). Anyhow, the primary question is how to link my 16bit code to 32bit executables. When I try ld(gcc) to link an object file produced by NASM it doesn't work. If I have any interrupts in my code the programs just seems to fail. Why?|
Thanks for all help, and feel free to post links to any tutorials for NASM. I'd love to know more on how I can make my programs smaller and faster.
Live the life as you know it