I actually know what assembly is.... Its a programming language that is really old... but still powerfull...Right?? Well, i got a few questions about it... so any help you can give would be great
#1. Is assembly a good "First programming language"??? I have started learning C++ but it is extreamly difficult.. Not to mention the "best" compiler is owned by M$
#2. Where can I find an Assembly compiler??? I have a C++ compiler...Visual C++ it cost me tons of $$$.. Will an assembly compiler cost just as much???
#3. Are there any assembly tutorials out there??? Wait.. stupid question :) (Ha! caught myself that time) There are some in the "Tutorials" section of the forums right? If their are any others that you recommend... plz inform me
Thanks alot for takin the time to read this post... And help a Newbie get into the game :)
Ghostdog
February 23rd, 2003, 10:41 AM
#1. If you already know some basic programming with C++, you can learn Assembly but if you find C++ extreamly difficult I think assembly is not for you. In assembly you have to do all (if you want to write on the console you don't have a printf or cout function, you have to put parameters in some registers and the call an interrupt, if you call a function you have to put the parameters on th stack yourself, ...)
#2. You can take NASM, it's a GPL assembler (http://nasm.sourceforge.net/) or you have TASM, MASM, etc (http://biofizyka.agro.ar.szczecin.pl/~devon/asemblerye.html)
#3. Yes there are (http://spiff.tripnet.se/~iczelion/). You have also a good tool call google.com (http://directory.google.com/Top/Computers/Programming/Languages/Assembly/x86/FAQs,_Help,_and_Tutorials/)
http://www.programmersheaven.com/zone5/
Trust_Not_123
February 23rd, 2003, 11:39 AM
also the dev bloodshed c++ compiler is free.
you can find it at : http://www.bloodshed.net/download.html
cheers
mrleachy
February 23rd, 2003, 11:53 AM
well for starters i stronly recommend not doing assembly as a first programming language, unless you have some knowledge of what components are in a cpu, also what they are known as in shorthand, which is what assembly uses (though i assume you know that), plus to print something in C++ you just use a cout statement, in assembly it would be many lines of code just to print one word, im not sure how you do it because ive only just touched on it at uni, but intend to learn a bit more about it
i fond java a bit easier than C++ actually but i'd already done C++ and since theyre the same i could adapt a bit easier, but i would suggest you have a go at java, maybe even some VB would be an option, if you have office or access you should have the VB runtime compiler so you can make a start with that if you like
mathgirl32
February 23rd, 2003, 02:38 PM
Below are some good threads for both finding assembly resources and writing an assembly program. You can download masm for free by following the links in one one the threads.
Even though there are a lot of good tutorials out there that really go into depth explaining assembly I wouldn't recommend thinking you "can write" assembly programs just because you are able to copy one from a tutorial and run it. If you know c++ well, then assembly won't be that difficult. Even then you really need to understand what is happeneing when you make your program and what the commands mean...what they really mean. If you don't "get" c++ then I would doubt that you'll "get" assembly. But, hey, no harm in trying....trying is a good thing. I think the main reason people don't "get" c++ (or assembly) is because they don't really understand it and to understand it you really do have to read the material not just copy programs. I found these links helpful, but still, to really understand I had to get a book, Assembly Language for Intel-Based Computers (4th Edition)
by Kip R. Irvine. Here is a link to the book. (http://www.amazon.com/exec/obidos/ASIN/0130910139/qid=1046009648/sr=2-1/ref=sr_2_1/103-3672721-1495030#product-details)
Anyway, good luck.
This thread. (http://www.antionline.com/search.php?s=&action=showresults&searchid=96762&sortby=&sortorder=)
Or this thread. (http://www.antionline.com/showthread.php?s=&threadid=218846)
neel
February 23rd, 2003, 02:45 PM
It takes about 50-100 lines of code to display something decent on your screen... Go figure how much code it would take to write a little game of some sort. It's not a good language to start with. If you write something with it though, you can be pretty sure it's the fastest way it could be programmed, altough c++ comes close. c++ best compiler isn't owned by microsoft. Most part of the linux os is programmed in c or c++, for example.
|The|Specialist
February 23rd, 2003, 05:01 PM
Fallowing up on what MrLeachy said:
I was told VB was a bad language to start on but now that im trying to move onto other languages im realizeing they were right.
I tried alot of things intil I started out on VB and now I hate it because VB is so easy that you become very lazy while playing in other languages it is so easy and user friendly that it's almost addictive, man. Pluse VB corrects some small things for you but alot of languages won't even bother doing that...
I haven't really played with Assembly much but I can say that it takes alot of code but it can compile into very small programs and like any other languages it can be usefull. Don't make the mistake of takeing the easy way out like I did though :(
invader
February 23rd, 2003, 05:02 PM
C++ and assembly are both difficult.
If you are looking for an easy language to work with, let the idea fade.
avdven
February 23rd, 2003, 05:19 PM
If you are interested in learning Assembly language, some languages are easier than others. Most people start by learning 80x86 assembly (it's what Intel uses). MIPS assembly (using in RISC-based processors for things such as Palm Pilots, Sony Playstation 2, etc.) is much easier, with far less commands easier access to both the registers and the memory. If you are interested in trying your hand a MIPS programming and want a simulator, check out PCSpim (http://www.cs.wisc.edu/~larus/spim.html). It's has great debugging features and it's completely free. If you use UNIX, you can get XSPIM from the same site.
AJ
ampm2003
February 23rd, 2003, 06:31 PM
Unlike most of the people here; I think that assembler is the perfect language to start with...
Why? because it's what gives you the most idea of how things really work. While programming in assembler, you programm on such a low level that you have to make all by your-self; thus really understanding how things are done by a PC. Besides; if you want to programm some drivers or some fast (i mean really fast) small utility to control some hard you'll really need to know assembler. I sarted by learning assembler (Z-80's asm); and really recommend starting with it; because it helped me a lot when then studing C and it helped me to uinderstad the reall procesing of a machine. Starting with assembler is like starting with the concepts (and then when programming with a higer level lang understandig what's going on donw there).
To sum up; i would fisrt learn some assembler (not from a very complex chip; cause they are all kind-of the same; so Z-80 or 8080 or peak or any other of that kind will really do well); and after that i would study some C... and afterwards if you still have some will to study; i would go into C++...
Well; hope I helped you (didn't answer the other questions cause they are already answered in the posts above)...
ampm2003
moby_duck
February 23rd, 2003, 06:45 PM
I actually know what assembly is.... Its a programming language that is really old... but still powerfull...Right?? Well, i got a few questions about it... so any help you can give would be great
nope. do not think of assembly programming as a language. there are several reasons for this, and the most important one is that every different computer architecture has a completely different assembly language. try reading assembly for a 386, 686, SPARC, Alpha, MIPS, Motorolla, PIC, or any other popular architecture and you will quickly find that they are all totally different. not only are they different, but they operate under totally different principles. some ISA's (instruction set architectures) are RISC, some are CISC. some ISAs are register-memory, some are stack-based, some are accumulator-based, and some are register-register. assembly is just a one-level abstraction of physical machine language, that is, ones and zeros. that's why assemblers are cheap--all they do is translate your "program" into it's machine form by doing a few passes. assemblers are not compilers--believe it or not there is a big difference. so you can probably surmise that assembly is not just an old, powerful programming language. each computer architecture comes with its own assembly language--the first computers invented may not have had the exact same concept of assembly, but even they had a primitive form of assembly language. to fully understand what assembly language is, you'll probably want to read a college-level textbook like Hennessy and Patterson.
#1. Is assembly a good "First programming language"??? I have started learning C++ but it is extreamly difficult.. Not to mention the "best" compiler is owned by M$
that all depends, really. if your goal is to program a uPIC controller to read analog values to run an electronic sprinkler system controller then yes. if your goal is to write a computer game, then HELL NO. it is unwise to write large programs in assembly--however it is a common practice in fields such as graphics to find the most heavily used parts of the program and optimize them with assembly, since humans can generally write much more efficient assembly than compilers. do not bother trying to write assembly for any major computer system, it is too difficult and tedious. start with C/C++. not only are they solid languages with lots of background and documentation, but they are free. if you're on a windows box, just download cygwin (www.cygwin.com) and you'll have everything you need. for the curious, compile a hello world type program with GCC, and use the -S switch. or use objdump. the output will be an assembly version of hello world. this is about what it will look like:
.def ___main; .scl 2; .type 32; .endef
.text
LC0:
.ascii "Hello, World! -- C\12\0"
.align 2
.globl _main
.def _main; .scl 2; .type 32; .endef
_main:
pushl %ebp
movl %esp, %ebp
subl $24, %esp
andl $-16, %esp
movl $0, %eax
movl %eax, -8(%ebp)
movl -8(%ebp), %eax
call __alloca
call ___main
movl $LC0, (%esp)
call _printf
movl __impure_ptr, %eax
movl 4(%eax), %eax
movl %eax, (%esp)
call _getc
movl %eax, -4(%ebp)
movl $0, %eax
leave
ret
.def _getc; .scl 2; .type 32; .endef
.def _printf; .scl 2; .type 32; .endef
see what i mean? who wants to program that? read the Intel architecture manual to discover the meanings of the various semantics.
#2. Where can I find an Assembly compiler??? I have a C++ compiler...Visual C++ it cost me tons of $$$.. Will an assembly compiler cost just as much???
like i said, assemblers are not compilers. a real compiler takes a high-level language like C and converts it to assembly, then optimizes the assembly, and then goes through the rest of the process of assembling and linking and whatnot. as for assemblers, they are generally not that hard to find. of course you need to specify which ISA you're trying to find an assembler for. since i'll assume you mean x86 assembly, go with nasm--i believe it was mentioned earlier in this thread.
#3. Are there any assembly tutorials out there??? Wait.. stupid question :) (Ha! caught myself that time) There are some in the "Tutorials" section of the forums right? If their are any others that you recommend... plz inform me
i recommend just doing a google search for "assembly programming" or something. i don't know what your level of education is, and i'm not insulting your intelligence, but it sounds like you may be a little green to tackle assembly. learn some computer architecture first. without a basic concept of computer architecture, assembly won't make much sense. good luck
Turmoil
February 23rd, 2003, 07:55 PM
Thanks Guys!!!
All of your infor is really helpful :)
I think I won't start learning Assembley right now... I think I'll stick with C++ for a while
By the way... Those linx that you guys put in where excellent :) Thanks for your input
GandalfTheGray
February 23rd, 2003, 10:13 PM
Assembly is good for some things, not others. If you need to provide maximum performance for a particular device (for example, max throughput for an A to D converter to a storage device for collecting data in a laboratory setting or writing an especially high performance device driver), it's pretty hard to beat the native assembly language.
If your boss wants a complete program tomorrow (or even next week), assembly is probably not in the cards. Also, as already noted here, the form and syntax of assembly language depends on the hardware used, so it is not very portable except as an experience base you carry in your head.
However, if you have a lot of time to spend and a lot of curiosity about exactly how your hardware and operating system work, assembly language programming is probably the best teacher (in the same sense that a Marine drill instructor is your best teacher.) You will learn, you will learn a lot, but you will pay a high price.
Unfortunately, I am only one generation of programmers beyond the one that though assembly language compilers were a great advance. Those boys wrote programs using binary machine language, often put in a word or byte at a time through front panel swithes. For my sins, I once had to write and input a bootstrap loader that way, and I would really hate to do anything more complicated than that!!
These days, I believe VB is best for quickly writing an impressive looking program (that generally depends on the current speed and capacity of PCs to disguise the inefficiency) and C++ is the best for real professional jobs. Either of these would be a better first language, with VB providing almost immediate gratification and C++ being the language that one probably should aim for eventually.
johnnymier
February 24th, 2003, 01:48 AM
Using C you can include dos.h and the add assembly instructions like this:
#include<dos.h>
main(){
unsigned int var;
asm { //start assembly instructions
cli //Clear Interrup Flag
mov dx, var //Duracion del tono
in al, 0x61 //Se obtiene el valor del puerto B del i8255
and al, 0xfe //Desconexion del speaker
}
return 0;
}
That is just a small example of how to put assembly instructions in a C program. It worked on borland turbo C compiler.
phaza7
February 24th, 2003, 03:28 AM
Turmoil good choice bud!
I would suggest learning a high level-lang 1st.
But if U insist check outASM (win32asm.cjb.net)
There U will find lots of help to get U started tools, tuts, and more.
antionline.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.