title: How to write to screen with video memory address 0xb8000 from real mode?
body: <p>I created simple code to load second sector from hard drive, and then write to whole screen, with spaces with red background. The problem is that always instead of spaces I got @ signs. This is the code:</p>
  
  <pre><code>org 0x7C00
  bits 16
  
  xor ax,ax
  mov ds,ax
  mov es,ax
  
  mov bx,0x8000
  cli
  mov ss,bx
  mov sp,ax
  sti
  
  cld
  clc
  
  xor ah,ah
  int 0x13
  mov bx,0x07E0
  mov es,bx
  xor bx,bx
  mov ah,0x2 ;function
  mov al,0x5 ;sectors to read
  mov ch,0x0 ;track
  mov cl,0x2 ;sector
  mov dh,0x0 ;head
  int 0x13
  ;jc error
  ;mov ah, [0x7E00]
  ;cmp ah,0x0
  ;je error
  jmp error
  cli
  hlt
  jmp 0x07E0:0x0000
  
  error:
      xor bx,bx
      mov ax,0xb800
      mov es,ax
      mov al,0x40 ;colour
      mov ah,' ' ;character
      .red:
          cmp bx,0x0FA0
          je .end
          mov WORD [es:bx], ax
          inc bx
          jmp .red
      .end:
          cli
          hlt
  
  times 0x1FE - ($ - $$) db 0x0
  db 0x55
  db 0xAA
  </code></pre>
  
  <p>according to this code screen should be filled with spaces but it is not.</p>