Questions tagged [real-mode]

x86 real mode is where a CPU begins execution. It has a 20-bit memory address space and unlimited direct software access to all addressable memory, I/O addresses and peripheral hardware. It has no concept of virtual memory, paging or memory protection as in protected-mode and long-mode. Use this tag for programming questions related to real mode.

Real mode, also called real address mode, is an operating mode of all x86-compatible CPUs.

Real mode is characterized by

  • a 20-bit segmented memory address space (giving exactly 1 MiB of addressable memory) and
  • unlimited direct software access to all addressable memory, I/O addresses and peripheral hardware, it
  • provides no support for memory protection, multitasking, or code privilege levels.

Before the release of the 80286, which introduced real mode was the only available mode for x86 CPUs. In the interests of backwards compatibility, all x86 CPUs start in real mode when reset, though its possible to emulate real mode on other systems when starting on other modes.

281 questions
0
votes
0 answers

Addressing problem in hello world boot loader with VMWare Player

I use VMWare Workstation Player 15. I prepare such hello world boot loader as boot.s: .code16 .global init init: mov $0x0e, %ah mov $0x41, %al int $0x10 hlt msg: .byte 0x41 .fill 510-(.-init), 1, 0 .word 0xaa55 Build it into binary: $ as…
L. Ouyang
  • 505
  • 6
  • 14
0
votes
1 answer

how to add realm database rows (objects) in design or development phase?

lets say I want to make an app only read data from employee realmObject like employee: {EmpNo String, EmpName String, DeptNo int, Sal int, comm int } now I want to add about 1000 employee to realm database to use it in my app. Is there any way to do…
Eng. Samer T
  • 6,465
  • 6
  • 36
  • 43
0
votes
0 answers

Why extra characters being printed before the actual output in assembly language?

I am a beginner in 8086 assembly language and am having trouble with the code. My code does work, i.e, it does print the string inputted, but shows two extra characters before displaying the actual string. I have no idea where those extra characters…
RdKu
  • 11
  • 6
0
votes
1 answer

Segment and offset uses

Early on, memory size was little (64 KiB) and it just needed a 16-bit register to address it. But later memory with 1 MiB came. So we need bigger address registers. But in 8086 CPUs instead they used another register and called it offset. So with…
user11801832
0
votes
0 answers

How do I set a value to a given physical address in Assembly 8086?

I was given the physical address 5E3DAh, and i should set the value 1 in this physical address. I know 8086 register cannot handle 20 bit addresses, therefore my question is how do I reach to that specific address?
0
votes
0 answers

BIOS interrupt print string

I managed to print a string in the BIOS (tested on QEMU), but I want to adapt it into a function because i have a couple more strings i want to print but i cant just keep pasting the same code or itll become unintelligible Here is what I…
0
votes
2 answers

NASM. Square brackets return relative location. How to find absolute?

I'm trying to print the symbol with teletype. Here's the piece of code: mov al, [smb] int 0x10 smb: db "X" But it turns out that this shows any arbitrary symbol from memory rather than from this location. Seems like [] returns the relative address…
JohnIdlewood
  • 356
  • 3
  • 12
0
votes
1 answer

Unable to set underline location using the VGA Underline Location Register

I am writing a terminal driver for custom Operating System. I want to the terminal to understand common vt-100 escape sequences that control the cursor location, shape, colors etc. So while implementing the 'underline/underscore' feature, I want to…
Arjob Mukherjee
  • 387
  • 1
  • 10
0
votes
1 answer

How do I store and use 32 bit values in 16 bit mode

Am I allowed to use E*X registers in 16 bit mode? If not how am I supposed to store and use 32 and 64 bit values (DWORDS and QWORDS). I know about using ax and dx together to store a 32 bit value, but how do I address memory like that? I don't…
0
votes
2 answers

Reading data from HDD without BIOS interrupts DRQ bit not setting

IMPORTANT: this code will render media unusable without formatting or recovery. Use unused, empty, or unneeded media. It should be straightforward to replicate BIOS interrupt functions' behavior but the information about it online is lackluster on…
user145453
  • 137
  • 10
0
votes
0 answers

ASM - IN 0x64 AND IN 0x60 for mouse input

Hello i want to implement some functions in NASM to get the 3 or 4 bytes of the mouse. i know that IN At 0x64 with 5 bit on (0x20) says that in 0x60 is available info from the mouse (how to get the remaining?). i would like to have these 3 or 4…
0
votes
0 answers

i am confused in the below given assembly language program. at the line declared explicitly

i am confused that what will be the value of variable DPBBUF_SIZ given below the value given as (4472 + 15) / 16 and assigned to varible DPBBUF_SIZ is in terms of hexadecimal or decimal. please let me know what value will be assigned to varibale…
user10722652
0
votes
0 answers

C++ printing string works in bootloader but not in kernel

I'm working on a simple real-mode OS in c++. I can't figure out how to print strings, though. The following code works when it's in the bootloader, but not when it's in the kernel. __asm__ __volatile__(".code16gcc \n"); __asm__ __volatile__ ("xor…
programmer
  • 743
  • 4
  • 10
0
votes
1 answer

Why my other label wont run ~02 Jump > 128~

So I have a code where I have 2 labels in it, Press 1 for Addition and 2 for Subtraction problem is only one label will be read pls help me on solving this problem. This is my code: JMP START msg1 dw 10, 13, 10, 13, "Choose…
0
votes
1 answer

How to do dirty check between old and new model object and insertOrUpdate if any change is there?

Thanks in advance. I have scenario where i wanted to check the data difference between existing and new realm model object. Example public class PostModel extends RealmObject { @Required @PrimaryKey @Index private String postId; …
Suresh
  • 1,199
  • 2
  • 12
  • 36