Take the 2-minute tour ×

I'd like to learn how to program in Assembler. I've done a bit of assembly before (during my A-Level Computing course) but that was very definitely a simplified 'pseudo-assembler'. I've borrowed my Dad's old Z80 Assembler reference manual, and that seems quite interesting so if possible I'd like to have a go with Z80 assembler.

However, I don't have a Z80 processor to hand, and would like to do it on my PC (I have windows or linux so either is good). I've found various assemblers around on the internet, but I'm not particularly interested in assembling down to a hex file, I want to just be able to assemble it to something that some kind of simulator on the PC can run. Preferably this simulator would show me the contents of all the registers, memory locations etc, and let me step through instructions. I've found a few bits of software that suggest they might do this - but they either refuse to compile, or don't seem to work properly. Has anyone got any suggestions? If there are good simulator/IDE things available for another type of assembler then I could try that instead (assuming there is a good online reference manual available).

share|improve this question
add comment

closed as off-topic by Eat A Peach, Jens Erat, Rion Williams, RandomSeed, Chris Mar 1 at 13:01


  • "Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Eat A Peach, Jens Erat, Rion Williams, RandomSeed, Chris

16 Answers

up vote 6 down vote accepted


Write one. You're best off picking a nice, simple instruction set (Z80 should be perfect). I remember doing this as a first-year undergraduate exercise - I think we wrote the simulator in C++ and simulated 6800 assembly, but really any language/instruction set will do.

The idea of "learning assembly language" these days is to get the idea of how computers work at the lowest level, only a select few (compiler writers, etc.) have any real reason to actually be writing assembly code these days. Modern processors are stuffed full of features designed to be used by compilers to help optimise code for speed/concurrent execution/power consumption/etc., and trying to write assembly by hand for a modern processor would be a nightmare.

Don't fret about getting your application production-ready unless you want to - in all likelihood the bits of software you've found so far were written by people exactly like you who wanted to figure out how assembly works and wrote their own simulator, then realised how much work would be involved in getting it "production ready" so the general public could use it.

share|improve this answer
Writing an assembler is great fun. Teaches you lots of pitfalls too. –  Callum Rogers Oct 24 '09 at 22:40
add comment

You might want to check out the open source 8085 simulator "GnuSim8085", it's specifically meant to be used for educational purposes, and it was in fact written by student while preparing for his exams. It runs on both, Linux and Windows.

share|improve this answer
+1, this is what I have been looking for. Thanks. –  mydoghasworms Mar 2 '12 at 8:19
add comment

MipSim is FREE


Main Features of MIPSim 2

  • Built-in code editor with features like syntax highlighting and folding
  • Display register and memory values in different representations (signed integer, unsigned integer, hexadecimal and ASCII)
  • Set the block size (full-word, half-word, byte) of the memory cells for easier examination of the memory values
  • Change values of registers and memory cells with a single click even during simulation and debugging
  • Realtime user-interface updating allows you to see how values of registers and memory cells change during execution
  • Built-in debugger with step-by-step instruction execution, instruction skipping and breakpoint features
  • Tools for inserting ASCII, UNICODE strings and integer values to memory for testing of your code
  • Tools for checking duplicate or missing labels and instruction parameters
  • Save computer state (values of all registers and memory cells) so that next time you run the simulator you can continue from where you left!
  • Set the simulation speed - low speeds are great to trace your code and to see how it behaves
  • Encode instructions - produce machine code in either binary or hexadecimal representation
  • Catch assembly time and runtime errors
  • Easier debugging with descriptive error messages
  • Multi-threaded design - MIPSim doesn't get stuck (hopefully ;) even if the assembly code executed is erroneous or contains infinite loops
  • MIPSim API - make your own programs that can read from and write to the registers and memory of MIPSim, great flexibility for powerful testing!
share|improve this answer
add comment

You may be interested in this for a Z80 simulator, and I've had good experiences with WinAsm.

share|improve this answer
add comment

You might also consider learning x86 assembly language, which you could do using in-line assembler in Visual Studio - although it's a larger instruction set than Z80, you would have the advantage of being able to use much better tools than would be available for the Z80.

I've also just remembered that the Keil 8051 and Arm tools have a simulator in the IDE - there are size-restricted versions of these available for free download from www.keil.com

share|improve this answer
add comment

If you happen to already know .NET, then this may be of use:


It's a little bit limited, and may only work with .NET 1.1, but you could atleast use a "modern" IDE for it, and there are plenty of docs around for it.

<%@ page language="Asm80386" %>
Str:  DB "Testing...", 0

  mov eax, -2
  cmp eax, 2
  jle Label1
  xor eax, eax
  lea esi, Str
  push esi
  call "Response.Write(string)"
  pop esi
<br>EAX: <%= eax %>

Another option, if you want to go "hard core" is get something like FreeDOS and VMWare, and use that. I'm sure a garage sale (car boot sale? yard sale?) or second hand book shop would have a copy of Peter Norton's old DOS interrupts bible. :)

Personally, I learned x86 asm by using Turbo Pascal (which I think is now free from Borland?), which had the ability to embed assembly instructions inside a function. Made it easier to setup the app, and I could focus on the stuff I wanted to do. I later used MacVAX at Auckland Uni, which was ok, but the VAX is very much dead - you may as well learn x86 :)

share|improve this answer
add comment

SimpSim is definitely worth a look. It's Windows only, but the feature set is pretty decent:

  • Main memory and register display
  • Built-in editor with syntax highlighting
  • Run, step, and break functions
share|improve this answer
It lacks a stack. Otherwise nice. I recomend MipSim instead mipsim.com/mipsim/screens.aspx –  Carlo V. Dango Jun 11 '11 at 8:41
add comment

WinApe is a good emulator of an Amstrad CPC. The Amstrad CPC was a Home Computer produced in the 80's. It used a Z80 as its CPU. Using the emulator you can display a lot of the internals while programming. It includes a debugger and a disassembler for Z80 code.

share|improve this answer
add comment

Aim higher! Try and get a simulator for a more powerful assembly language. Remember, Z80 and 808x were low-end processors with low-end and awkward instruction sets.

Something like VAX from DEC was regarded as the Rolls-Royce of instruction sets. And then there are crazy Risc instruction sets that do some really strange things. Maybe you can find definitions of those so that you can have a crack at implementing them.

share|improve this answer
add comment

Take a look at Thomas Scherrer Z80 Emulators for a listing of potential emulators you could use.

share|improve this answer
add comment

I write z80 asm for the ZX Spectrum (still, I know :) ) and use SJasmPlus to link to a spectrum emulator file. Lots of of the better Spectrum emulators like Fuse and ZXSpin have built in editors as well for on the fly debugging and patching.

share|improve this answer
add comment

When I was in college we used PIC microprocessors. They are made by a company called Microchip. They also have a great IDE with a chip emulator/simulator that can allow you to do things without actually having the chips.

share|improve this answer
add comment

This wouldn't make any meaning to you now but just for people stopping by. This is the best assembly code simulator I have come across with. Truly worth it!


share|improve this answer
add comment

Why use an emulator?

Download MASM or NASM and write good old 80386 architecture. Plenty of online samples and learning tools.

Plenty of real-world reason to use assembler!

share|improve this answer
-1: "Plenty of real-world reason to use assembler!" Good reasons for using assembly language are very rare. You have to be an expert on microarchitecture to get any benefit, even if your compiler doesn't already emit good code. Usually your algorithm isn't optimal anyway, so you would be better off optimizing that. –  Jørgen Fogh Oct 19 '12 at 16:21
add comment

If Your are on windows 8085 Simulator is the best choice. 8085 Simulator by J-tech Softwares

It user interface is excellent than any other simulator. Also this simulator provide live view of memory map very time(also while in the execution).

But this one does not support Windows 98 or lower for that you need to check other simulators like "GnuSim8085".

share|improve this answer
add comment

there is a simulator which is Visual6502 for teaching fundemental of microprocessor architecture. It has a editor, assembler, I/O operation and animation of how to work a microprocessor. I is available at the following link.


share|improve this answer
add comment
