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
4
votes
1 answer

Why is mov 0900h, ax allowed in emu8086?

I just checked the manual again and MOV Immediate, REG is not allowed and in fact is illogical, but when I compile, it runs just fine.
superflash
  • 105
  • 1
  • 10
4
votes
1 answer

emu8086 complains about "Unterminated string" with a long string in a DB

I'm new in 8086 Assembly programming and I have a question. I have a string which size is about 1400 characters. When I'm trying to define it like: .data mystring DB '(string with 1400 characters)' I'm getting an error "Unterminated…
onurcanak
  • 109
  • 1
  • 9
4
votes
2 answers

how can I turn on caps lock's light in keyboard with assembly emu8086

how can I turn on caps lock's light in keyboard with assembly emu8086 is it true ? Any other solution can you say it data segment ; add your data here! pkey db "press any key...$" ends stack segment dw 128 dup(0) ends code…
4
votes
2 answers

Random number in emu8086 without using DOS/BIOS calls?

I am new to assembly and would like to know how to write a program in EMU8086 that prints a different random number in every run of it. Is it possible to do it without using interrupts?
user8097385
  • 109
  • 2
  • 7
4
votes
2 answers

strings with quotation marks in assembly

I am using emu8086. I am trying to define a string like "I don't "listen" to radio". When I use either of the following: mystr db "I don't ""listen"" to radio" mystr db 'I don"t "listen" to radio' and try to print mystr, it prints either of the…
Cror2014
  • 417
  • 1
  • 6
  • 16
4
votes
1 answer

What is the difference between .code/.data and code/data segment?

I was given a particular program code by my instructor, to sort a set of data using bubble sort in assembly language (8086 micro-processor instructions). For all previous codes I had used the syntax: DATA SEGMENT DATA ENDS CODE…
50calrevolver
  • 142
  • 2
  • 13
4
votes
1 answer

emu8086 doesn't recognize my labels

I try to write an assembly code that determines if 28 is a perfect number or not. But I have a problem. When I run the code, emu8086 doesn't recognize my labels. For example in this code: mov dl,1ch mov bl,00h ;sum mov cl,1ch ;counter dec cl HERE :…
Selin Gök
  • 331
  • 1
  • 5
  • 20
4
votes
2 answers

assembly 8086 cursor placement

I want to place the cursor after the "paper:" wait until an ENTER is given and then place it after "author(s):". both sentences are defined variables that are printed. insert db "******* Insert new paper *******",0,0Ah,0Ah,0Ah, 0Dh, "$" …
justwarmilk
  • 43
  • 1
  • 1
  • 6
4
votes
3 answers

Displaying Time in Assembly

Hello im trying to display the actual time hours/minutes/seconds this is my code sample: MOV AH, 2Ch INT 21h MOV AH, 0Eh MOV AL, CH INT 10h MOV AL, 3Ah INT 10h MOV AL, CL INT 10h MOV AL, 3Ah INT 10h MOV AL, DH INT 10h ret Here you can se…
Polo D. Vargas
  • 1,649
  • 2
  • 14
  • 23
4
votes
2 answers

Generating random numbers in assembly

I am new to assembly, and I am having problems generating random numbers. My code is simple: it generates 100 numbers in the 0-25 range and stores them in an array. The problem I am experiencing is that when I run the con on the emu8086 assembler it…
Hamza Anis
  • 2,475
  • 1
  • 26
  • 36
4
votes
1 answer

emu8086 wrongly use com file

I wrote a simple assembly code which sums up 4 words STSEG SEGMENT DB 32 DUP (?) STSEG ENDS DTSEG SEGMENT DATA_IN DW 234DH,1DE6H,3BC7H,566AH ORG 100H SUM DW …
mahmood
  • 23,197
  • 49
  • 147
  • 242
4
votes
1 answer

Is there another instruction similar to MOVZX, but supported on the 8086?

Im trying to find an instruction that will replace MOVZX, since I'm using EMU8086 (which emulates an 8086 that does not support MOVZX). The closest instruction I found was CBW, which puts the value in the register AX, but it's for signed values…
4
votes
3 answers

Draw on screen using mouse in assembly (emu8086)

The code below lets you draw on screen with mouse, and works perfect. My problem is why does CX need to be divided by 2? Why is it doubled in the first place? code segment main proc far mov al, 12h mov ah, 0 ; set graphics video mode. int 10h …
Asnira
  • 313
  • 1
  • 4
  • 9
3
votes
1 answer

How can I write a code that loops 256 times using only 3 instructions and one 8-bit register (8086 instruction set)?

This was a question that was previously posed by a prof of mine and I'm assuming the 8-bit register is either CL or CH. I got it working by simply moving 01H to the CH register, but I was wondering if there was any other way of doing this since I am…
Chronos
  • 33
  • 5
3
votes
1 answer

EMU8086 dividing 32 bit number by a 16 bit number gives unexpected 0 remainder

I was trying to divide (Unsigned) 8A32F4D5 by C9A5 using emu8086 tool. I expected the quotient to be AF73H and the remainder be 94B6H. After writing the following code, I was getting correct quotient but the remainder became 0000h. Am I missing…
1
2
3
50 51