Quantcast

Maximum PC

It is currently Tue Sep 02, 2014 4:55 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 19 posts ] 
Author Message
 Post subject: assembler choices
PostPosted: Thu Mar 05, 2009 7:42 pm 
Coppermine
Coppermine
User avatar

Joined: Sun Nov 13, 2005 2:24 pm
Posts: 603
Location: The other side of zero.
Which assembler do you like to use? Why?

I'm currently studying (Outside of university.) to get back into low-level language programming, and can use all the help I can get.

I realize that, eventually, I should learn to be proficient with many different assemblers. I guess my question decomposes to this: NASM? TASM? MASM? GAS?

I've been burning some new pathways into my brain with all the new terminology I have been encountering. (And it is fun!)


Top
  Profile  
 
 Post subject:
PostPosted: Fri Mar 06, 2009 4:03 am 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24222
Location: Granite Heaven
I use various compilers .. ASM hasn't been relevant to software programming since the 80s.


Top
  Profile  
 
 Post subject:
PostPosted: Mon Mar 09, 2009 3:22 pm 
Coppermine
Coppermine
User avatar

Joined: Sun Nov 13, 2005 2:24 pm
Posts: 603
Location: The other side of zero.
Jipstyle wrote:
I use various compilers .. ASM hasn't been relevant to software programming since the 80s.


I'm interested in the inner workings of my pc.

Can knowledge of low-level language increase my skills at programming higher level languages???

BTW: I apologize for my post about Adobe being sucky sucky. Just a few more days, and they will have an update out :roll:


Top
  Profile  
 
 Post subject:
PostPosted: Mon Mar 09, 2009 4:28 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
line_test wrote:
Can knowledge of low-level language increase my skills at programming higher level languages???
Theoretically, yes. However it isn't bloody likely to help much.


Top
  Profile  
 
 Post subject:
PostPosted: Mon Mar 09, 2009 9:40 pm 
Coppermine
Coppermine
User avatar

Joined: Sun Nov 13, 2005 2:24 pm
Posts: 603
Location: The other side of zero.
The processor Architecture Programmer’s Manual that I am reviewing (Very dry reading for me.) has yet to mention any HLL's. (At least not yet.) But I still have roughly 20megs of .pdf files to read through... Bloody masochistic, but a learning experience nonetheless.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Mar 10, 2009 3:34 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
line_test wrote:
The processor Architecture Programmer’s Manual that I am reviewing (Very dry reading for me.) has yet to mention any HLL's. (At least not yet.) But I still have roughly 20megs of .pdf files to read through... Bloody masochistic, but a learning experience nonetheless.
It probably won't....


Top
  Profile  
 
 Post subject:
PostPosted: Tue Mar 10, 2009 6:32 am 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24222
Location: Granite Heaven
line_test wrote:
Jipstyle wrote:
I use various compilers .. ASM hasn't been relevant to software programming since the 80s.


I'm interested in the inner workings of my pc.

Can knowledge of low-level language increase my skills at programming higher level languages???

BTW: I apologize for my post about Adobe being sucky sucky. Just a few more days, and they will have an update out :roll:


Understanding ASM can help your programming in that it will help you understand the process by which your code turns into actual OPs in your CPU.

However, you just need to choose one and run with it .. ASM is useless for actual coding, but understanding it is not ... so choose one, learn about it, and have fun. Heck, it is easiest to use an ASM emulator .. you'll learn most quickly that way.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Mar 10, 2009 11:57 am 
Willamette
Willamette
User avatar

Joined: Fri Jul 06, 2007 9:29 am
Posts: 1447
The last time I had to deal with assembly language was in college for my Computer Science degree, years ago. It was only used for basic understanding of how the high level language translates to assembly behind the scenes (and they taught us PDP-8 or PDP-12 if I remember correctly).

Currently, unless you're Steve Gibson or something, I don't think it's really that useful in regular every day PC programming. It doesn't really translate to better programming unless you're very familiar with the way whatever your compiler of choice does to create the assembly code.

Note, that's for PC programming. I've seen assembly language used moreso in hardware programming for Electronic Engineering type projects. Controllers and the like. Although I've seen C used there as well.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Mar 10, 2009 1:50 pm 
7yrs+11,000 Posts
7yrs+11,000 Posts
User avatar

Joined: Tue Jul 27, 2004 5:44 pm
Posts: 11242
Location: The kitten above is not on fire.
Jipstyle wrote:
ASM is useless for actual coding

jcollins wrote:
Currently, unless you're Steve Gibson or something

Haha, I was going to point jip to his site:
http://www.grc.com/default.htm

That guy programs everything in ASM, even his checkout system :shock:

He justifies that his insanity is rather legitimate here.

Point being, I don't think ASM is useless as far as practicality goes, just fucking insane.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Mar 10, 2009 4:27 pm 
Smithfield
Smithfield

Joined: Sun Jun 18, 2006 7:37 pm
Posts: 5286
Assembly gives you the advantage of low level programming, which provides efficiency and speed.

And that's about it. I've dealt with assembly twice in x86 and 68K, and it's basically manipulating raw data values. It's great if you can process that in your mind what you're working with, but for most people it's not really worth it. I mean, I did the lowest you could go: logic gates, and that was a pain in the neck (although making Pong wasn't that bad).

The only application of assembly code where I think it'd be handy is embedded systems, but even then you could use C and it wouldn't matter as processing speed is stupid cheap now.


Top
  Profile  
 
 Post subject:
PostPosted: Wed Mar 11, 2009 5:53 am 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24222
Location: Granite Heaven
Since the late 80s, it has been demonstrated (mathematically, with extensive proofs), that modern compilers produce code that is more efficient than human coded ASM in any code of significant length.

Any code that is NOT of significant length has probably already been produced in the most optimised form possible for x86, though tuning for specific hardware can provide performance benefits. Again, though, modern compilers have flags that allow you to tune your code to your hardware.

ASM is a great learning tool, but compilers produce better code MUCH faster than human-tuned ASM.


Top
  Profile  
 
 Post subject:
PostPosted: Wed Mar 11, 2009 7:18 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Coding in ASM is not just insane but not worth the effort as Jip said. I don't care what that Gibson guy says, there is going to be absolutely zero benefit to me developing anything of significance with ASM. I work on a solution that by itself is 200k+ lines of C# code that includes 3 Windows Applications, two web services, and an ASP.NET website as well as the complimentary libraries.

Now... what would that 200k lines of code be in ASM? Would the "marginal" benefit in speed be worth the cost in development time? Absolutly not. Anything more than ~2000 lines of ASM code is, IMO, not worth the effort, end even then it is pushing it.

In short, learn a little bit about it so you get a feel for what is going on with the compiler and the processor, but don't spend a considerable amount of time working with it to try to produce anything "useful".


Top
  Profile  
 
 Post subject:
PostPosted: Wed Mar 11, 2009 3:12 pm 
7yrs+11,000 Posts
7yrs+11,000 Posts
User avatar

Joined: Tue Jul 27, 2004 5:44 pm
Posts: 11242
Location: The kitten above is not on fire.
CrashTECH wrote:
Coding in ASM is not just insane but not worth the effort as Jip said. I don't care what that Gibson guy says, there is going to be absolutely zero benefit to me developing anything of significance with ASM. I work on a solution that by itself is 200k+ lines of C# code that includes 3 Windows Applications, two web services, and an ASP.NET website as well as the complimentary libraries.

Now... what would that 200k lines of code be in ASM? Would the "marginal" benefit in speed be worth the cost in development time? Absolutly not. Anything more than ~2000 lines of ASM code is, IMO, not worth the effort, end even then it is pushing it.

I agree. I wasn't attempting to argue that ASM is a desirable language in practical situations like the one you described, but to point out a situation where it was used to create full featured, exceptional software.

Point being, it can be feasible however, it is often not a pragmatic approach.


Top
  Profile  
 
 Post subject:
PostPosted: Thu Mar 12, 2009 9:57 pm 
Coppermine
Coppermine
User avatar

Joined: Sun Nov 13, 2005 2:24 pm
Posts: 603
Location: The other side of zero.
Right on. Thank's.

I've been digging a little deeper into low-level language programming.

http://support.microsoft.com/kb/936357

Does the above update "flash" into the processor? Or is it just driver?


Edit: It looks like embedded is the direction in which I am headed. (No, I did not intend for that to rhyme.)

I've been looking at a few "universal" device programmers.
http://www.xeltek.com/home.php
http://www.action-electronics.com/eprom.htm
or there is this neat isa card design...
Image
(Although it's capabilities are fewer.)

I'm Looking at a few different "universal" device programmers. Not sure If I should continue this topic though. It would appear that the lines between "programming" (software and hardware) are becoming blurred. (At least in my owned mind.)

Edited in times to correct spacing and spelling. :cry:


Top
  Profile  
 
 Post subject:
PostPosted: Fri Mar 13, 2009 3:57 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
gamerfreak wrote:
Point being, it can be feasible however, it is often not a pragmatic approach.
I don't know if "feasible" is the word I would choose. :)


Top
  Profile  
 
 Post subject:
PostPosted: Fri Mar 13, 2009 5:44 pm 
Northwood
Northwood
User avatar

Joined: Sun Jul 15, 2007 6:37 pm
Posts: 2261
Location: No. 1 Thread Killer
CrashTECH wrote:
gamerfreak wrote:
Point being, it can be feasible however, it is often not a pragmatic approach.
I don't know if "feasible" is the word I would choose. :)


produce benefits?


Top
  Profile  
 
 Post subject:
PostPosted: Sat Mar 14, 2009 10:00 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Dwood15 wrote:
CrashTECH wrote:
gamerfreak wrote:
Point being, it can be feasible however, it is often not a pragmatic approach.
I don't know if "feasible" is the word I would choose. :)


produce benefits?
I would think more along the lines of "technically possible" which always means to me "possible but really not a good use of time".


Top
  Profile  
 
 Post subject:
PostPosted: Sun Mar 15, 2009 10:54 am 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24222
Location: Granite Heaven
Dwood15 wrote:
CrashTECH wrote:
gamerfreak wrote:
Point being, it can be feasible however, it is often not a pragmatic approach.
I don't know if "feasible" is the word I would choose. :)


produce benefits?


It doesn't, though. Compilers produce better code than humans. :)

Line_test: what are you looking to produce?


Top
  Profile  
 
 Post subject:
PostPosted: Mon Mar 16, 2009 10:42 pm 
Coppermine
Coppermine
User avatar

Joined: Sun Nov 13, 2005 2:24 pm
Posts: 603
Location: The other side of zero.
line_test wrote:

http://support.microsoft.com/kb/936357

Does the above update "flash" into the processor? Or is it just driver?




Some more info here.

http://www.Intel.com/design/processor/m ... 253669.pdf

Chapter 26.4 Line 291/760

jipstyle wrote:

Line_test: what are you looking to produce?



"I could tell you, but then I would have to kill you." Just kidding, Jipstyle. :D I merely wish to move certain routines into ROM where they belong.

Original "Mission impossible" anyone?


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group