Questions tagged [x86-16]

For programming and/or microarchitecture questions about the 16-bit x86 Intel CPUs, including the 8088, 8086, and later chips running in 16-bit mode.

x86-16
Filter by
Sorted by
Tagged with
-1 votes
0 answers
15 views

Assembly Language Program for Processing Full Name and Displaying Attributes [closed]

I am currently working on an assembly language program targeting the 8086 architecture. The program aims to accomplish the following tasks: Prompt the user to input their full name from the keyboard. ...
abbassalman salman's user avatar
-1 votes
0 answers
22 views

Dosbox doesnt recognize my updates in my code

IDEAL MODEL small STACK 100h DATASEG filename db 'picture1.bmp',0 filehandle dw ? Header db 54 dup (0) Palette db 256*4 dup (0) ScrLine db 320 dup (0) ErrorMsg db 'Error', 13, 10 ,'$' x dw 0 y dw 0 ...
ethan fridkin's user avatar
-1 votes
0 answers
32 views

Write an assembly program to reverse a double word (dd) number -> var dd 12345678, calculate the sum of its digits. Store both of them separately

So, I am suppose to write this in masm 8086 (16 bit) and I think the logic is proper however I am having issues with the printing, basically when I try to print it, it gives me a very weird output. I ...
vintage12's user avatar
-4 votes
0 answers
25 views

Calculate length of full name and display according to your brthdate [closed]

Write a program to enter your full name from keyboard (user input) and store in a variable. Call procedure for finding length of first name and surname. Display first name at row number equal to your ...
Sushant's user avatar
-1 votes
0 answers
25 views

how do I make a loop that will add the value in every array index in TASM [closed]

I need to make a loop that will add the value of DX in every array index each loop. The value of DX gets changed every time I call a procedure called simon. so the loop will be that each time I call ...
Yahel's user avatar
  • 1
-5 votes
0 answers
28 views

My NASM keeps saying "boot.asm:23: error: parser: instruction expected"?

I am making my own operating system and I'm trying to compile it with NASM but there is some error. I have checked the code and I think I have typed it right. Here is my assembly code: org 0x7C00 bits ...
XP Devs's user avatar
2 votes
2 answers
57 views

Why does jump if carry not work after IRET

I'm a beginner in learning 8086 assembly language using DOSBox. I'm using int 21h function 3Dh to open a data file, and I wanted to carry out the code using the file handle if the file is opened ...
KAH CHUN LEE's user avatar
2 votes
1 answer
44 views

LDS is causing an infinite loop while LES is working perfectly

This is my only code code.asm. I am executing this function from a .c file. But with this simple code, using lds instead of les causes an infinite loop... _COD SEGMENT BYTE PUBLIC 'CODE' ASSUME CS:...
pequeñaluna's user avatar
1 vote
0 answers
25 views

What exactly lea call does with SI register and a variable in data segment?

The problem is checking whether a substring exists in a string input by user. As I understand, in main proc, the program calls lea si, inputstring which means SI points the inputstring in data ...
Dương Nguyễn's user avatar
-1 votes
0 answers
12 views

ALP using Indirect addressing [closed]

Using indirect addressing write an ALP in 8086 to evaluate the following expression in HEX (1A+2B+3C)*(99+1B-3C-2D) (1A AND 2B) EX-OR (23 OR 1B) Code with explanation is required. I am supposed to ...
Physics Pubg's user avatar
1 vote
1 answer
27 views

I cannot fix the error in the code? (EMU8086)

I was writing a number guessing game, but I keep getting an error in the mov al, 1h section on line 27. I tried mov ah, 1h. I tried mov ah, 01h and it failed again. .model small .stack 100h .data ...
Cemal Gürsel's user avatar
0 votes
0 answers
29 views

8086 Assembly program to Input and Print string Not Working

I am using emu8086 to write this program to input and print the string I have typed. When I run it It takes the input string but does not print it. Here is the code. .model small .stack 100h .data ...
Syed Aizaz's user avatar
1 vote
1 answer
50 views

Why is my BIOS Disk Read program halting instead of printing?

I've started a project on writing an OS recently, and it was going well until "disk reading". The code should load the next sector and print the letter "H" which is stored just ...
Heavy Weapons Guy's user avatar
1 vote
1 answer
49 views

DOSbox automatically freezes and crashes without any prompt warnings

I was trying to run my assembly language program and it is when i try to enter the 2nd input, the cursor freezes and the DOSbox emulator would crash after a few seconds of delay. I've tried running ...
zuo hao's user avatar
  • 11
0 votes
0 answers
35 views

x86 Wrote a boot loader that prints a message to the screen but the characters are completely different to what I expected

I've been following a tutorial for creating a bootloader but whenever I run Bochs for testing the OS I get different characters from what I expected. I expected to get a Hello, world but I get ´°» 1Ò½|...
Alonso Fernández's user avatar
1 vote
0 answers
23 views

running an imf file using dosbox in parallel to a game

i am making a game for a school project in 16 bit 8086 assembly(with TASM and tlink) and wanted to add music to my game via playing an imf file, but tasm has trouble including the imf file. so then i ...
Decoy2 Greenfield's user avatar
0 votes
1 answer
65 views

Input and output of signed single-digit decimal numbers

I'm having a problem with this code. .model small .stack 100h .data Msg1 DB 'Enter first number: $' Msg2 DB 10, 13, 'Enter second number: $' Msg3 DB 10, 13, 'Entered numbers are: $' ...
asami's user avatar
  • 11
0 votes
1 answer
37 views

Move string to end of file assembly

I need to move my message string to the end of program and the program need to output it correctly. How can I do that? .model small .stack 100h .data .code main: mov ax, @data mov ds, ax ...
agressive cat's user avatar
0 votes
1 answer
63 views

I search a unit to solve the turbo pascal 255 string limit

is there a framework/unit that I can fill with strings to solve the 255 string limit? Example with a loop MyStringAllwaysWithOneString := 'X'; for i := 0 to CompleteStringLength do begin ...
Born34's user avatar
  • 47
0 votes
1 answer
33 views

Unknown error in assembly language code, the result of multiplication operation is always random symbol

I have just started learning assembly language and i tried to write a program on my own with notepad++ and dosbox emulator for multiplication operations. However, the result is always random symbol ...
zuo hao's user avatar
  • 11
-1 votes
1 answer
42 views

Assembly language adding two numbers code error issue

I am working on the assembly language that adds two user input numbers and then returns the sum. However, my code does not work properly. Can anyone check the issue? .model small .stack 100h .data ...
Jihye Lee's user avatar
-2 votes
0 answers
22 views

kernel.asm:60: error: comma, colon, decorator or end of line expected after operand

So I'm writing my own 16-bit operating system kernel and i get this error: kernel.asm:60: error: comma, colon, decorator or end of line expected after operand and I don't know why. Here is the code: ; ...
MinceraftYT's user avatar
1 vote
1 answer
33 views

Loading disk sector into memory (AT&T)

I want to load a sector into a memory address starting at (0xD000). I use index addressing to complete disk load with 0x13 BIOS interrupt. Using 16bit mode, BIOS, AT& Syntax assembly. I am having ...
CharlesTheZouch's user avatar
0 votes
0 answers
37 views

Issue with Displaying Random Characters and Sound Playback Interruption in Assembly Code

IDEAL MODEL small stack 100h DATASEG freqs dw 165, 165, 196, 196, 220, 220, 196, 174, 165, 147, 147, 131, 131, 123, 123, 110, 110, 98, 98, 87, 87, 73, 73 times db 2, 2, 2, 2, 2, 2, 4, 2,...
benbo's user avatar
  • 19
1 vote
1 answer
77 views

x86 BIOS stage 1 boot code halting after loop from interrupt [closed]

I have some x86 BIOS boot code (16 bit real mode): org 0x7C00 ; tell compiler where we are located in memory bits 16 ; tell compiler that ...
PewPewCricket's user avatar
1 vote
1 answer
119 views

Reverse engineer LCD Protocol used in MPC2000XL

I'm trying to know the protocol used for that device. LCD is : 248*60 Binary Size is 512Kb. The CPU that is used : IC10, UPD70236: V53A is an NEC branch of the Intel 8086 (via their famous V20, V30, ...
Andre Ahmed's user avatar
  • 2,203
-1 votes
0 answers
41 views

TASM error when i tried to compile this code

I'm currently trying to convert assembly language to binary in Kali Linux for the first time, but I'm getting weird errors while writing the assembly language code correctly according to the book I ...
M.r. Hosseini's user avatar
0 votes
0 answers
45 views

"Symbol not defined : @STACK " error in ASM code for 8086. Compiled using DOSBOX ,MASM

This is a code to add all numbers between 50 and 150 and display the result in decimal form.I have created the stack segment .STACK 32 to store the remainders to convert the hex result to decimal ...
Bishal Lamichhane's user avatar
1 vote
1 answer
82 views

Turbo Assembler (TASM) Undefined symbol error for extrn procedure

I am working on some Turbo Assembler which I was introduced to in my architecture class. The problem I am working on is using the extrn and include keywords to access a function/procedure from one ASM ...
Larry White's user avatar
1 vote
0 answers
94 views

memory allocation in real mode in the MBR

In a MBR, the following code in the preboot environment allocates a buffer of 10Kb by subtracting 10h from the total amount available : seg000:7C1D sub word ptr ds:413h, 10h seg000:7C22 mov ax, ds:...
Nerios's user avatar
  • 33
-1 votes
2 answers
105 views

How could I write 8 bytes of data to memory at once in 16-bit mode by nasm?

NASM compiler remind me the following code is error, "error: instruction not supported in 16-bit mode". [bits 16] xor ax, ax mov ds, ax mov qword [ds:0x0], 0x0 But the following code is ok: ...
赵德林's user avatar
0 votes
1 answer
30 views

Printing Failure for Municipality

This code is for input the name age and municipality. It can print out the age and more but the municipality cannot print out the value. .MODEL SMALL ORG 100h .DATA outmsg db 'Hello User $' ...
John Paulo Pascua's user avatar
2 votes
1 answer
36 views

Take several inputs and print 'em

This is my program: data segment str1 db "What is your name: $" str2 db "How old are you? $" str3 db 13,10, "Name Output is: $" str4 db 13,10, "Age Output is: $&...
John Paulo Pascua's user avatar
1 vote
1 answer
100 views

Why does the program crash at the line that moves the address of a string to BX?

I have this RPN calculator program in TASM that calculates an expression in the string data_stack: .model small .stack 100h .data data_stack db '3 4 +', 0 top equ 0 result db 0 .code ...
Muhab Joumaa's user avatar
-3 votes
1 answer
86 views

Why does code in MS-DOS Debug does not run and makes the prompt disappear? [closed]

I'm writing this code in DOSBox-0.74-3, making use of MS-DOS Debug and once I run it makes the prompt disappear and it does not do anything else. mov cx,16 db 0d,0a,"placeholder",0d,0a,24 ...
KORD's user avatar
  • 9
0 votes
0 answers
61 views

Why does this work in Turbo Debugger but not regularly

.586 IDEAL MODEL small STACK 100h jumps p186 DATASEG board dw 0ff00h,0ff00h,0ff00h,0ff00h,0ff00h,0ff00h,0ff00h,0ff00h,0ff00h,0ff00h,0ff00h,0ff00h,0ff00h,0ff00h,0ff00h,0ff00h,0ff00h,0ff00h,0ff00h,...
Niv Sorek's user avatar
1 vote
1 answer
54 views

How to consistently make the background be blue in assembly for DOS/BIOS/VGA

.model small .stack .data num db 3 msg1 db 13,10, 'Enter the size of the Square [1-9]: $' db 1Fh msg2 db 13,10, 'Do you want to try again? [y/n]: $' db 1Fh msg3 db 13,...
Chocol8's user avatar
  • 11
1 vote
2 answers
75 views

how to use mov ah, 0 int 16h so that the snake moves continuously

I'm making the snake game and ran into a problem. For now, I used int 21h, so it only moved when I pressed a key. Now I want it to move continuously so it isn't waiting for me to press a key but just ...
yarden's user avatar
  • 73
1 vote
1 answer
41 views

replacing values in an array and incrementing

I'm making the snake game and I ran into 2 problems. I can't understand how to do the replacement. When you move, in the DS you have the coordinates of the stars and each of them moves one spot to ...
yarden's user avatar
  • 73
1 vote
1 answer
39 views

Changing a 3D-array by replacing some of its words with the sum of the 5 words that follow

The given logical segment I1 db ? I2 db ? I3 db ? A1 dw 5 dup (6 dup (0fh,4 dup (0))) Data1 ends Create a segment of codes (for example, with the name Code1), in which to implement the following ...
ex4mple's user avatar
  • 11
1 vote
1 answer
35 views

How to fix duplicate declaration of stack in x86

I am trying to get 5 numbers from the user and store those numbers in an upward growing stack. Then it displays the contents of the stack based on the LIFO (Last in first out) concept. I'm running ...
Ibrahim's user avatar
  • 45
0 votes
1 answer
45 views

Adding Power Capability to this Simple Calculator

I've a simple calculator as below. I want to Add a Power Capability So that the calculator could Calculate the Power of 2 numbers which values are taken from User Input . Here Is the Code for 4 main ...
erfanyousefi's user avatar
1 vote
1 answer
40 views

Why is it adding me a random pixel on the screen?

I'm making the snake game and I got to the part where there are (for now) 3 asterisks that make the snake. When I move from vertical to horizontal and from horizontal to vertical it adds another ...
yarden's user avatar
  • 73
1 vote
1 answer
48 views

I’m trying to turn two decimal numbers into floating point numbers, divide them and show the result in 16 bit assembly but all i get are symbols

I’m trying to turn two decimal numbers into floating point numbers, divide them and show the result in 16 bit assembly for a class project without using the floating point unit. I have no idea why ...
Funny It Is's user avatar
0 votes
1 answer
48 views

Collision detection in TASM asm

The algo im trying to implement is https://gbdev.io/gb-asm-tutorial/part3/collision.html This is the code to get the Centers of Both the apple and the snake shr bx,1 mov [CenterSquare_X], bx ...
benbo's user avatar
  • 19
1 vote
1 answer
69 views

Implementing a collision algorithm in TASM

The algorithm was made by GB-ASM: You check the differences between 2 centers of 2 objects,and if the absolute value of the 2 differences are both smaller then the sam of their half widths, there is a ...
benbo's user avatar
  • 19
0 votes
1 answer
56 views

How do you make something random disappear and then come back somewhere else randomly?

I'm making a snake game in assembly (very beginner level) and I'm stuck at the part where the apple is supposed to disappear and come back somewhere else randomly. I'm doing the randomness with the ...
yarden's user avatar
  • 73
1 vote
1 answer
41 views

sorting an array in emu8086

I am trying to sort an array using a recherchemax proc (which allows me to find the maximum of an array), my idea consists of finding the maximum and then putting it in its right order everytime, I ...
Zahra 's user avatar
  • 67
2 votes
1 answer
35 views

Accessing an array in emu8086

Can someone please tell me the most effective way to access an array's element in emu8086? As an example I got this array: tab db 30h,35h,32h,37h,38h,39h,31h Is it wrong to write mov si, offset tab ...
Zahra 's user avatar
  • 67
1 vote
1 answer
42 views

how to make a pseudo random things to appear after one another on screen?

I'm making snake game for school and i need to use pseudo random to create the apples. We have kind of a book but I don't understand it the way the explain it. I would love for somebody to try to ...
yarden's user avatar
  • 73

1
2 3 4 5
60