I'm just starting out trying to learn assembler. I've been trying to compare NASM and MASM to see which dialect would be better to concentrate on learning. I don't really know enough yet though to be able see how significant the differences are and what the advantages to each are (I suppose I could just try to learn both). I was wondering if someone had experience with both and could give me some guidance. Thanks.
Posted on 2001-06-28 21:19:00 by arcbee
I've heard that they have different methods of implementing the message loop. Another assembler called FAsm has more obvious differences. But with the use of macro, stucts, etc., any assembler can be made to look like another.
Posted on 2001-06-28 21:28:00 by eet_1024
i think you will find that masm will be your best choice. most people on this message board use masm so getting help will be pretty easy. you wont find another assembly message board around where you can get help like around here. the best tutorials around are tutorials designed to be used with masm anyways. masm is really good assembler and i hear so are some of the others such as nasm but i guarentee that you have a harder time trying to learn assembly using anything else besides masm. smurf
Posted on 2001-06-28 21:46:00 by smurf
At this point in time, MASM in 32 bit windows is more powerful and it has far better support than NASM so in the first instance to learn assembler, MASM will be a better choice. When you are more experienced with assembler you will be able to pick your way through some of the different assemblers available. NASM is well suited for LINUX and there are a couple of assemblers being developed that are being mentioned on this forum from time to time. Both FASM and Spasm are in their development cycle at the moment and will continue to become more powerful as they are developed further. Regards, hutch@pbq.com.au
Posted on 2001-06-28 22:20:00 by hutch--
; Making use of NASM's power ; ; For a long time, assembly language programmers did everything the hard way. ; Indeed, it was only recently really that the use of high-level constructs ; like switch, for and while were introduced into assembly lanugage. In the ; past, assembly programmers have been tempted to do everything the hard ; way and shun these techniques for fear of losing a cycle where one could ; have been saved. ; ; Times are changing though and assembly language must change with it. ; ; Today's programmers don't expect, and nor should they, to have to write ; everything themselves. Compilers have advanced a great deal in the way ; things can be automated but assembly language has lagged, perhaps because ; of its traditional hardcore appearance. ; ; MASM was one of the first to make the bold move in this direction with it's ; conditional .IF statements and powerful macro handling, and Win32asm ; programmers have been quick to capitalise on these abilities as they make ; coding in assembler much nicer. There's no point in forcing the programmer ; to write all the mind-numbing switch or loop logic when these things are ; done the same way every time. If you think about it, how much time do you ; waste writing the assembler code for yet another loop or if-then clause? ; ; NASM has none of these features, but NASM has a very substantial advantage ; over MASM - it has an extremely powerful macro processor. So powerful in ; fact that it can be used to emulate most things other assemblers can do ; anyway. This makes it much more extensible and better - if we don't like ; the way something's implemented we can always change it. ; ; When writing Windows applications, case type statements crop up on a ; regular basis. For this (and the following) example I'll show the typical ; HLL code in C style though the syntax is usually very similar for any HLL: ; ; switch (i) { ; case 0: ; // i = 0 ; break; ; case 1: ; // i = 1 ; break; ; default: ; // i != 0 && i != 1 ; } ; ; In assembler, we _might_ implement this like: ; _switch: mov eax, i ; eax holds variable cmp eax, 0 ; case 0? jne _switch_1 ; no, check next case ; case 0 code goes here jmp _switch_end ; go to end of switch _switch_1: cmp eax, 1 ; case 1? jne _switch_default ; no, onto the default case ; case 1 code goes here jmp _switch_end ; go to end of switch _switch_default: ; default case code goes here _switch_end: ; ; Note the _might_ - a compiler could well implement this as a jump table ; instead, though such a simple example as the one above might not be any ; more efficient, indeed it would probably be slower (assuming the jump ; table hasn't been cached, a plausible scenario). ; ; It only takes a quick glance to see how much work we have to actually do ; to generate something so simple and in Windows applications these are ; very common. However, with appropriate macros we can reduce this to the ; following instead: ; switch eax case 0 ; case 0 code goes here break case 1 ; case 1 code goes here break default ; default case code goes here switchend ; ; The full syntax is: ; switch case , , ..., ; ; code to be executed if switch variable equals any of the specified values ; break ; ; break forces the switch statement to end. If you omit ; this processing will continue at the next case or range statement ; caseand , , ..., ; ; code to be executed if switch variable equals all the specified values, ; of use if you want to check several registers or memory locations ; all equal the switch variable. This and rangeand (below) are included ; more for completeness and because in rare situations you might want them ; break range , , ..., ,
Posted on 2001-07-03 21:04:00 by anonymous
Try NaGoA Visual Assembler RAD for Nasm Gorc and Alink http://visual-assembler.pt.vu send your macros and exemples to assembler@clix.pt will be released in the next pack !
Posted on 2001-07-03 21:07:00 by PedroGC