Linked by Thom Holwerda on Sun 8th Jul 2012 22:54 UTC
General Development "In this tiny ebook I'm going to show you how to get started writing 6502 assembly language. [...] I think it's valuable to have an understanding of assembly language. Assembly language is the lowest level of abstraction in computers - the point at which the code is still readable. Assembly language translates directly to the bytes that are executed by your computer's processor. If you understand how it works, you've basically become a computer magician." More of this, please.
Thread beginning with comment 525937
To read all comments associated with this story, please click here.
Comment by ilovebeer
by ilovebeer on Mon 9th Jul 2012 05:54 UTC
ilovebeer
Member since:
2011-08-08

6502 was fun in its day. So was 68000. But as someone else already pointed out, compilers are damn good these days. Plenty of people get along just fine without any asm knowledge. Also, I would hope people understand how a computer works if they're going to program. I don't know any great (at least imo) programmers who don't.

Reply Score: 3

RE: Comment by ilovebeer
by DeepThought on Mon 9th Jul 2012 07:53 in reply to "Comment by ilovebeer"
DeepThought Member since:
2010-07-17

6502 was fun in its day. So was 68000. But as someone else already pointed out, compilers are damn good these days.

... but can be out-performed on many machines by a decent assembler programmer.

Plenty of people get along just fine without any asm knowledge.


This might be true for database or banking software. But when it comes to embedded programming, it is always painful to discuss with programmers who do not know about the machine they are programming.
Also, assembly programming teaches good boolean algebra.

Also, I would hope people understand how a computer works if they're going to program. I don't know any great (at least imo) programmers who don't.


I have seen lots of code like this from guys who never coded a single line of assembly:

uart_format = _8BITS_PER_BYTE || ENABLE_PARITY;

I do not mean, that every programmer needs to be a perfect assembly crack, but it the same with a car. Knowing how to drive it, is just not enough. You need to know where to fill in the fuel (or today: plugin in the cable) and _what_ kinda fuel you need :-)

Reply Parent Score: 1

RE[2]: Comment by ilovebeer
by boxy on Mon 9th Jul 2012 16:29 in reply to "RE: Comment by ilovebeer"
boxy Member since:
2011-06-20

I have seen lots of code like this from guys who never coded a single line of assembly:

uart_format = _8BITS_PER_BYTE || ENABLE_PARITY;


I'm assuming that was supposed to be a bit-wise or instead of a logical boolean or? Or (no pun intended) was that the point - that those programmers that don't know assembly don't know the difference between the | and || operators?

I myself used to make that same mistake, and I learned C doing a tutorial that was heavily geared towards graphics and mixed in a lot of assembly (Asphyxia set if tutorials if anyone remembers that demo group).

That said, 6502 assembler is kinda cool. I learned it by trying to implement an NES emulator (turns out this is way harder than I thought it would be because of various quirks in the NES hardware), albeit that was a modified 6502. If I recall correctly, the D (binary coded decimal) flag didn't actually do anything. But I digress.

Reply Parent Score: 2

RE[2]: Comment by ilovebeer
by christian on Mon 9th Jul 2012 21:34 in reply to "RE: Comment by ilovebeer"
christian Member since:
2005-07-06

"6502 was fun in its day. So was 68000. But as someone else already pointed out, compilers are damn good these days.

... but can be out-performed on many machines by a decent assembler programmer.
"

As CPUs became more orthogonal, I bet the advantage eroded pretty quickly. Compilers can just keep track of more information to make better decisions on optimizations, such as efficient register scheduling.

And it's poor software engineering to dive straight into assembly without finding the bottlenecks first. Even small micro-controllers like PIC are better programmed in C first with a directed migration to assembly based on performance requirements.

Except for the smallest of embedded systems, C is perfectly viable using something like Contiki ( http://www.contiki-os.org/ ).

Reply Parent Score: 2

RE: Comment by ilovebeer
by dsmogor on Mon 9th Jul 2012 08:02 in reply to "Comment by ilovebeer"
dsmogor Member since:
2005-09-01

Watch some recent C64 demos and you will surely change your opinion ;)

Edited 2012-07-09 08:02 UTC

Reply Parent Score: 2

RE[2]: Comment by ilovebeer
by zima on Fri 13th Jul 2012 22:09 in reply to "RE: Comment by ilovebeer"
zima Member since:
2005-07-06

What C64 demos output is more the work of VIC-II and SID.

Anyway, they don't change anything in what ilovebeer said - nobody seriously targets 3-decade old computers any more.
Plus, they are just that, demos - not actually useful applications or interactive games, which basically looked nowhere close.

Reply Parent Score: 2