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
-1
votes
2 answers

Why is xor'ing DS not allowed?

I'm writing a program in real-mode x86 assembly and I'm trying to do this: xor %ds, %ds instead of the alternative: mov $0, %ax mov %ax, %ds However, I'm getting an assembler error: Error: operand type mismatch for `xor' Why is this? Is there a…
S.S. Anne
  • 15,171
  • 8
  • 38
  • 76
-1
votes
1 answer

Prepare(for segue: ) not passing data in Realm

The prepare(for segue: ) function runs, but the data is not sent to my destination ViewController. I am getting following error when loading that VC's collection view which has to receive the data: Unexpectedly found nil while unwrapping an…
-1
votes
1 answer

x86 real mode: move data from one array to another

Here is my code: data segment gio db 1,2,3,4,5,6 ricxvi db 1 jami db 0 x db ? ends stack segment db 128 dup(0) ends code segment start: MOV AX,DATA MOV DS,AX mov cx, 6 lea si, gio mov ah, 0 n1: mov al, [si] …
Rasty
  • 303
  • 3
  • 14
-1
votes
1 answer

intel reset vector and documentation pedantics. Bits vs bytes

An excerpt from intel development documentation volume 3 section 9 The first instruction that is fetched and executed following a hardware reset is located at physical address FFFFFFF0H. This address is 16 bytes below the processor’s uppermost…
marshal craft
  • 439
  • 5
  • 18
-1
votes
1 answer

Printing the hexadecimal value of assembly registers, moving 16 bit registers into 8 bit ones and other assembly questions

I'm writing a function to print each register in my 16-bit real mode assembly operating system. I've come across a few problems: 1 Moving a 16-bit register into an 8-bit one mov al, bx This gives me error: invalid combinations of opcodes and…
-1
votes
1 answer

Is this program fine?

I am new to assembly language and trying to learn it by means of code ,I found a piece of code which says it will convert binary to decimal and output as ascii on to screen .Below is the code org 100h push ax push cx push dx …
Amit Singh Tomar
  • 8,380
  • 27
  • 120
  • 199
-2
votes
2 answers

Real mode interrupt works if I use call, doesn't work(won't execute) if I use INT

I was trying to add a system call to my REAL MODE operating system, and it will work if I write this: call [21h*4] however it just doesn't work if I try to call it with int 0x21 Here's the code I used to setup the system call: mov word…
-2
votes
1 answer

32-bit registers in real mode and dereferencing

I'm writing some assembly for MBR (real mode). I know that in real mode you can't use the 32-bit registers, only the 16-bit ones. I wrote this code which relies on a print_char function. mov ecx, MSG write: mov al, [ecx] cmp al, 0x0 …
marmistrz
  • 5,974
  • 10
  • 42
  • 94
-5
votes
1 answer

what is the absolute address for data segment variable in assembly?

.data len dw 10 msg db "1234567890" .code .... Address for segments DS= 0ACA CS =0AC7 What is the absolute address for string msg? What I understand is effective address for msg is 21 in dec which 15H, then I do DS:0015 which is ACB5 but it's not…
Mostfa shma
  • 193
  • 1
  • 6
-5
votes
1 answer

Stopwatch program in 8086 assembly

I am writing a program to print 00 to 60 in 60 seconds delay! But somehow it is not working! Can you guys help? org 100h .model small .stack 100h .data a db 0 b db 0 .code main PROC mov cx,100 secnd: mov bl,a add bl,48 …
1 2 3
18
19