x86-16 Questions

2

Solved

Does someone know how to swap the values of 2 registers without using another variable, register, stack, or any other storage location? thanks! Like swapping AX, BX.
Leucine asked 20/10, 2014 at 15:21

5

For a one digit number, I want to know if it's odd or even (multiple of 2). For example, given 9, print that is an odd number. (i.e. check the mathematical parity, not the computing parity.) This i...
Striated asked 27/3, 2015 at 2:45

1

Solved

I am learning 8086 and there is one particular question which is bothering me and I have not been able to find any satisfactory answer yet. I understand that CPU executes the code sequentially and...
Rumple asked 12/9, 2017 at 20:22

1

Solved

While executing a loop in my 8086 assembly programs, there is a keyboard key press threshold where if you press a key too many times the PC speaker will start beeping. It's obnoxious, and it slows ...
Pannier asked 6/9, 2017 at 18:40

1

Solved

I was tasked to write a program that displays the linear address of my program's PSP. I wrote the following: ORG 256 mov dx,Msg mov ah,09h ;DOS.WriteStringToStandardOutput int 21h mov ax,ds...
Laney asked 27/8, 2017 at 10:41

1

How do you properly set, and then reset, the keyboard ISR in DOS? (x86 assembly, real mode, 16 bit, with TASM) I have the following assembly code which sets up my ISR for the keyboard. All it is ...
Givens asked 7/8, 2017 at 0:28

1

I wrote a game in assembly for the 8086 processor and run it on a DOS emulator named DOSBox. Now I want to show the game to other people without them having to download an emulator. Basically, I w...
Welbie asked 23/7, 2017 at 16:40

1

In the flag register of Z80, 8080, 8085, and 8086 processors, what is the purpose of bits 1, 3, 5, which are documented as "reserved" or "undefined"?
Aeciospore asked 30/6, 2017 at 7:34

1

Solved

Looking through Ralph Brown's interrupt list, I discovered that there are many different ways to output text characters to the screen. The ROM BIOS API offers these functions: AH=09h – Write C...
Beethoven asked 25/6, 2017 at 13:48

3

Solved

I am trying to delay my movement in a game I'm creating. My problem is that every time that I use the int 1Ah the movement suddenly becomes "rusty" (not moving in a constant line) while my delay ...
Skillern asked 29/5, 2017 at 15:51

2

Why does the initialization of the DS and ES registers has to be done manually by the programmer? For example: MOV AX, DTSEG MOV DS, AX On the other hand, the CS and SS registers are initiali...
Negotiate asked 1/12, 2012 at 21:15

1

Solved

What is the correct gnu assembly syntax for doing the following: .section .data2 .asciz "******* Output Data ********" total_sectors_written: .word 0x0 max_buffer_sectors: .word ((0x9fc00 - $data_...
Wilda asked 3/5, 2017 at 17:27

3

Solved

I'm new to learning assembly language, and I'm wondering what the command int 21h means. For example: mov ah,01h int 21h Which should read a key from the user.
Poston asked 9/6, 2011 at 13:40

1

Solved

I was helping a friend of mine debug his program, and we narrowed it down to an issue which occurs even here: .MODEL small .STACK 16 .CODE start: mov ax, 044c0h mov bl, 85 idiv bl exit: mov ax...
Weaver asked 23/4, 2017 at 18:28

1

Solved

I'm a newbie to learning OS development. From the book I read, it said that boot loader will copy first MBR into 0x7c00, and starts from there in real mode. And, example starts with 16 bit assembl...
Headachy asked 22/4, 2017 at 21:11

1

Solved

So I am having this exact problem. The solution given is to zero out DX, but in my case it already is! My program is to simply divide a 16 bit number by an 8 bit number. My code is: data segment...
Pa asked 20/4, 2017 at 14:22

1

Solved

I found that usually programmers fixup registers (and sometimes segments) on their very first lines of bootloaders and they advice usually to have this habit. For instance: inc cx dec bx inc bp dec...
Crackbrain asked 12/4, 2017 at 2:41

4

Can I use JMP and RET to jump back from a label as you would with CALL and RET?
Heteroousian asked 10/3, 2015 at 13:12

6

Solved

I am reading about memory addressing. I read about segment offset and then about descriptor offset. I know how to calculate the exact addresses in real mode. All this is OK, but I am unable to unde...
Wreck asked 7/11, 2010 at 20:20

3

Solved

Ever since I started with 8086 Assembly Language programming, I have been hammering my mind about these Segments and Segment registers. The problem I am facing is that I can't have a visual image o...

0

I am trying to write a program to check what processor is used to execute my program. Since this is intended to be used on a number of historic PC-clones, I want to be able to tell an 8086 from an ...
Karlow asked 17/2, 2017 at 19:51

1

Solved

I am writing a bootloader in assembly and it seems to work fine on qemu, bochs and virtualbox. However, it is not loading the kernel on real hardware (it seems). The bootloader starts off by writi...
Buckbuckaroo asked 28/1, 2017 at 15:39

1

Solved

Configuration : MS-DOS 16 BIT (writing in a .asm file, then compiling them with TASM and TLINK) Windows 7 x64 I've made a simple program in Assembly that should only OPEN a file and write a text ...
Primate asked 7/1, 2017 at 14:36

2

Solved

I am writing some little tools for MS-DOS. Now I'm writing a Shutdown.com, like for Windows XP and greater. I have already written the entire code, now I just need to pass the argument from DOS. I...
Rancher asked 3/1, 2017 at 17:11

2

I want to make a program in assembly/8086/masm/dosbox that turns the keyboard into various musical instruments so i need to be able to play some .wav files to produce the required sounds.I am aware...
Flickertail asked 28/12, 2016 at 9:30

© 2022 - 2024 — McMap. All rights reserved.