Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [emu8086]

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

3
votes
1answer
38 views

Why is 8086 having odd and even bank?

Why in 8086 we require to divide memory into odd and even bank, and what benefits rather than reading in one clock cycle?
0
votes
1answer
1k views

Correct interrupt code in assembly

I want to print sum of two numbers in assembly. When I run the code, compiler shows the message: INT 21h, AH=020h - not supported yet. refer to the list of supported interrupts. Why do my code ...
-4
votes
1answer
53 views

University project - writing pthreads in Assembly [closed]

I've got a project due in assembly (Intel 8086), our professor wants us to do the following: Using assembly: Gets number of threads as input. The program asks the operating system for 100,000 memory ...
2
votes
1answer
43 views

Assembly x86 infinite loop issue MOV CX, 12 after Procedure RET

NUM EQU 3 .MODEL small .STACK .DATA tempi DW 8,27,17,12,21,34,9,41,7,18,15,5 risultato DW NUM DUP (?) .CODE .STARTUP PUSH OFFSET tempi PUSH OFFSET risultato CALL copiaVettore ...
0
votes
1answer
38 views

Why JB isn't doing accurate CMP [duplicate]

In emu8086, I have written this code include 'emu8086.inc' org 100h MOV AX,-1 CMP AX,0 JB case1 case2: printn 'This line should not be displayed' case1: print 'I want this line' ret ...
1
vote
0answers
49 views

How to set the system time using assembly 8086 with dosbox?

I wish to set the system time, and get the time for display. i have successfully get he system time with the following code mov ah,2ch ;get time int 21h ;ch = hr, cl = ...
0
votes
0answers
31 views

print output the 3 digit of a number asm [duplicate]

i need help to print the 3 digit, if the number incremented is bigger then 100 the program stop, anyone know how to do it? i only can print numbers like 10,11,78. points_count proc PUSHF ...
0
votes
0answers
31 views

Value stored by the AX register emu8086 [duplicate]

As far as I know, the AX register is a 16 bits-one, so it should be able to hold values up to 111... (16 times, in binary), which means 65535 in decimal and FFFF in hexa. include 'emu8086.inc' ...
1
vote
1answer
46 views

XOR-ing 2 bytes in assembly language

So I'm given 2 numbers on 8 bits, let's call them a and b. I need the assembly program (emu8086 with registers on 16 bits) that performs some operations on them (which I think I can handle if I reach ...
0
votes
1answer
51 views

assembly 8086, count even numbers in array

So I came across one example in my box for assembly 8086 and i could use some help with completing the code So example goes like this: there is an array of integers, calculate number of even elements ...
1
vote
0answers
32 views

INT 10h, AH=13h with colored background

I'm trying to use the int 10h, AH=13h function to print a string in graphic mode, and I get that the value in BL in the high and low bits correspond to the background and foreground colors, but I just ...
0
votes
0answers
29 views

Number of times a certain character appears in a string (assembly emu8086)

I have a random string, say 'coccoo' and I want to store in the AX register the number of times the character 'c' appears (So in this case I should get 3, but I only get 2). This is my code:` ...
2
votes
2answers
8k views

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! :) ...
2
votes
2answers
277 views

In assembly why can't a hexadecimal number be printed without shifting?

This code is taken from an online example. Let's say I have the variable I want to print in my DL. DISPLAY_HEX PROC NEAR MOV BL,DL MOV BH,0 MOV CL,4 SHL BX,CL MOV ...
-7
votes
1answer
65 views
0
votes
0answers
34 views

how do I get which keys are being held at specific time?

I need a way to get all the keys which are being pressed(or held) at a single moment. Alternatively, how can I check the status of a specific key (up or down)? I can't do a loop that waits for input ...
2
votes
1answer
47 views

Error when I try to print number

I learn assembly 8086. I have this code: .model small .stack 100h .data num db 10111111b itr db 7 ;iterations .code mov ax, @data mov ds, ax mov cl,0 ;rolls counter mov ch,0 ;zero counter ...
0
votes
0answers
27 views

Pass parameters through the stack

I'm writing a program with emu8086 .data address dd 82C028D1h, 81C0276Ah mask dd FFFC0000h reference dd 82C0B685h .code proc filter push bp mov bp, sp ; stack ;...
0
votes
0answers
107 views

How to multiply two big big numbers with 8086 assembly

I'm trying to multiply two big numbers in x86 assembly, for example two numbers 100 bytes long, and I want to do this in C code. I know there are simple ways to do the multiplication, such as adding ...
-4
votes
1answer
24 views

What is a “control character in ASCII form”?

I am taking Microprocessors course and I have an issues to solve, so I can finish my code. I wrote a code that can compare and count the first 7 requirements. But the problems are: How can I read ...
0
votes
1answer
48 views

Assembly Langauge: Where to place .txt file so that the program can read it? (DOSBox)

I need to read and display a text file for an assignment. Basically, it needs to read and display the text in the file called "textfile.txt". In EMU8086, I know where to place the file and the program ...
0
votes
1answer
53 views

“Read” the graphics screen in assembly 13h mode

Is there a way to "read" the 13h mode screen in Assembly (emu8086)? What I want to do is draw a shape in the 13h mode (in color A), then have the user try to trace it (in color B), effectively ...
0
votes
0answers
36 views

What is the meaning of assigning a segment name to a register in 8086 assembly?

I'm helping a friend with homework and in his code and I encountered a line I don't understand. This is the code, roughly: code segment assume cs: code, ds: data, ss: stack ... mov ax, data mov ...
2
votes
1answer
36 views

EMU8086 Display screen (black screen)

I am taking Microprocessors course and I have a problem with my code. I need to write a program code that make a word moving around. The code work correctly on (80*25) screen (because of my ...
1
vote
0answers
44 views

Can't open file using int 21h 3Dh

I am trying to open a .TXT file using emu8086 and int 21h ah=3Dh. I moved the file into "C:\emu8086\MyBuild" folder and when I ran my code I got the following error: file does not exist: C:\...
1
vote
1answer
54 views

C source code, Watcom Compiler and EMU8086

How can I get the Watcom compiler (the forked version 2.0 beta which runs on 64-bit hosts) to output 8086 assembly source code in an ASM file? Running wcc -0 main.c from the command prompt produces ...
1
vote
2answers
68 views

What is The Meaning of This Assembly instruction? [duplicate]

What is meant by writing the following lines? OR AX,AX JGE LABEL To my knowledge, OR is not a comparison operator. And, Branching statements like, "JGE/JE/JL" can only be used only when I have ...
0
votes
0answers
19 views

trying to divide 16 bit by 16 bit in TASM [duplicate]

I have ax, a 16 bit register, and bx, also a 16 bit register, I want to divide them and get the result as dx,ax where dx is the remainder, and ax is the quotient, in Emu8086, doing that works. But in ...
0
votes
0answers
26 views

Mononumeric substitution decryption?

I have this program on the emu8086 and it is a Mono numeric substitution encryption then decryption. I have succeeded in encryption but i don't how to decrypt and remove any spaces and then print the ...
0
votes
1answer
69 views

Why operand must have size in one line but not the other in x86 assembly

Looking at the picture, on line 34 I had to write the word ptr for this to work, while on line 44 I didn't. Why is that? Can't the compiler know that 0020h is a word just like 0FF20h is a word? ...
1
vote
1answer
36 views

Custom Emu8086 8-bit Binary Virtual Device debugging

I've been trying to code a custom Emu8086 (8086 microprocessor emulator) 8-bit binary virtual device output that displays assembly input as binary output: MOV AX, 0FFH -> OUTPUT: 1111 1111 I've had ...
0
votes
0answers
29 views

Waiting, assembly emu8086 [duplicate]

I am trying to wait about 0.02 seconds in assembly, emu8086. That is my code so far: mov ah, 00h int 1ah ; Interrupt "get system time" mov si, dx mov bx, 1h ; How many ticks to wait (9/18=0.5 second)...
0
votes
0answers
33 views

MOV [SI],BX where SI is an odd offset address

we know that the higher bank, i.e odd bank of memory in 8086 stores the upper byte of any 16-bit number.But here SI points to the odd bank already,so how does it store the contents of BX?
0
votes
1answer
52 views

Using MOV instruction

How to write in assembly language these instructions. First one: org 100h mov ax ,0b00h mov ds ,ax You have to put in the memory address 0becah the value from al. Second one: org 100h mov ax ,...
1
vote
0answers
30 views

Assembly emu8086: Two hex and binary number add sub mul

I get hex as the first number.I get binary as the second number. the program does not work when I try to enter a value outside of it. The reason is that when I enter binary, it converts to hex.When I ...
4
votes
1answer
48 views

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.
1
vote
1answer
131 views

How to check if the stack is empty on 8086

I am working on a study in Assembler 8086 that checks the balance of the parenthesis in a mathematical expression. The algorithm is as follows: Make an empty stack Read characters until end of string ...
2
votes
2answers
27 views

I have an issue in assembly program emu 8086, when I print the sub result for two number

I Write an assembly program that makes the user enters 2 integers, stores them in a stack and then displays the sub of them: and this my code: .MODEL SMALL .STACK 100H .DATA msg2 db 0dh,0ah, '...
-2
votes
2answers
435 views

Why should i learn assembly language in 2018? [closed]

I am a student of computer science. In my 5th semester i have to learn assembly language. After 6/7 weeks in my class i just came to know that this assembly language learning will teach me about ...
0
votes
0answers
48 views

x86 16Bit - Changing text background & color after changing palette

I've been working with bmps, therefore changed the color palette of the program Now text is printed dark blue with black background.. Is it prossible to change the color to a specific color from the ...
1
vote
1answer
296 views

What does “mov ah, 0Bh” / “int 21h” do in DOS assembly?

I saw this code to generate and display a square wave on a CRO. data segment base_add equ 0ef40h porta equ base_add+0 portb equ base_add+1 portc equ base_add+2 control_word equ base_add+3 data ...
0
votes
0answers
31 views

Playing with OF and CF in emu8086

today I am learning how to read Carry Flag and Overflow Flag in assembly x86 using Emu8086 for Windows. I learned that in unsigned math, I need to look at Carry Flag while in signed math, I need to ...
0
votes
3answers
275 views

assembly moving al register value into ax

I am completely new to the assembly and I have some question about registers still after searching through. currently I'm trying to divide a value over and over again by doing: 1.divide ax over bl (...
-2
votes
1answer
28 views

Can anybody tell me what's wrong with this code in emu8086?

I can't seem to run my code in emu8086. Can anybody take a look at my code and figure out what's wrong? org 100h variable1 db 9h variable2 db 5 variable3 db 1342h ret mov ax, variable1 mov bl,...
1
vote
0answers
48 views

Define an array; sum the array; and display the result

I just need to solve my assignment this is the first question: Define an array that has 5numbers ( 1,1,2,3,2) then add these numbers to each other and display the answer: I try to solve it like ...
1
vote
1answer
46 views

8086 assembly program always prints the same string

I've coded the below program using emu8086 with fasm-syntax enabled. As you can see, the program should print "Overflow flag not set" the first time around and then after the addition sets the ...
4
votes
1answer
85 views

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)'...
2
votes
1answer
118 views

8086 16-bit division overflow error on runtime

Following code in emu8086 giving overflow error, all I want to do is to decide if the number is odd or even, so I'm dividing by 2. I can't figure out what's wrong. CLC MOV CX, 20d MOV BX, 07200h ...
-3
votes
1answer
188 views

SUM numbers 1,2,3,4,5,6,7,8,9,10 by using loop in assembly

I NEED TO SUM numbers 1,2,3,4,5,6,7,8,9,10 by using loop in 8086 assembly. Here my attempt: MOV AX,01h MOV CX,0ah LABEL1: inc AX LOOP LABEL1 HLT
1
vote
1answer
1k views

Addition of two 8-bits number in 8086 using MASM

This is the code that I have written in 8086 using MASM. The code is for simple addition of two 8-bit numbers (no need to worry about carry). I gave for input to the following program, two numbers: ...