quote:
Actually assembly *is* a (the) second-level language. Machine (binary) code is the first level, assembly is the second level, and high-level languages are the third level.
Actually...machine language (or binary)...is *THE* base language [0]...assembly is the first-generation language [1] developed inorder to make programing easyer...second-generation languages are COBOL and FORTRAN again developed to make programing easyer...third-generation languages are PASCAL, C, and BASIC (developed to make programing easyer, but also to re-inforce 'structured' programing techniuqes)...fourth-generation languages were/are developed to address Object Oriented (OO) programing like JAVA, C++ (remember Turbo C? LOL!)...then their are fifth-generation languages like LISP, FOXPRO, etc..
If a program is compiled (through compiler or assembler...linked, etc.) it is translated into machine code (obviously) and is at that point a first-level language...if it needs to be interpreted at run time (JAVA, good old Quake-C, VB, etc...) then it is a second-level language.
Assembly is usefull to learn because every language still has to use the processer for anything to be acomplished...there are no special opcodes on the processor that OO programing uses...ANYTHING that can be done in any other language, can be done in assembler. and if you can learn assembler, then most other languages are a piece of cake
quote:
Hex is no machine format and entering "mov eax,24" is quite different from feeding the processor something like "0101011100011101110111".
"mov eax,24" is not Hexadecimal notation (or simply Hex)...
In the dawn of computer programing, thier were 'punchcards'...a machine would read the holes on the cards as "1"s and non-hole areasa as "0"s...course this was before computers universaly used moniters (instead they used printers)...when moniters (terminals on main-frame systems) became common place...programming could be done by entering 1's and 0's...but by the time moniters were able to show whole letters and generaly mimic the output the printers could do...codeing in 1's and 0's became obsolite as Hex editers could be used instead...
Hexadecimal notation is nothing more then converting 4 bits into a 16-base numerical system (0 through F...a byte is then represented by two Hex characters 00-FF, course I suspect anyone who is somewhat interested in assembler already knows this)...you very much
CAN program in "machine language" (or "binary") by useing a Hex editor (which is how most people do it)...
Assembly doesn't exactly translate into machine language...
ADD AX, BX
ADD AX, 6
will translate differently because it makes a difference in that one statement adds one register to another...while the other statement adds a set value to a register...which, of course, makes a big difference to the processor
[edited by - MSW on October 17, 2002 10:00:18 PM]