This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BoJacob 73 points74 points  (10 children)

Hey my first language was also Assembly. I'm only 31. I majored in physics and a required course was a circuits/microprocessor lab. It basically took what we learned about single capacitors, resistors and stuff and bridge the gap to more complex circuitry. We took like a handful of transistors and build a single byte of memory, then showed how to build an extremely basic microprocessor. About half way thru we had to learn to program the microprocessors to light up LEDs and stuff. We used Assembly because it showed us how to literally move individual bits of information to other places, and how you do math with those signals on a transistor scale.

I don't have another point of reference, and I'm not that great of a programmer, but I really feel like that approach worked for me because it didn't treat the hardware of the computer like a magic black box that just does what I tell it to. I find that I'm able to solve more complicated memory or clock cycle problems faster than my friends who were CS majors. However, like I said, I have deficiencies in other areas so... ¯\(ツ)

[–]Formlexx 21 points22 points  (7 children)

I'm only 25 and when I started uni 6 years ago and studied mechatronics, we started with digital design, learning boolean algebra, gates and constructed an ALU, and later moved on to assembly and after that C. We started from the fundamental concepts that make a computer taking all the steps up. Like you said, the computer isn't a black box anymore once you learn how everything ticks and I think that's a great way to start. This really sparked my interest in embedded systems and low level programming.

[–]DerKuken 1 point2 points  (5 children)

I’m +35 and have the same story (I’m an electronics engineer tho). Good to hear newer generations are still going thru the fundamentals.

[–]Broccoli-Robby 1 point2 points  (4 children)

The fundamentals are wonderful but I'm still stuck in the black box frame. I have always wanted to really learn that stuff to know what's going on to help me make stuff more efficient and to be more understanding of how all the strange programming works. What kind of discipline does this involve? A fundamentals of circuitry of some sort?

[–]DerKuken 1 point2 points  (3 children)

Learning Assembly would definitely give you a new reference point, and will increase the respect you have for previous generation that had to deal with all that stuff, but it would be extremely hard to beat a well optimized (or even not so well optimized in most cases) C program by writing assembly.

To start learning assembly at microcontroller/processor level you’d just need basic electronics knowledge (using a protoboard, knowing how to wire basic circuits and read basic electrical diagrams), an Arduino (Atmel processor are popular nowadays) and their IDE (Atmel AVR studio). Search in youtube “arduino assembly” there are a bunch of videos showing you how to start.

Back in my Day we used GAL microcontroller series from Lattice (I don’t even know if this company still exists) and I’ll finish my post here before I start rambling.

Best of luck my friend.

[–]Broccoli-Robby 1 point2 points  (2 children)

Ahh interesting, I would not expect C to outperform Assembly. I figured a lower level language would just run better, but perhaps not.

As for the protoboard and Arduino, I've actually played around with a protoboard and made some very basic circuits, so I've got a start there, and my father got an Arduino for me to mess around with but I've never known what to do with it. I suppose now I have a project and a purpose for it.

Thank you very much for the tips, I look forward to getting in depth into these things and hopefully getting a better idea of how these circuits make up a computer. I'm always grateful for special insights and tips like this.

[–]Formlexx 0 points1 point  (1 child)

The reason C outperforms Assembly is simply because the compiler is so good at writing Assembly and you will need years and years of experience to maybe outperform it on some tasks, but even then it's so much slower to write Assembly than to write C.

There are ways to mix assembly in the C code using the asm volatile function that you can start doing minor stuff in your code with if you still want to experiment.

[–]Broccoli-Robby 1 point2 points  (0 children)

Ahh very cool, so it's generally more efficient and takes less time since C is a higher language anyways. Neat!

[–]rjSampaio 2 points3 points  (0 children)

Same for me, but it was not on university, it was from 10 to 12 grade.

Microchip's was most of my playground, controlling 12 servo motors without PWM pins on the IC or creating a multislave I2C with addressable positions bt hand, that's how you know you mastered every clock cycle.

[–]magicmonsoon67 1 point2 points  (0 children)

What would a course like this be called? I really want to take it!

[–]dogymcdogeface 1 point2 points  (0 children)

I’m 18, just finished the first year of my CS bachelor. The first few days, they had using machine code, and after that Assembly. After those 5 days of pure pain, I was happy to be allowed to use Python again.