Altair Assember in Excel

134 views
Skip to first unread message

Brian Ash

unread,
Mar 18, 2021, 12:58:32 PM3/18/21
to Altair-Duino
I put together a quick assembler in Excel. It allows you to program assembly, and it outputs the octal machine code you can program in the front switches. It also can take octal and disassemble into assembly code. It's kind of rough, but functional. I haven't protected cells from accidental editing and some other final touches yet. 
To use it, you fill in the assembly code in the green cells. If a line needs more input bytes, it will turn the cells green to prompt you to fill them in as well.
There are some quirks about it, like commands that specify a particular register are in the mnemonic. Like "lxi h,0" would be entered instead using "LXI-HL 0". There are variations of the LXI command for each register set. So in the box you'd pick LXI-BC or LXI-DE. There's a dropdown of valid commands, so that should help.
There are NO macros or scripts in the spreadsheet. It is all just formulas and conditional formatting.
Please let me know what you think - if there are some features I should add, or something I should tweak. It's still in a rough state. I kind of just threw it together. But it is to the point where I can start putting in assembly and get the octal code to program in on the front panel. 
I realize I can program in assembly through the terminal and compile. That's not the point - I want to do it manually. That's the fun of it! I want to teach my kids assembly programming, and give them the fun of having to manually enter the machine code, and step through to verify.

ALTAIR_ASSEMBLER.xlsx

John Kennedy

unread,
Mar 19, 2021, 12:20:54 PM3/19/21
to Altair-Duino
This is neat - I've never used a spreadsheet to assemble before! 

peterq...@gmail.com

unread,
Mar 19, 2021, 7:23:20 PM3/19/21
to Altair-Duino
I tried to write an assembler in BASIC back in the day. This is cool. 

Mike Douglas

unread,
Mar 20, 2021, 12:28:25 AM3/20/21
to Altair-Duino

Brian Ash

unread,
Mar 20, 2021, 1:07:08 AM3/20/21
to Altair-Duino
Thanks for posting the link to that! It's excellent. I didn't know someone else had the same idea. I'm going to enjoy looking at how he did his. It's very polished. Mine is super rough still. His takes proper syntax assembly code, where mine needs tweaks to how the code is written to make the lookups work properly.

A cool thing I learned about Excel from his instructions is the Clear Content feature. 
One thing I tried out in my Excel file, in the disassembler tab specifically is using the Index() and Match() instead of vlookup(). I use vlookup all the time, and am comfortable with it, but it has limitations that Index() and Match() can address. I had heard that they are better than vlookup before, but because of my comfort level, I always stick with what I know. Index/Match can go horizontal or vertical, and can match left and right. Vlookup is only vertical, and only from left to right. 

Tonight I used my assembler to put together a very short program, and plugged it into the front panel, and it worked! Pretty cool. 
I really just wanted a project to force me to go through the whole instruction set, and understand how the commands work. It's been a very long time since I programmed in assembly, so this is a fun project to get back into it.
Reply all
Reply to author
Forward
0 new messages