Low level languages

Discuss how to write good code, break bad code, your current pet projects, or the best way to approach novel problems

Low level languages

Post by WallShadow on Tue Mar 06, 2012 9:47 pm
([msg=64803]see Low level languages[/msg])

I'm a fairly advanced programmer for my age. I started out from Lua, then learned C++, Java, GML, parts of perl, and bits and pieces of javascript, html, and visual basic. Everyone always says how C++, Java, and all these popular languages are all high-level languages. I'm hoping to learn more about the internals workings of computers and computer security and I was wondering, what would be a good low-level language for me to study?

Thanks for reading!
User avatar
WallShadow
Contributor
Contributor
 
Posts: 594
Joined: Tue Mar 06, 2012 9:37 pm
Blog: View Blog (0)


Re: Low level languages

Post by centip3de on Wed Mar 07, 2012 12:57 am
([msg=64812]see Re: Low level languages[/msg])

WallShadow wrote:I'm a fairly advanced programmer for my age. I started out from Lua, then learned C++, Java, GML, parts of perl, and bits and pieces of javascript, html, and visual basic. Everyone always says how C++, Java, and all these popular languages are all high-level languages. I'm hoping to learn more about the internals workings of computers and computer security and I was wondering, what would be a good low-level language for me to study?

Thanks for reading!


Yay, someone else interested in low-level languages!

Anyways, in the realm of the low-level, there's only a few guys; machine language, binary, and assembly. (Note: Some people will tell you that C is a low-level language. That is absolutely not true. C is, for all intensive purposes, a high level language. While it does, and can, facilitate to the ring 0 arena, so can any other HLL out there (Python for example)). Now, back to my discussion:

If you do not have a good C head on your shoulders, stop reading this, go back an learn that. While I just said that it is, in-fact, a HLL, it is very widely used in the low-level sector as well. If you know C++ well enough, you might get by, but you should still invest some time into C anyway as there are some odd functions and syntaxes of C that C++ doesn't have.

Alright. From here on, I'm assuming you have a decent grip on C. Now, unless you want to be coding in 0's and 1's, which is highly unlikely, extremely difficult, and an amazingly huge time-waster, don't go with binary. While it may be the roots of a computer, it's not even close to efficient to program. So, that leaves us with ASM (assembly language) or machine language. For read-ability, ease, and documentation, I would tell you to go with assembly. While it's perfectly possible to code in machine language, it really doesn't have any advantage over ASM in speed or efficiency. So, that leaves us with ASM.

Some background info on ASM; ASM is the lowest, human readable, language there is. It is what all compilers, compile their code into. This then gets assembled by an assembler, and presto-chango, you have yourself a working, executable, program. It has several advantages to it, those being; faster, more efficient (uses less resources), extremely flexible and customizable, tons of fun. The down sides are that the syntax is more difficult, it's harder to learn, it requires quite a bit of basic computer theory, and doesn't have pre-built functions. It takes a lot of time and effort to learn ASM, but it really is fun in the end.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rick Cook
User avatar
centip3de
Moderator
Moderator
 
Posts: 1412
Joined: Fri Aug 20, 2010 5:46 pm
Blog: View Blog (0)


Re: Low level languages

Post by tremor77 on Wed Mar 07, 2012 10:56 am
([msg=64830]see Re: Low level languages[/msg])

What is your opinion on using HLA? Any program suggestions?
Image
User avatar
tremor77
Contributor
Contributor
 
Posts: 860
Joined: Wed Mar 31, 2010 12:00 pm
Location: New York
Blog: View Blog (0)


Re: Low level languages

Post by centip3de on Wed Mar 07, 2012 12:07 pm
([msg=64835]see Re: Low level languages[/msg])

tremor77 wrote:What is your opinion on using HLA? Any program suggestions?


HLA is a good intermediate language. It has both the option for high-level work, and for low-level work. It's an extremely-well rounded assembler. I would actually program in it more often, if they had better documentation on it. The only thing that I can think of that uses the HLA syntax is the Art of Assembly book. I've yet to stumble across a forum, or other books dedicated to only the HLA syntax.

Anyways, what do you mean by program suggestions? IDE's? Programs to practice HLA?
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rick Cook
User avatar
centip3de
Moderator
Moderator
 
Posts: 1412
Joined: Fri Aug 20, 2010 5:46 pm
Blog: View Blog (0)


Re: Low level languages

Post by tremor77 on Wed Mar 07, 2012 4:31 pm
([msg=64844]see Re: Low level languages[/msg])

Most referring to IDE's. I know there is HIDE, RasASM.. if one were to consider starting to develop in HLA is there a platform you'd suggest?
Image
User avatar
tremor77
Contributor
Contributor
 
Posts: 860
Joined: Wed Mar 31, 2010 12:00 pm
Location: New York
Blog: View Blog (0)


Re: Low level languages

Post by Mars7411 on Wed Mar 07, 2012 5:08 pm
([msg=64848]see Re: Low level languages[/msg])

Python is a good low level language.
Mars7411
Experienced User
Experienced User
 
Posts: 99
Joined: Thu Oct 27, 2011 7:09 pm
Blog: View Blog (0)


Re: Low level languages

Post by centip3de on Wed Mar 07, 2012 5:31 pm
([msg=64851]see Re: Low level languages[/msg])

Mars7411 wrote:Python is a good low level language.


I rofl'd.

Python is anything BUT a low-level language, my friend. While with some libraries attached, it can do a few low-level operations, this still doesn't qualify it as a low-level language. In-fact, it is one of the highest level languages I can think of, off the top of my head (mainly because it's interpreted, not compiled).

tremor77 wrote:Most referring to IDE's. I know there is HIDE, RasASM.. if one were to consider starting to develop in HLA is there a platform you'd suggest?


Hmm... Well, I actually never use IDE's for ASM, personally. I mainly use either Notepad, or gedit. But, I have used HIDE before and can tell you that with a bit of learning, it's a very good IDE.

Platform? Start with 16 bit, then go to 32 bit, then you CAN go to 64 bit. 64 bit processors are compatible 32 bit code, but they do lose some performance from running it.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rick Cook
User avatar
centip3de
Moderator
Moderator
 
Posts: 1412
Joined: Fri Aug 20, 2010 5:46 pm
Blog: View Blog (0)


Re: Low level languages

Post by WallShadow on Wed Mar 07, 2012 8:53 pm
([msg=64862]see Re: Low level languages[/msg])

Thanks for the explanation centip3de, I greatly appreciate it. So off to assembly language I go. Any tips on where to start? (e.g. tutorials, instructions, documentaries, etc)

Thanks again!
User avatar
WallShadow
Contributor
Contributor
 
Posts: 594
Joined: Tue Mar 06, 2012 9:37 pm
Blog: View Blog (0)


Re: Low level languages

Post by centip3de on Wed Mar 07, 2012 11:17 pm
([msg=64871]see Re: Low level languages[/msg])

WallShadow wrote:Thanks for the explanation centip3de, I greatly appreciate it. So off to assembly language I go. Any tips on where to start? (e.g. tutorials, instructions, documentaries, etc)

Thanks again!


There's plenty. But first, you're going to have to decide what ASM syntax you're going to learn. After that, you have to decide which assembler to use. Once that's done, you'll be able to find a ton of forums on it. But, I'll try to supplement some basic ASM knowledge:

http://ref.x86asm.net/ /* Good for quick Opcode look-ups */
http://www.cs.cmu.edu/~410/doc/intel-isr.pdf /* Necessary to fully understand Intel styled syntax */
http://www.asmcommunity.net/ /* Assembly language community (Extremely active) */
http://www.drpaulcarter.com/pcasm/ /* Introduction to 32 bit ASM */
http://www.ctyme.com/rbrown.htm /* Every interrupt known to man. All in one list. I'm having multiple orgasms just thinking about it. */
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rick Cook
User avatar
centip3de
Moderator
Moderator
 
Posts: 1412
Joined: Fri Aug 20, 2010 5:46 pm
Blog: View Blog (0)



Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests