/pub/estudando-assembly.md


Studying Assembly

· updated 2026-08-28 · #assembly #development

When I started programming, back in the 8-bit era, learning a bit of assembly was unavoidable. The machines were far simpler than today’s computers, and we often didn’t even have a compiler at hand. Instead, we typed small chunks of opcodes directly in hexadecimal.

This was incredibly useful for working around the limitations of the BASIC that served both as a programming language and as the operating system (burned straight into the machine’s ROM).

Back then, every computing magazine came with code examples and often entire programs.

“If you know assembly, every program is open source.”

As microcomputers evolved into 16-bit machines, things got more interesting, though they were still far less powerful than what we have today. Even though we already had excellent compilers and interpreters for several languages, many programs and even entire operating systems were still written in assembly, simply so they could run in such a limited environment.

Processors like the 80286 and later the 80386 brought a big leap: it was now possible to have mapped memory and protected mode, a feature that had been exclusive to large computers and was now available on home machines.

Even so, it took a good while before operating systems showed up that actually took advantage of protected mode. It’s hard to explain what it was like to program in an era when your program had access to absolutely any part of the machine.

Without protected mode, your program could do whatever it wanted: it could change any bit in RAM, it could alter the interrupt table, and while your program was running it was king. No other program could take control unless yours allowed it.

Of course, if your program crashed, the only thing you could do was restart the machine.

With modern operating systems running in protected mode, you can no longer access the hardware directly. You always have to go through the kernel. This makes systems much safer, but it also takes away a lot of the fun and control we used to have.

The machines are far more powerful and the compilers far smarter, and you no longer need to drop down to assembly every time you want to do something more interesting.

Assembly Today

Why study assembly when machines are so powerful and we no longer have the control we once did?

Note that often you don’t even need to program directly in assembly to benefit from knowing it. You’ve learned how computers work at the hardware level, and that lets you write better software even in other languages. After all, no matter which language you choose, once it passes through all the layers of the operating system, virtualization, and so on, your code still has to be executed by the hardware.

Assembly, Assembler, and Machine Language

Here I’ve used “assembly” to cover a whole concept. For example, when I typed directly in hexadecimal back on the 8-bit computers, that wasn’t actually assembly; we were typing directly in machine language. I explain a bit more about this in the post Assembly, Assembler, and Machine Language.

Where to Start

The hardest part of getting started with any programming language is setting up the development environment. With assembly there’s an extra layer of complexity: you have to decide which platform you’ll study, because assembly is so close to the hardware and the operating system that each platform has its own specific setup, and it would be impossible to cover them all. Still, I’ve written a few posts that can help.

Cesar Gimenes


crg.eti.br · © 2026 Cesar Gimenes · CC BY 4.0 · github · pt