Questions tagged [emu8086]

8086 source editor, assembler, disassembler, and software emulator (a virtual PC with MSDOS Interface)

Emu8086 is an old, unmaintained, and sometimes buggy IDE / simulator for an 8086 PC system with MS-DOS. The built-in assembler itself is TASM/MASM style, has some quirks like defaulting to an operand size in ambiguous cases like add [mem], immediate instead of warning or erroring like better assemblers do.

It's nominally shareware, by "Simulation Soft", with a "trial" version available for free from various download sites. It's official web site, https://www.emu8086.com/ has been dead for a while, with the last snapshot in the wayback machine being from August 2018 (not counting some domain-squatter ad sites.)

Most DOS int 21h system calls work, as do some BIOS int 10h and others. Installing your own interrupt handlers does work for some things, like timer interrupts, but the emulation may not include a PS/2 keyboard controller chip for using in/out instructions to read the keyboard. (TODO: check on this; this paragraph may not be fully accurate.)

Other emulators exist, such as DOSBox (which aims for enough accuracy to run old games, but doesn't always accurately emulate every corner case), and Bochs (which does aim for a high-accuracy emulation, but doesn't come with a DOS "user-space" install out of the box).


For more about 8086 in general, not specific to emu8086's assembler or the machine it emulates, see the tag wiki and tag wiki.

Some emu8086 specific links:

760 questions
12
votes
1 answer

Graphics mode in assembly 8086

I have a variable that is called average and in my DATASEG, it changes every time because the user enters a different input every time. What I want to do is to go to the graphics mode (VGA) and then print there Your average is: and then the average…
Tomer Cahal
  • 442
  • 1
  • 5
  • 14
6
votes
1 answer

Assignment directive not assigning new value to a symbol in emu8086

Why doesn't the following code assign new value to a symbol X using Assignment Directive ( = ) in emu8086: .model small .data X = 8 .code .startup mov ax, @data mov ds, ax mov bx, X X = 6 mov…
Ahtisham
  • 9,170
  • 4
  • 43
  • 57
6
votes
3 answers

Assembly 8086 EQU directive

I'm having trouble just making clear EQU directive in assembler (8086). abc EQU xyz Does EQU literally swaps abc when found in code with xyz, whatever xyz represents, value etc? i.e. Can i write? varA EQU [bp+4] mov ax, varA And one more question…
luka032
  • 925
  • 4
  • 12
  • 34
6
votes
2 answers

How can I print 0 to 100 in assembly language in emu 8086?

Here I have tried something to print 10 to 0 decimal numbers in emu8086. .MODEL SMALL .STACK 100H .DATA NUM DB 58D .CODE MAIN PROC MOV AX,@DATA MOV DS,AX START: CMP NUM,48D …
Bipul Roy
  • 506
  • 2
  • 7
  • 18
5
votes
1 answer

Calling procedures from another file

I have an .ASM file in which I want to call procedures from another .ASM or .INC file. I have tried writing the following into my main.asm file: INCLUDE file_op.inc However when I try to run it, it just says: 'the emulator is halted.' It does…
Michael Kročka
  • 617
  • 7
  • 22
5
votes
0 answers

Difference between NASM and 8086

Good evening people. I just started learning about assembly language, and I've found very good examples online to follow. Someone recommended me to use NASM to start learning, but the examples I've found I've seen they use 8086 assembler. As I was…
mr_nyo
  • 99
  • 1
  • 9
5
votes
2 answers

8086 random number generator (not just using the system time)?

I am using assembly 8086emu and I need a numbers generator for 8 numbers. I tried to use this piece of code by @johnfound: RANDGEN: ; generate a rand no using the system time RANDSTART: MOV AH, 00h ; interrupts to get system time …
Koren Minchev
  • 81
  • 1
  • 1
  • 7
5
votes
1 answer

Whats the fundamental difference between addressing of array[di] and [array + di] in assembly?

Given is the assembly program of Intel 8086 Processor which adds the numbers in array: .model small .stack 100h .data array dw 1,2,3,1,2 sum dw ?,", is the sum!$" .code main proc mov ax,@data mov ds,ax mov di,0 repeat: …
HQuser
  • 640
  • 10
  • 26
5
votes
3 answers

Emulator displays "error byte 24h not found after 2000 bytes" using int21h/ah=09h

I have to do a simple calculator in assembly using EMU8086, but every time I try to launch it EMU8086 gives this error: INT 21h, AH=09h - address: 170B5 byte 24h not found after 2000 bytes. ; correct example of INT 21h/9h: mov dx, offset msg mov…
user4179055
5
votes
2 answers

Assembly Basics: Output register value

I just started learning assembly language and I am already stuck on the part to "display the decimal values stored in a register on the screen". Im using the emu8086, any help would be appreciated! :) .model small ;Specifies the memory model used…
user5675317
5
votes
2 answers

Cannot move 8 bit address to 16 bit register

I am trying to assign variable to register here is the code: ORG 100h var1 DB 10 ; var2 DB 20 ; MOV BX,var1 ; error : operands do not match: 16 bit register and 8 bit address RET END But if swap the 4th line…
Ven
  • 73
  • 1
  • 1
  • 4
4
votes
0 answers

emu8086 DUP Directive with dwords?

I'm having problems understanding the DUP directive. When I initialize an array with the following code: t1 dd 2 dup(25ABh), 12h I can see the following data stored in the data segment: 14 00 00 00 12 00 00 00 Why is it not AB 25 00 00 AB 25 00 12…
Anonimo
  • 41
  • 2
4
votes
3 answers

Making a pong game in assembly, how do I get an input of multiple keystrokes at once?

I'm a beginner so this code probably isn't any good, I used int 16h for this but I don't know a lot about this int. I just found out you can't have multiple keystrokes at once; any help? The problem with this code is that only one board can move at…
orraz1
  • 43
  • 5
4
votes
2 answers

How do I use the TEST instruction to see if two bits are set?

How could you use the TEST instruction (or a sequence of TEST instructions) to see if bits zero and four in the AL register are both set to one? How would the TEST instruction be used to see if either bit is set? How could the TEST instruction be…
jax
  • 53
  • 5
4
votes
1 answer

X86 IDIV sign of remainder depends on sign of dividend for 8/-3 and -8/3?

Can anyone explain for me why the sign of the remainder is different in these cases? Is this an emulator bug or do real CPUs do this, too? 8 / -3 : quotient(AL) = -2 remainder(AH) = 2 -8 / 3 : quotient(AL) = -2 remainder(AH) = -2
1
2 3
50 51