I am a beginner in win32asm and I am strongly interested in it.

I am studying Iczelion's tutorials. I find the structure of most program is same. The difference is some win32 API.
1)Should I remember about it? (while coding with C , I usually referenced manual.)
2)What should I do after learning the tutor by Iczelion and luoyunbin?
3)What is the most important thing in programing with win32asm.
4)What is the difference between VC and Win32asm?
Posted on 2003-04-21 08:30:13 by lbxxy
Afternoon, lbxxy.

1) No.
2) Have a look through the examples which come with the Masm32 package.
3) All arguments for Win32 API functions are dwords.
4) The syntax.

Practically all win32asm proggys I make are begun from current examples/projects with code deleted out.
It's important to remember which examples do what, and use them as a practical reference in companion with your "PSDK/Win32 Help File/whatever" when you're making your own proggy.

Cheers,
Scronty
Posted on 2003-04-21 08:57:48 by Scronty
1) I doubt there is a need to remember all the uses of the win32api. There is simply too many. However you might remember them if you code alot. Get some reference, such as sdk or the win32api help file
2) Do some coding and hang out at the forums :grin: The best way to learn is still to code and look into other's source code.
3) The code that you produce. Remember than a poorly coded asm is definitely slower and bigger in size than an optmised HLL code, however no HLL codes can beat a well optimised asm. Some people prefer to code in HLL while having their critical portion of their codes be in asm. It is all up to you, you can code purely in asm. But seriously, there is no difference between coding in asm and c if you do not optimising (People would simply say that you are wasting your time)
4) in VC you have no need to care about stack alignment and registers preservation as the compiler does them for you. But asm provides you with more control over your code. You can define a proc without a frame stack (saving some bytes i suppose). The thing I do not like about c is that the typecasting get messy along the way. However if you code in asm, you would realise that most parameters are DWORDs. I suppose asm brings you one step deeper into low level programing as the usage of asm is more important in areas such as OS development as compared with the rest.

PS There are probably more advice coming from the older and more senior members of the board. I am relatively new to asm too and young.

PS lol... Scronty is a step fast than me. A min.
Posted on 2003-04-21 08:58:21 by roticv
lbxxy,

in 32 bit assembler, remember the basic things, the SIZE of the registers as assembler does not normally use data types. al/ah = 8 bit, ax = 16 bit and eax = 32 bit. Always match the size of the data you are using to the register you wish to use.

There is a difference between a variable and a pointer TO a variable. in 32 bit windows, a pointer or more correctly an address is always 32 bit. A variable is a value AT an address so if you stored the number 100 in a DWORD memory address, if you look at the address it will be a big number which may be 6912832 but the value AT that address will still be 100.

The return value for normal integer functions is in the EAX register so if you use the syntax,


invoke Function,parameter etc ...
mov return_value, eax

you copy the return value from it to a variable if you need it.

Feel free to ask members here as you learn as we have all had to do it ourselves and we all know what its like.

Regards,

hutch@movsd.com
Posted on 2003-04-21 09:20:02 by hutch--

1) I doubt there is a need to remember all the uses of the win32api. There is simply too many. However you might remember them if you code alot. Get some reference, such as sdk or the win32api help file


if you use an IDE that has function hints (or whatever they're called), you only have to know what each of the parameters mean instead of having to remember the order as well. i have gone back to notepad (i don't know why - i actually prefer RadASM) which lacks this feature.

oh yeah, an i'm an asm newbie, too (well, getting slightly crusty, but on the whole, new)
Posted on 2003-04-21 10:12:04 by jademtech