![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 333
Rep Power: 4
![]() |
getting started
As something to keep me busy over the summer im thinking of exploring assembly language. I know some java so im not new to the whole programming thing. However, can someone tell me exactly what i need to get started writing and executing assembly programs?
|
|
|
|
|
|
#2 |
|
Professional Programmer
|
To start writing ASM programs, all you need is a text editor. Notepad or Vi will work just fine. To start learning ASM, search this forum for tutorials. There have been some very, very good ones linked to and uploaded. To get you started, check out http://win32asm.cjb.net/ for Win32 ASM programming. To compile them, you need a compiler. In my opinion, DO use either FASM or NASM, and DON'T use TASM or MASM.
Assembly is, basically, a lot easier than most languages. However, there is a LOT more to remember than in any other language IMHO. Good luck!
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;} |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 333
Rep Power: 4
![]() |
whats RosAsm? Is it just an IDE for assembly like netbeans is an IDE for Java?
|
|
|
|
|
|
#4 |
|
The Supreme Ruler
![]() Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6
![]() |
I reccomend getting the book Assembly Language Step-By-Step by Jeff Duntemann. He's a great writer. That book teaches NASM syntax.
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower |
|
|
|
|
|
#5 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 333
Rep Power: 4
![]() |
ok so i downloaded the nasm to compile. I know it works because i made just a blank file and gave it a .asm extension to see if it would compile and it did. However when i tried to compile an actual example program i found on the internet it didnt work. It kept giving me errors I tried many different examples from different websites i found. The most common errors im getting are: "Attempt to define a local label before any non-local label and "instruction expected." Can someone tell me what im doing wrong? is it with the compiler or is it possible the examples are wrong? Also if someone can give me jus a short sample program just so i can compile it and see it work that would be greatly appreciated. Thanks
|
|
|
|
|
|
#6 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 333
Rep Power: 4
![]() |
ok so ive figured out that assembly is very architecture specific so does anyone know of any good online tutorials of assembly for intel based system with nasm as the compiler? I really dont want to buy a book.
|
|
|
|
|
|
#7 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
You need to buy a book -- and not one that just teaches you a particular assembler. If you think it's the same as writing a little C or something, think again. It's as procedural as you get, as Von Neumann as it comes. You need to learn to think in architecture terms before you dedicate yourself to a specific syntax.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#8 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
yeah, pick a CPU. usually intel x86....
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
|
|
#9 |
|
Hobbyist Programmer
Join Date: Nov 2004
Location: 1691 miles East of L.A.
Posts: 159
Rep Power: 4
![]() |
I suggest you use MASM or FASM. MASM will be easier to get used to if you know a HLL as it has high level macros such as .if .else that assemble to the proper corresponding jumps. MASM has a large user base and the community is very helpful. Example code is also plentiful. FASM has less examples and such but is very good as well. FASM can also be used for Linux.
__________________
-- lostcauz Stepped in what?... Behind whose barn?... I didn't even know they had a cow! |
|
|
|
|
|
#10 |
|
Newbie
Join Date: Mar 2005
Posts: 11
Rep Power: 0
![]() |
I don't know of netbeans, cwl157, but RosAsm is not 'just an IDE for assembly". It is an integration, in one single program, of Assembler, Debugger, Disassembler, Resources Editors, Sources Editor, IDE, and so...
The advantages of this complete Integration, on other the Asm IDEs, are many. For example, you can [F4] for setting a Dynamic Break Point at some Source Position, hit [F6] for a run (that is executed automatically through the Debugger), step directly through the Source Editor, with Statement enlighted, and with the many features available, in the manner of some of the most user-friendly HLL-IDEs. Another example is with the Disassembler, that on small Demos, may be able to restitute a Source, that could be re-compiled immidiately, with Resources, and all..., turning the whole package into a kind of "Two-Clicks-Disassembler-Re-Assembler", what is rather a fresh new concept, in the area of PEs programming. Betov. < http://rosasm.org > |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|