8086 Assembly Studio — online 8086 assembler and MASM emulator

Loading 8086 Assembly Studio…

8086 Assembly Studio — online 8086 assembler and MASM emulator

8086 Assembly Studio is a free online 8086 assembler, MASM-compatible compiler workflow, and 8086 emulator you run in the browser at /asmlab. Write Intel 8086 assembly (MASM, TASM or emu8086 style), assemble it, then step or run the program while every register, flag, stack word and memory byte updates live. DOS interrupt 21h behaves like a classroom DOS PC: print strings, read keys with and without echo, take whole lines of input, open and write files, ask for the date and time. The keyboard is real too, so arrow keys, function keys, Backspace and Ctrl+C reach your program with true ASCII and scan codes. Assembly, emulation and storage all stay in your tab—no install and nothing uploaded—so it works as a lightweight emu8086 alternative for coursework.

What you can do

  • Online 8086 assembler (MASM / TASM / emu8086)

    Assemble MASM, TASM and emu8086 syntax in the browser: .model and .data sections, classic SEGMENT blocks, COM programs with ORG 100h, procedures, macros with LOCAL labels, DUP, EQU and PTR overrides. INCLUDE brings in Irvine32/Irvine16, emu8086.inc (PRINT, DEFINE_SCAN_NUM, …) and io.mac (PutStr, GetInt, nwln). Mistakes such as memory-to-memory MOV, mismatched operand sizes or undefined labels are reported with the exact line—so you get assembler feedback without installing MASM or TASM.

  • 8086 emulator with step debugger

    Run at a speed you choose, from one instruction per second to full speed, pause or stop at any time, step into with F8, step over with F10, step back with Shift+F8, and click the editor gutter to set breakpoints. The current instruction is highlighted in the source while a trace log and reversible history record addresses, mnemonics, registers and memory writes. Format tidies source indentation; fullscreen enlarges the editor.

  • DOS services in INT 21h

    Console output (02h, 09h), character input (01h, 06h, 07h, 08h), buffered line input (0Ah), keyboard status and flush (0Bh, 0Ch), vectors (25h, 35h), date and time (2Ah, 2Ch), memory blocks (48h, 49h, 4Ah), file and directory calls on a virtual disk (including create-new 5Bh and extended open 6Ch), country info (38h), file date/time (57h), and exit with a return code (4Ch).

  • Keyboard and BIOS interrupts

    INT 16h returns scan code and ASCII together, INT 10h handles the cursor, scrolling, colour attributes and string output, INT 29h prints a character quickly, and direct writes to video memory at B800h appear on the screen. Programs that poll the hardware can read the keyboard through ports 5 and 6 or the PC controller at 60h.

  • Visual CPU view

    Registers show 16-bit and 8-bit halves and highlight whatever the last step changed. Flags, the stack with a pointer marker, a hex and ASCII memory viewer with DS, ES, SS, CS and video segments, and a number converter keep the machine state visible. A Feedback tab collects suggestions without leaving the lab.

  • Hardware peripherals

    Eight LEDs on port 2, a 7-segment display on port 3, an input port you type values into, and a 16 by 16 colour pixel display on port 4 let students connect assembly to something they can see, in the style of microprocessor lab kits.

  • Examples and graded challenges

    Ready programs cover Hello World, Irvine library I/O, loops, number printing, stack tricks, keyboard handling, files and hardware. Open any sample with a ?sample= id in the URL. Graded challenges check your solution by running it on the real emulator, for example sorting four bytes, multiplying with ADD only or shouting a typed key in upper case.

Worked examples

Print a message with DOS

mov ah, 09h / lea dx, msg / int 21h

Store the text with a dollar sign terminator, point DS:DX at it, and call INT 21h with AH set to 09h. The string appears on the terminal and the console reports the exit code when the program ends with function 4Ch.

Irvine WriteString and WriteDec

INCLUDE Irvine32.inc / call WriteString / call WriteDec / exit

Null-terminate the string, point EDX (or DX) at it, and call WriteString. WriteDec prints the unsigned value in EAX/AX. The built-in exit macro ends the program with DOS function 4Ch.

Read a name with buffered input

buf db 20, 0, 20 dup(0) / mov ah, 0Ah / int 21h

Function 0Ah fills the buffer with the typed characters and stores their count in the second byte. Click the terminal, type a name, use Backspace to correct mistakes and press Enter. Step through to see the count byte change in the memory viewer.

Draw with the pixel display

mov al, x / out 4, al / mov al, y / out 4, al / mov al, 12 / out 4, al

Each pixel takes three writes to port 4: column, row and colour. A short loop that sends x as both coordinates draws a diagonal line across the 16 by 16 grid, which makes loop counters and register use concrete.

How it compares

People searching for an online 8086 assembler, MASM compiler in the browser, or 8086 emulator online usually compare desktop emu8086, DOSBox with MASM, and EMU2. Those give a fuller DOS but need installation, and many school laptops block them. Thin online simulators teach opcodes but often omit DOS and keyboard behaviour that coursework labs grade. 8086 Assembly Studio is UtilBloom’s free browser 8086 assembler and emulator: install-free, MASM/TASM/emu8086 syntax, faithful INT 21h / INT 10h / INT 16h, a virtual disk and scan-code keyboard input. It does not execute real machine code, so self-modifying code, graphics modes and hardware interrupts are outside its scope. For high-level practice pair it with /codelab, and use /math/base-converter when you need a quick hex, binary and decimal check.

Questions

Is this a free online 8086 assembler?

Yes. 8086 Assembly Studio is a free online 8086 assembler and step debugger that runs entirely in your browser. Paste or type Intel 8086 assembly, assemble it, then run or single-step—no desktop MASM, TASM or emu8086 install required.

Can I use MASM or TASM syntax here?

Yes. The online assembler accepts the MASM, TASM and emu8086 family: .model small with .data and .code, old-style SEGMENT and ENDS blocks, COM programs with ORG 100h, PROC and ENDP, MACRO and ENDM, EQU, DUP, OFFSET and BYTE PTR or WORD PTR. Numbers can be written as 1Fh, 0x1F, 1010b or decimal. INCLUDE Irvine32.inc or Irvine16.inc links the common Irvine I/O procedures in the browser.

Is 8086 Assembly Studio an emu8086 alternative?

It is built for the same classroom jobs as emu8086—write 8086 assembly, assemble, emulate DOS I/O and inspect registers—without installing software. You get MASM-style syntax, INT 21h services, a terminal and a step debugger in the tab. It is not a bit-perfect clone of every emu8086 peripheral, but it covers the assembler-plus-emulator workflow most labs need.

Does it include an 8086 emulator and debugger?

Yes. After the assembler produces machine code, the built-in 8086 emulator runs it with step into, step over, step back, breakpoints, a register/flag view, stack, memory and a trace log so you can debug assembly the way a lab bench expects.

Which DOS commands are supported?

INT 21h covers console input and output, buffered input, keyboard status, interrupt vectors, date and time, memory allocation, directory and file services (including AH=5Bh create-new and AH=6Ch extended open), country info (38h), file date/time (57h), IOCTL queries, find-first and find-next, and program exit. Unsupported function numbers set the carry flag, return error 1 in AX and print a note in the console.

How do I open a sample from a link?

Append ?sample=<id> to /asmlab, for example /asmlab?sample=hello. The studio loads that example into the editor after the page hydrates. Unknown ids fall back to your last saved source or the default sample.

Do arrow keys and function keys work?

Yes. Extended keys follow the DOS convention: function 08h returns 0 in AL first and the scan code on the next call, while INT 16h returns the scan code in AH with AL equal to 0. Click the terminal so it has focus, and press Shift+Tab to leave it.

Where are my files stored when I use INT 21h file calls?

On a virtual disk held in memory for the current tab. Open the Files tab to inspect, download or delete them, or add your own. Closing the tab discards the disk, while the source code you write is kept in local storage on your device.

Why does my program say it ran into data?

Execution reached bytes that hold variables rather than instructions, usually because the program did not finish with INT 21h function 4Ch, RET or HLT before the data section. Add an exit sequence after the last instruction.

Can I stop a program that never ends?

Press Pause at any time, or Ctrl+C inside the terminal when the program is reading a key through DOS. Reset restores the registers and clears the screen so you can run again from the first instruction.

How accurate are the flags and instruction timings?

Flags for arithmetic, logic, shifts, rotates and BCD adjustments follow the 8086 definitions, including carry, overflow and auxiliary carry. Cycle counts and bus timing are not modelled, so use it to learn behaviour rather than to measure performance.

Related tools

Guides