x86-16 Questions
1
I'm trying to figure out a reason for the scale factor not being present in the x86 16-bit addressing modes (MASM assembly). While the 32-bit and 64-bit addressing modes have a scale factor. Is the...
Goon asked 12/4, 2019 at 18:51
1
Solved
I have the following simple program written in MASM for an i386 processor:
TITLE BLA
.MODEL SMALL
.386
.STACK
.DATA
.CODE
MAIN PROC FAR
.STARTUP
MOV EBX,0FFFFFFFFH; (1)
MOV EAX,0EEEEEEEEH...
1
Solved
I have the following lines of programm (written for 8086 Microprocessor):
first SEGMENT BYTE
a db 7 dup (?)
first ENDS
second SEGMENT WORD
b dw 200 dup (?)
second ENDS
third SEGMENT PARA
c d...
1
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 : q...
Mydriasis asked 29/12, 2018 at 3:37
4
I am writing real mode function, which should be normal function with stackframes and so, but it should use %sp instead of %esp. Is there some way to do it?
Bocanegra asked 27/9, 2013 at 16:22
3
Solved
I'm trying to make a subprogram in assembly which will draw a square on the screen. I don't think I can pass parameters to the subprogram like I would do in C++, so I figured that I could use stack...
Hebron asked 29/5, 2016 at 15:9
2
Solved
In my 16bit DOS program I want to get the full path to the instance of my program, using DOS interrupt or its internal tables.
In other words, I'm looking for DOS equivalent of Windows API function...
1
Solved
When using MASM 6.15 under DOSBox whenever I try to do:
mov al, [cx]
or
mov al, [cx + bx]
or
mov al, [cx + 4]
I am getting the error: 'Only Base or Index Registers are allowed'
But then a...
1
Solved
I'm trying the following Intel 16 bit instruction:
mov si, word [reg]
where reg is some register. It compiles fine if reg is bx, but does not when it is ax, cx or dx. I'm using NASM as my a...
Felton asked 10/10, 2018 at 12:39
1
Solved
1
I'm a green hand to assembly language. These days I used bochs to simulate the boot procedure from virtual floppy. But one thing I don't know is what the CS register value is when the system initia...
1
Solved
I am writing my own OS in 16 bit x86 Assembly, and I'm trying to register my own interrupt, something like INT 21H in MS-DOS.
I couldn't find anything on the web.
I'm using NASM as the assembler.
6
Solved
1
Solved
I'm writing a DOS clone for a school project and I'm trying to read some sectors from a floppy drive (mainly the root directory of a FAT12 file system, sector 19) using BIOS INT 13, 2. I set the pa...
3
I decided to start learning assembly a while ago, and so I started with 16-bit assembly, using FASM.
However, I recently got a really new computer running Windows 7 64-bit, and now none of the comp...
Azov asked 1/9, 2010 at 17:35
4
I've been reading around and with the 8086 Instruction Set, it says that a CMP (compare) can set the Carry Flag. I understand that a compare subtracts two operands but I was wondering if anyone can...
Airtight asked 7/11, 2011 at 0:43
1
Solved
I couldn't get MASM to accept a far call instruction written as call 0f000h:1260h, probably because of the issues brought up in this question.
Instead of messing around with cryptic MASM directive...
2
Solved
So I want to add padding in the bootsector. Let's say, there is currently just an endless loop in there: jmp .. The sector needs to be 512 bytes long. Also, the magic num 0xaa55 is needed which is ...
Halfbound asked 17/12, 2017 at 20:44
3
Solved
In 8086 assembly programming, we can only load a data into a segment register by, first loading it into a general purpose register (or memory) and then we have to move it from there to the segment ...
Positron asked 29/9, 2013 at 5:13
2
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?
3
Solved
1
Solved
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 = ...
3
I am trying to find if the CARRY flag is 1 or not, but I don't know how to check it. I wrote the below code, but I need some help for question marks I put in.
LEA DX, MSG
MOV AH, 09H
INT 21H
...
2
Solved
I want to know if I can manipulate (read and change the value of) the instruction pointer (IP) in 8086 assembly.
For example,
Say IP is currently storing 0200h. I would like to read this value an...
2
Solved
I am a beginner in 8086 assembly language. I can understand the logic used in the program and write small programs myself. But I just want to know what this does:
.model small
.stack 300h
What i...
© 2022 - 2024 — McMap. All rights reserved.