# Does anyone still program in Assembly lang. code?

**URL:** <https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485>\
**Category:** Factual Questions\
**Created:** [January 19, 2005, 2:46am UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485 "2005-01-19T02:46:36Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![gerb](https://avatars.discourse-cdn.com/v4/letter/g/3bc359/32.png) [@gerb](https://boards.straightdope.com/u/gerb)\
**Post date:** [January 19, 2005, 6:06am UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/21 "2005-01-19T06:06:56Z")

</div>

I only dabble in programming. But I found this impressive.[menuet](http://www.menuetos.org)  
It seems like a lot for one floppy. And yes it does work

---

<div class="post-metadata">

**Author:** ![pullin](https://avatars.discourse-cdn.com/v4/letter/p/c57346/32.png) [@pullin](https://boards.straightdope.com/u/pullin)\
**Post date:** [January 19, 2005, 12:16pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/22 "2005-01-19T12:16:10Z")

</div>

> [@ultrafilter](#):
>
> Being able to write assembly isn’t all that important these days, but there’s a definite value in being able to read it.

Bingo. I don’t compose assembly code, but it’s invaluable when you’re poking thru the registers (with a debugger) to find out what went wrong.

That being said, BALR 14, 15 anyone? 😃

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [January 19, 2005, 12:53pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/23 "2005-01-19T12:53:43Z")

</div>

Let’s SVC 3 and get the heck out of here!!!

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [January 19, 2005, 1:07pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/24 "2005-01-19T13:07:45Z")

</div>

> [@Bill H.](#):
>
> Nothing of value to add, but I can still recall that C9 is a Return on the Z80.

0x90 is the NOP on x86 chips, and 0xCD is first byte of all two-byte INT opcodes (INT 0x21, INT 0x13, etc.). 🙂

Modern reasons to write new assembly code seem to fall into three main categories:  
[ul]  
[li] **Embedded systems** that will have a relatively small control program working directly with specialized hardware. **scr4** gives a perfect example of this. Plus, an intelligent and experienced programmer can write code tight enough to wring acceptable performance out of outdated chips and limited packages.[/li]  
Early microcomputers were so limited they resembled embedded systems, especially machines like the C64 or ZX-80 with ROM BASIC and way too little RAM.  
[li] **Parts of operating systems** , because they need to talk to the hardware directly and provide the foundation for everything else. The task-switching code might not be written in assembly, but the device drivers have to be at least in part. Most modern OSes (at least since Unix in the late 1960s/early 1970s) are largely written in C or another high-level language, but parts must be written in assembly for the reasons I mentioned.[/li][li] **Very time-critical code paths** that your optimising compiler can’t bum any further. Usually, the part written in assembly is a single kernel surrounded by a program largely written in C or FORTRAN (for scientific/engineering applications). The gurus who can optimize tricky stretches to be tightly efficient on a specific machine and rigorously correct are held in high esteem by the rest of the programming world.[/li][/ul]Of course, those are the _technical_ reasons. _Personal_ reasons range from wanting to learn more about computers to a sense of dissatisfaction with the idea that you’re being protected from yourself when you write in a high-level language.

> [@pullin](#):
>
> BALR 14, 15

Ack, pthpppbt! IBM! Don’t you know the best computer for assembly language was the VAX? 😉

---

<div class="post-metadata">

**Author:** ![Enright3](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/enright3/32/2897_2.png) [@Enright3](https://boards.straightdope.com/u/Enright3)\
**Post date:** [January 19, 2005, 1:32pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/25 "2005-01-19T13:32:19Z")

</div>

> [@groman](#):
>
> Typically a good C++ compiler will do at least as good as an intermediate assembly programmer in terms of speed. Assembly is still used for embedded development and for optimizing small bottleneck segments in big programs, but 99% of modern software is written in a higher level language.

cite?  
What knowledge source are you basing this on?  
All the major airlines (Sabre), credit card companies (VISA), and hotels (Holidex) still use assembler. Granted a lot of them are using a “C” layer on top now, but all the existing code that was written in the 60’s is still in place and damn near bug free by now. I’ve worked on more than one project where they tried to get off assembler (ACP/TPF), and the project faild. They haven’t yet produced anything that has the processing speed of assembler. I’m sure C comes close.

---

<div class="post-metadata">

**Author:** ![Enright3](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/enright3/32/2897_2.png) [@Enright3](https://boards.straightdope.com/u/Enright3)\
**Post date:** [January 19, 2005, 1:35pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/26 "2005-01-19T13:35:07Z")

</div>

> [@Josh\_dePlume](#):
>
> I don’t think that back in the late '80’s most “serious” programming was done in assembly language. This is an unmanageable approach for large projects. It’s also non-portable (it’s processor-specific). It was used then, and is used now, mainly in certain specialized applications.
> 
> By the way, programming in assembly language does not mean programming in ones and zeros. You write much more human-readable strings, and a program–the assembler–translates them into machine code for you.

I’ve been a programmer since 1984, and during that time I’ve heard millions of people talk about how important it is for code to be portable. During the last 20 years do you know how much code I ever had to port over to another machine? NONE. That’s right, zilch. The reality is that mode code is written for a specific purpose, and a specific platform. When you wrote a program for IBM 360, you never expected it to be moved to a different platform.

---

<div class="post-metadata">

**Author:** ![Enright3](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/enright3/32/2897_2.png) [@Enright3](https://boards.straightdope.com/u/Enright3)\
**Post date:** [January 19, 2005, 1:37pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/27 "2005-01-19T13:37:40Z")

</div>

> [@Jeep's Phoenix](#):
>
> An assembly language course is a requirement for a Computer Science major at some universities (North Carolina State being one of them). This course is also the reason that I’m no longer majoring in Computer Science…

When I took my first assembly programming course in college, it was made pretty clear that the course was for weeding out the programmer wannabees.

Then they came out with the Berger aptitude test. Anyone else heard of it?

---

<div class="post-metadata">

**Author:** ![audiobottle](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@audiobottle](https://boards.straightdope.com/u/audiobottle)\
**Post date:** [January 19, 2005, 1:38pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/28 "2005-01-19T13:38:01Z")

</div>

> [@CookingWithGas](#):
>
> I have a BS from University of Michigan in CS 1979. Way back then you didn’t necessarily need to take a course just in assembly programming but the OS course required assembly programming (I also took a 1-credit mini-course in IBM 360 assembler).

Hey, I have a BSE in electrical from U of M 2003! My freshman year they had a course called EECS 100 that you were supposed to take if you were going to do CS or EE. I didn’t take it since I had no idea what I was going to major in at the time and they dropped it the next year. But in that class they had you write the same program in binary, assembly, and then C. I guess it was good to get the concepts across, and I wish I had taken it because when it came time for my senior design project, I was seriously lacking in programming the DSP chips we were using. So I guess yes, as many others have said, assembly does get used, but no, not for anything very large scale.

---

<div class="post-metadata">

**Author:** ![Enright3](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/enright3/32/2897_2.png) [@Enright3](https://boards.straightdope.com/u/Enright3)\
**Post date:** [January 19, 2005, 1:40pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/29 "2005-01-19T13:40:01Z")

</div>

> [@mza662](#):
>
> This comment is wrong in a few ways 😛 It’s not the “native” language at all. It’s still a compiled language, it is just extremely low level, where the strings used relate to op-codes in the processor, which is why it is not as portable as higher level languages. I studied (read: stumbled through) an Assembly unit doing a CS degree and while I’ve never used it since, it did allow me to learn a LOT about how a processor works, and gives you the building blocks of information to understand higher level languages. A few languages also allow you to insert inline assembly code to further optimise some operations within the higher level language, I think C/C++ both do this and plenty of others do also. I think a lot of games would use optimised code in this method for specific graphic routines, but not as the general language.

You’re wrong. Assembler is not a compiled language… It’s an assembled language. There’s a difference.

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [January 19, 2005, 1:44pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/30 "2005-01-19T13:44:32Z")

</div>

> [@Enright3](#):
>
> I’ve been a programmer since 1984, and during that time I’ve heard millions of people talk about how important it is for code to be portable. During the last 20 years do you know how much code I ever had to port over to another machine? NONE. That’s right, zilch. The reality is that mode code is written for a specific purpose, and a specific platform. When you wrote a program for IBM 360, you never expected it to be moved to a different platform.

This must be specific to a certain programming environment or culture, then. In the open-source world, it’s extremely common for programs to be distributed in source form and made to work on platforms other than the one they were originally written for. gcc has been ported to more hardware/OS pairs than I can comfortably count, including such oddities as VAX/VMS and MS-DOS. NetBSD is almost completely source-portable to a huge number of hardware types, including single-board machines and other non-commercial platforms. [There’s even a NetBSD/PDP-10 project.](http://www.netbsd.org/Ports/pdp10/)

So portability is a huge concern for a whole bunch of programmers.

---

<div class="post-metadata">

**Author:** ![Capt.Ridley\_s\_Shooting\_Party](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@Capt.Ridley\_s\_Shooting\_Party](https://boards.straightdope.com/u/Capt.Ridley_s_Shooting_Party)\
**Post date:** [January 19, 2005, 1:50pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/31 "2005-01-19T13:50:40Z")

</div>

> [@gotpasswords](#):
>
> Only person I’m aware of that does any significant assembly programming now is [Steve Gibson](http://www.grc.com/smgassembly.htm), perhaps best known for “Spin Rite” a data recovery tool.
> 
> For the other 99.9999% of the programmers, C++ seems to do the job nicely.

Chris Sawyer, a British games programmer, writes all of his games in assembly (Transport Tycoon, Rollercoaster Tycoon 1 + 2 etc.).

---

<div class="post-metadata">

**Author:** ![Enright3](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/enright3/32/2897_2.png) [@Enright3](https://boards.straightdope.com/u/Enright3)\
**Post date:** [January 19, 2005, 1:53pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/32 "2005-01-19T13:53:45Z")

</div>

Back when I worked for a_Major Airline_ we wrote our assembler programs in 1K blocks. Before I left we were allowed to write in 4K blocks!

One of the coolest things about writing in assembler was ‘patching’. When you wrote a program, you (usually) tried to leave space in the program block. When you implemented a program, there was a very bad connotation with “falling a program back”, so often we had to fix the problem in real time. We would literally hard code a branch in the program (this is all in Hex notation mind you) to the bottom/unused part of the program, then write the fix in Hexidecimal, then code in a hard branch to the NSI (Next Sequential Instruction) It’s been over 10 years since I’ve worked for an airline but I still remember a lot of the op code.

So, to whoever said BALR 14, 15 above? (By the way, that’s a Branch and Link Register instruction)

How about this: 47F0 C028?

That’s right, that’s a Hard Branch to displacement 0x028 off of register C.

---

<div class="post-metadata">

**Author:** ![Capt.Ridley\_s\_Shooting\_Party](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@Capt.Ridley\_s\_Shooting\_Party](https://boards.straightdope.com/u/Capt.Ridley_s_Shooting_Party)\
**Post date:** [January 19, 2005, 1:58pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/33 "2005-01-19T13:58:28Z")

</div>

I think this guy does something similar to what you’re describing **Enright3** : [http://www.xs4all.nl/~rsdi/gpxpatch.html](http://www.xs4all.nl/~rsdi/gpxpatch.html) His patch adds features to the game that weren’t included by disassembling the executable and fiddling with it. Am I correct?

---

<div class="post-metadata">

**Author:** ![Josh\_dePlume](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Josh\_dePlume](https://boards.straightdope.com/u/Josh_dePlume)\
**Post date:** [January 19, 2005, 2:01pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/34 "2005-01-19T14:01:38Z")

</div>

> [@Enright3](#):
>
> I’ve been a programmer since 1984, and during that time I’ve heard millions of people talk about how important it is for code to be portable. During the last 20 years do you know how much code I ever had to port over to another machine? NONE. That’s right, zilch. The reality is that mode code is written for a specific purpose, and a specific platform. When you wrote a program for IBM 360, you never expected it to be moved to a different platform.

OK. I mentioned lack of portability as an additional issue. It is sometimes very important. The library that I work on has to build on several platforms (not that we would seriously consider using assembly language instead of C++ if it didn’t). To the writers of the web browser I’m using right now, portability is extremely important. I could go on listing software for which this is true, including most of what unix users are used to having at their disposal (it’s a good thing that grep was not written in assembly language). Even programs I’ve written for strictly my own use have been run on multiple platforms, due to hardware availability and obsolescence.

---

<div class="post-metadata">

**Author:** ![Captain\_Crunchy\_Crunch](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@Captain\_Crunchy\_Crunch](https://boards.straightdope.com/u/Captain_Crunchy_Crunch)\
**Post date:** [January 19, 2005, 2:36pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/35 "2005-01-19T14:36:36Z")

</div>

> [@+MDI](#):
>
> Chris Sawyer, a British games programmer, writes all of his games in assembly (Transport Tycoon, Rollercoaster Tycoon 1 + 2 etc.).

I was going to say this, but you beat me to it. I’ll just add to your response. 😉

The **Rollercoaster Tycoon** series (1 & 2), IMHO one of the PC games of all-time, was written in x86 assembler/machine code and compiled using MS Macro Assembler V6.11c, with a small amount of C code used to interface to MS Windows and DirectX.

He did all of this himself! He has some help with the graphics and sound, but ALL of the assembly code was written by himself.

This just blows me away!

---

<div class="post-metadata">

**Author:** ![engineer\_comp\_geek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/engineer_comp_geek/32/504_2.png) [@engineer\_comp\_geek](https://boards.straightdope.com/u/engineer_comp_geek)\
**Post date:** [January 19, 2005, 3:07pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/36 "2005-01-19T15:07:14Z")

</div>

> [@Enright3](#):
>
> I’ve been a programmer since 1984, and during that time I’ve heard millions of people talk about how important it is for code to be portable. During the last 20 years do you know how much code I ever had to port over to another machine? NONE. That’s right, zilch. The reality is that mode code is written for a specific purpose, and a specific platform. When you wrote a program for IBM 360, you never expected it to be moved to a different platform.

For some people, portability is a big issue.

I’ve had to port code from RSX (the operating system for PDP-11, which if you don’t know what that is, it’s a REALLY OLD computer), to VMS, to windows. Back in the earlier PC days, games were commonly produced for both the PC and the Mac. These days games are commonly produced for both the PC and game consoles. As Linux gets more and more popular, there are more software packages being done for both Windows and Linux. A lot of this code was originally only targetted to one machine and one specific application, and the porting came later. If you get into the habit of always writing portable code, it becomes second nature and you don’t have to really put much effort into it. If the software never gets ported, no big deal, and pretty much no time wasted. If it does get ported, the fact that you wrote the code to be portable makes the life of the person doing the port MUCH easier.

---

<div class="post-metadata">

**Author:** ![Roland\_Deschain](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@Roland\_Deschain](https://boards.straightdope.com/u/Roland_Deschain)\
**Post date:** [January 19, 2005, 3:34pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/37 "2005-01-19T15:34:34Z")

</div>

So if assembly is not the “lowest level” code available what is? Would it be theoreticallly possible to program in one’s and zeros? Is there a human “Data” out there somewhere who could (and would have reason to) do this?

---

<div class="post-metadata">

**Author:** ![Captain\_Crunchy\_Crunch](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@Captain\_Crunchy\_Crunch](https://boards.straightdope.com/u/Captain_Crunchy_Crunch)\
**Post date:** [January 19, 2005, 3:49pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/38 "2005-01-19T15:49:56Z")

</div>

> [@Roland Deschain](#):
>
> So if assembly is not the “lowest level” code available what is? Would it be theoreticallly possible to program in one’s and zeros? Is there a human “Data” out there somewhere who could (and would have reason to) do this?

Sure. **Absolute Machine Code**. The very lowest possible level at which you can program a computer is in its own native machine code, consisting of strings of 1’s and 0’s and stored as binary numbers.

You want to know what’s like to program in machine code? Chew on a ball of tin foil, while listening to someone scratch their nails on a chalk board, while having your fingernails slowly removed, while watching a neverending loop of **Cop Rock** , while listening to a neverending loop of **Ashlee Simpson** songs…for a week straight!

It’s not fun!

---

<div class="post-metadata">

**Author:** ![mks57](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@mks57](https://boards.straightdope.com/u/mks57)\
**Post date:** [January 19, 2005, 3:50pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/39 "2005-01-19T15:50:01Z")

</div>

> [@Roland Deschain](#):
>
> So if assembly is not the “lowest level” code available what is? Would it be theoreticallly possible to program in one’s and zeros? Is there a human “Data” out there somewhere who could (and would have reason to) do this?

I’ve done it when an assembler was not available, writing diagnostic programs to find hardware faults, creating binary patches for bugs in existing software, fixing problems encountered while debugging a program, writing bootstraps and loaders for new computers.

All you need is a programming card and a pad of paper.

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [January 19, 2005, 3:56pm UTC](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485/40 "2005-01-19T15:56:44Z")

</div>

> [@Roland Deschain](#):
>
> So if assembly is not the “lowest level” code available what is? Would it be theoreticallly possible to program in one’s and zeros? Is there a human “Data” out there somewhere who could (and would have reason to) do this?

In the beginning, that was how it was done: Humans would write out the program in something like assembly language mnemonics and then manually translate it into machine code, which would be fed into the machine. I’ve done this, but only for computers running under emulation. It isn’t that much more difficult than assembly language, at least for relatively small and uncomplicated programs.

Back in the old days, all machine had front panels: A bunch of rows of lights and switches that displayed the contents of various locations in the machine (a specific RAM location under examination and the registers) and, via the switches, allowed you to deposit binary information directly into the computer. [Seymour Cray](http://www.cgl.ucsf.edu/home/tef/cray/tribute.html), the founder of Cray Research, is said to have toggled in the OS of the CRAY-1 by hand using the front panel. Less wizardly programmers had to toggle in the bootstrap code by hand every time the machine was powered on. (The bootstrap code is the little program that is capable of loading the OS and getting it running. It doesn’t do much, and in the interests of efficiency is made as small as possible. Modern machines have their bootstrap code in ROM chips.)

The very first personal computers were kit machines: That is, you bought parts and assembled them yourself. They didn’t have anything by way of input/output capability beyond, you guessed it, a front panel. 🙂 Some of them (the [KIM-1](http://www.old-computers.com/museum/computer.asp?st=1&c=149), for example) had replaced the traditional light-and-toggle system with a hexadecimal keypad and a few seven-segment LEDs, but the essential system was the exact same.

[Previous page](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485.md?page=1)

[Next page](https://boards.straightdope.com/t/does-anyone-still-program-in-assembly-lang-code/285485.md?page=3)
