Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #16  
Old February 24th, 2006, 03:51 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,536 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 18 h 3 m 4 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
Probably not I have a pretty big ego . Oh and everyone, I can also be arrogant lol .

That said, your experience of not getting anything from it doesn't necessarily mean there's nothing to be gained, no experience to be had etc.

I would have to look into it closer but my standing point is still that if you programmed in machine code directly the experience gained would make you a better assembly programmer, even if the only things you learned were patience and concentration.

Any insight into the architecture can be useful for assembly programming but whatever insight you find would of course be entirely up to you.

Have fun bro ,

Mark.
__________________
programming language development: www.netytan.com Hula


Reply With Quote
  #17  
Old February 25th, 2006, 05:23 PM
calpol2004's Avatar
calpol2004 calpol2004 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 251 calpol2004 User rank is Sergeant Major (2000 - 5000 Reputation Level)calpol2004 User rank is Sergeant Major (2000 - 5000 Reputation Level)calpol2004 User rank is Sergeant Major (2000 - 5000 Reputation Level)calpol2004 User rank is Sergeant Major (2000 - 5000 Reputation Level)calpol2004 User rank is Sergeant Major (2000 - 5000 Reputation Level)calpol2004 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 5 Days 11 h 8 m 41 sec
Reputation Power: 49
Send a message via MSN to calpol2004
Fasm

i suggest you use the flat assembler which can be acquired from www.flatassembler.net unlike other laguages assembly is different because every assembler has a different syntax only similarities you can count on are cpu registers and mnemonics and some other basic stuff. so you ought to go with an assembler which is still "alive" and has lots of resources available. there are a few beginner tutorials on the site and a fair few examples. The forum on the site is also fairly good (my account name is calpol2004 there also btw) if you need help. if you wanna code machine code... the assembler is open source you should take a look on how it does it... though it would probably give you a headache.

Last edited by calpol2004 : February 25th, 2006 at 05:28 PM.

Reply With Quote
  #18  
Old May 25th, 2006, 12:14 PM
Randux Randux is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 48 Randux User rank is Corporal (100 - 500 Reputation Level)Randux User rank is Corporal (100 - 500 Reputation Level)Randux User rank is Corporal (100 - 500 Reputation Level)Randux User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 18 h 47 m 23 sec
Reputation Power: 6
Quote:
Originally Posted by LinuxPenguin
Hah, yeah, good one... Noone programs in machine code mate.


Not so. I've had a few jobs where they paid me to write object code

Reply With Quote
  #19  
Old May 25th, 2006, 12:25 PM
Randux Randux is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 48 Randux User rank is Corporal (100 - 500 Reputation Level)Randux User rank is Corporal (100 - 500 Reputation Level)Randux User rank is Corporal (100 - 500 Reputation Level)Randux User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 18 h 47 m 23 sec
Reputation Power: 6
Quote:
Originally Posted by Mark
I'll admit that I haven't looked at writing machine code but I'll keep an open mind about what can be gained from such an experience.

There is more than replacing mnemonics with numbers, the bit patterns give you a glimpse of the underlying architecture – if you've done or made anything with digital systems or logic gates in electronics such as half and full adders you should see this to be true, or I do.

Just because from your perspective on the beach the water looks shallow doesn't mean that it is.

While I was reading about ARM & MIPs assembly in particular I found that it's common to go into the bit patterns of most mnemonic and talk about it quite completely.

From this level you can see relationships between mnemonics that aren't exactly obvious.

In any case any learning is worth the undertaking; not to be snubbed off as pointless though misunderstanding .

Take care,

Mark.


I agree with what I think you are saying, Mark. There is a level below the assembler, and there's a level below that level, at least on the systems I'm familiar with. The main point you make, which I think bears repeating especially today when so many people have absolutely no idea what happens between their source code and the hardware, is that everything you learn about the hardware and the operating system, and the way your code is compiled or interpreted, makes you a better programmer. And you will never ever achieve "true enlightenment" until you can look at your source code and envision the underlying executable.

Your analogy of the mechanic's knowledge as it relates to driving is very good, indeed.

Today, when scripting languages are more and more common and bad programming practices have no practical ill-effects because of the high-performance of even cheap hardware, it's easy to overlook that most people haven't a clue about what's really going on.

Back to the issue of writing object code (machine language): For one thing, it's not necessarily true that a given assembler will support all of the opcodes available on a given processor. When that happens, you can either write object code directly or you can hack it from the assembler, either by writing macros or using some other construction.

It's common for software that's written in assembler to be patched using object code because people just get familiar with it enough that assembling a fix isn't worth it. I've serviced large systems written in assembler and I've always written object code and never assembled a single fix.

Below object code there is microcode. Some instructions have an interface of a single opcode but in fact they're implemented as an actual program written in another assembler-like language that most people never see or hear about. This was true in the old days, maybe it's not any more. I haven't seen a microcode program listing in twenty years

Reply With Quote
  #20  
Old May 25th, 2006, 12:34 PM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 30 m 28 sec
Reputation Power: 1008
Intel uses a microcode on all their processors because they won't make an incompatible change to their machine code, since the processors are now RISC and the instruction set CISC.

As for learning machine code, what you say is interesting, that it's easier to hack on with it sometimes, but I can only see it being much use if you're looking to modify a program while it's running, not a common task.

Anything you can learn from machine code can be done without actually writing machine code. E.g. I know about the branch prediction and how to optimise for it without having written a line of assembler. this is what the LIKELY() macro is for, for example.

Whatever floats your boat, but it's nothing a good assembler book can't teach you, IMO.

Reply With Quote
  #21  
Old May 25th, 2006, 12:39 PM
Randux Randux is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 48 Randux User rank is Corporal (100 - 500 Reputation Level)Randux User rank is Corporal (100 - 500 Reputation Level)Randux User rank is Corporal (100 - 500 Reputation Level)Randux User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 18 h 47 m 23 sec
Reputation Power: 6
Quote:
Originally Posted by LinuxPenguin
Intel uses a microcode on all their processors because they won't make an incompatible change to their machine code, since the processors are now RISC and the instruction set CISC.

As for learning machine code, what you say is interesting, that it's easier to hack on with it sometimes, but I can only see it being much use if you're looking to modify a program while it's running, not a common task.

Anything you can learn from machine code can be done without actually writing machine code. E.g. I know about the branch prediction and how to optimise for it without having written a line of assembler. this is what the LIKELY() macro is for, for example.

Whatever floats your boat, but it's nothing a good assembler book can't teach you, IMO.


I gave an example of where people are writing object code regularly: (and getting paid for it!) when you write software in assembler, it's customary to write object code fixes for distribution. This is not modifying a program while it's running- it's a standard way to deliver service (patches/fixes/maintenance.)

And if the assembler doesn't support the opcodes, then "a good assembler book" isn't going to help. And there are many aspects of optimizing performance that are not covered in any assembler book.

What helps if you really want to understand your system, is to learn what's going on in the processor and peripherals. That's what we do.

Reply With Quote
  #22  
Old May 25th, 2006, 12:49 PM
Randux Randux is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 48 Randux User rank is Corporal (100 - 500 Reputation Level)Randux User rank is Corporal (100 - 500 Reputation Level)Randux User rank is Corporal (100 - 500 Reputation Level)Randux User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 18 h 47 m 23 sec
Reputation Power: 6
Quote:
Originally Posted by meditation
Hi everybody.I was wondering whether anybody had a good website about assembly(of any kind,Intel or not)to recommend.I googled for assembly and found some good ones but I'd like to hear from more experienced people than me(easy since I am just starting).Thanks in advance


Assembler is the least portable language there is. There is no generic assembler- if you don't have the hardware (or an emulator or simulator) you can't learn it. So you're really asking about assembler for x86 Intel?

And asking if there's a good website about most languages can work, because the language is relatively the same no matter which platform it runs on. C++ is always C++, etc. The higher level the language, the more this is true (Java, PHP, etc.)

But with assembly, asking if there's a good site on assembly is like asking if there's a good site on programming There are many good sites, but we have to know what you want to learn!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Is there a good website about assembly?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT