3
\$\begingroup\$

Given that there are simple and easy to learn/use MCU devices such as those offered by Arduino, Particle, TI (MSP430 series), Microchip (PIC16 series) does it make sense to teach ALP to computer science engineering (CSE) students or for them to learn it?

The way many of my peers and I learnt to use MCU was by actually writing embedded C code and playing around with MCU offering of the companies mentioned above. While some were hobby projects, many were application oriented. Nowhere did we use ALP to configure the MCU.

How does it benefit them to learn the basics of assembly level programming as part of their engineering curriculum? Is there something I'm not accounting for which assists students to learn this subject better?

\$\endgroup\$

closed as primarily opinion-based by Bimpelrekkie, Andy aka, Lior Bilia, Dave Tweed Apr 2 at 11:16

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    \$\begingroup\$ By ALP I guess you mean assembly level programming, you should add that as soon as you use the abbreviation. I had to read until the end to find out what ALP means. I'd write: "...learn ALP (Assembly Level Programming) in today's..." \$\endgroup\$ – Bimpelrekkie Apr 2 at 9:56
  • 1
    \$\begingroup\$ For a CS degree, where students may never actually do any embedded programming at all, it's a valid question to ask. Most universities here in the US have moved away from C towards C++ and other languages in their 100 and 200 level CS degree classes, anyway. However, for a CE degree (probably similar to what you mean by CSE) where embedded work is very likely, I think assembly is an essential component. \$\endgroup\$ – jonk Apr 2 at 11:03
  • \$\begingroup\$ Knowing, from top to bottom, how the computer is controlled, is quite good for confidence building AND for contriving (designing) complete computer systems. Thus any embedded system designer will see the bigger picture, because of more complete architectural understanding. \$\endgroup\$ – analogsystemsrf Apr 2 at 12:47
  • \$\begingroup\$ good discussion in this question, which juxtaposes assembly and C \$\endgroup\$ – Nick Alexeev Apr 2 at 14:52
  • \$\begingroup\$ Sarcastically, I call C, dirty assembler since many C instructions translate into single assembler instructions. It is hard to know what you will need in a career, so engineering schools try to give you a smattering of the technology of the day. Education proves capability, not ability. If you end up as an embedded programmer, I guarantee you will know assembler even if you never actually directly use it. \$\endgroup\$ – StainlessSteelRat Apr 2 at 20:42
8
\$\begingroup\$

Not knowing assembly is just fine UNTIL you have to debug something non trivial.

Interrupt trampolines, interrupt entry and exit stubs, missing memory barriers before cooking off a DMA transfer, compiler bugs, compiler just plain being 'hard of thinking', are all things that are easily tractable if you can read the assembler output (And very hard to debug if you cannot).

I would note that it pretty much does not matter which assembly language you learn, they are mostly pretty similar.

Sooner or later your students are going to have to write a linker script (Maybe as part of some custom boot code), and vector tables and relocations are easier to explain in the context of assembly language.

Also, it is not uncommon to build little special purpose 'CPUs' in a HDL to do some toy stuff in an FPGA or ASIC that is just a little too complex to be easily tractable as a classic small Moore or Meeley machine. Being able to design the opcodes for these really needs the designer to have written assembly language.

I would argue that teaching some minimal assembler first makes C pointers very easy, being as they look kind of like register indirect addressing, and pointer == address register is not wildly wrong.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.