20

I think so, yes. However, I also believe teaching assembly isn't valuable because it could hypothetically teach students how to write "faster programs" -- compilers these days are smart enough that most of the time, you're just better off using a systems language and relying on the compiler if you're interested in that. Rather, I believe the value in ...


19

I think there is very limited benefit in teaching assembly so early, and it's more likely to just scare away your students. When I started learning programming, I thought bare-metal OS development was really interesting, and I started to learn about it (mainly through OSDev). But frankly, assembly was far beyond my level at that point, and it was hard to ...


7

It may not be as essential today to teach a particular assembly language to students. It certainly isn't necessary for them to learn assembly language early in their education, especially first. However, every person who wants a solid understanding of computing needs to know at least the principles of assembly language and its components: registers, memory,...


7

I may be biased by being a computer architect, but I would not consider a Computer Science education complete without knowledge of what a computer actually is. This includes having a general idea about all the levels, from the logic gate up through assembler, OS, compiler, to the application programming. It doesn't have to be deep knowledge and it doesn't ...


7

While there is a natural appeal to teaching assembly programming (hey, we can build everything up from first principals!), early students really need to master sequencing and organization at a higher level first. There is a surprising amount of abstract thought going on in looping and determining ending conditions even without limiting your branching cases ...


6

Yes: Some machine level behaviour is important at an early stage, to retain a diverse interest in the subject. Some students will find it necessary to understand what a computer is doing 'under the hood', but others will have massive problems understanding how high level constructs can be broken down into simple load/add/store sequences. Web simulators ...


6

It depends on the level you're teaching. You certainly don't need to introduce assembly language in the first year, and you certainly don't need it to "get stuff done" or to make a "real" application. You can put together a website, a server, an Android app, dabble in robotics and artificial intelligence, all without knowing a thing about assembly language. ...


5

At Colorado State University we teach the LC3 assembly language. A quick search for LC3 assembly language shows links to courses at multiple universities. Our course is normally taken by students in the second year and has three primary subject areas. C language - students already have at least two semesters with Java, so the programs are more advanced, ...


5

I don't think there's much point teaching students to write assembly code purely for the sake of it. There are more useful and productive tools / languages / concepts that would be a better use of time. However, I'm a big fan of giving students some exposure to assembly code in order to teach some key concepts rather than skills: Keen students often want to ...


5

The 32-bit subsets of ARM assembly language are fairly clean, orthogonal and RISC-like, as well as being a reasonably nice target for a simple compiler. Inexpensive Raspberry Pi's run 32-bit ARM code, as well as natively supporting a complete compiler development tool set (lex, yak, bison, et.al.) Almost every student is likely to possess a mobile phone ...


5

Go with the 6502. Its market penetration and popularity has generated a lot of resources over the years, giving you more to work with. Looking into the "home-brew CPU" realm should supply significant material to make reproducing the 6502 in Ligisim fairly easy. It already has a small instruction set (around 150 operations) that includes stack operations. ...


4

My first piece of advice would be to avoid any modern hardware (and possibly to avoid hardware itself, as the simulators out there are pretty good). As far as I can tell, all of the very cheap processors out there right now (such as come with Arduino) use languages like asm, and do not lend themselves to the kind of conceptually clear assembly programming ...


4

Have you considered using a microcontroller assembly? My first CPU design and assembly course, which also combined both courses, was based on the PIC microcontroller. We studied the 8-bit variant, which has a relatively simple architecture. It has slightly more registers than the 6502; you can say 8 registers with the 16-bit registers like PC spilt into ...


4

Teaching how to write assembly is questionable at best. Teaching how to read assembly is IMHO crucial, and comes naturally as a part of C/C++ curriculum. For example, try to explain what atomics are, and how they are not black magic, without referring to concepts from the assembly realm.


4

This is really only a half-answer, as I cannot speak to what is used generally. Perhaps someone else will be able to find a compiled report somewhere. I can attest, however, that other systems are definitely used. We use 6502 assembly, for the reasons outlined here. (So you don't have to follow the link, one of the biggest reasons is that it was one of ...


3

Is it worthwhile to teach assembly nowadays? Yes If you are trying to write a compiler that compiles down to machine code, write a device driver, do a crash dump analysis, debug a program running as machine code, do computer forensics, be a white hat hacker, etc., then you need to learn assembly programming and thus it still needs to be taught.


3

I haven't seen this in the thread yet so I thought I'd add it. I haven't been in any environment where I've felt that starting low level makes sense but I've met others that do. YEARS ago Noam Nisan and Shimon Schocken wrote The Elements of Computing System which builds things from the ground up and I recently learned about this course using the book. I ...


3

We need to separate the ideal of teaching a student how to be a fully competent assembly programmer, from the utility of using machine-level things like stacks and registers to help them build a model in their mind of what is going on. For any given model of program execution, like flow charts or state diagrams, some students will take to it easily others ...


2

To me, it depends on whether you are really teaching computer "science" or coding/programming. If this is a genuine "science" course for math and hard science majors, I would teach assembly language early. It underpins the logic structures of most computer languages and many important commands, so if your students are interested in data structures and ...


2

CS50 AP -- the adaptation I teach for AP CS Principles -- has a lesson on the compilation process in C. The full scope of the lesson can be found here. While the lesson provides a broad overview of the process, it does expose students to the steps needed to go from source code to assembly code to machine code. As a result it makes understanding assembly ...


2

To very loosely paraphrase a famous man, "it depends on what the definition of 'teach' is." A few other answers have sort of approached this point, but none have quite said it. There is a difference between introducing the fact that assembly language exists and explaining the purpose it serves, and going all out and instructing students in the meaning of ...


2

Dr Michelle Strout (now at University of Arizona) used this approach when she was at Colorado State University. For hardware, the students used Meggy JR. Students were expected to write simple programs/games using a Java interface to the hardware. Initially, the hardware was purchased as kits and there was a pizza party to assemble it. The students then ...


1

As others have already mentioned it depends on the level of education and maybe of interest. In college I had to study assembly for microcontroller programming. Although the 80s are a long time ago, ASM is a good language for DIY projects with small controllers like pic. Even the good old 8086 is still used. At the university, we used assembly - as ...


1

They should definitely write a dozen lines of ASM, at least an hour of lesson. It helps to understand compilation and it's interesting to know what the processor instructions are. It introduces the students to the concepts of SSE optimizations, processing order, it's used by some security professionals and hackers, It's used by those that require high ...


1

If you want to look at hardware which might also be suitable for programming in C/C++, the BBC micro:bit might be a good alternative to an arduino. It has a more self-contained set of peripherals, and is programmed in ARM assembler. It uses drag-drop style programming (you need an ASCII format hex file) over USB. Of course, you need to set up a tool chain to ...


Only top voted, non community-wiki answers of a minimum length are eligible