title: Real Mode Assembly: Print Char to Screen without INT Instruction on Boot
body: <p>The following site <a href="http://susam.in/articles/boot-sector-code/" rel="noreferrer">"Writing Boot Sector Code"</a> provides a sample of code that prints 'A' to the screen when the system boots. From what I have been reading don't you have to use INT opcode to get BIOS to do certain things? How does the code below, from the site referenced above work without using interrupts? What portion of code actually tells the hardware to print 'A' to the screen?</p>
  
  <p>Code in question:</p>
  
  <pre><code>.code16
  .section .text
  .globl _start
  _start:
    mov $0xb800, %ax
    mov %ax, %ds
    movb $'A', 0
    movb $0x1e, 1
  idle:
    jmp idle 
  </code></pre>
  
  <hr>
  
  <p><strong>APPENDING TO ORIGINAL QUESTION</strong></p>
  
  <p>If I use the following code does the BIOS call write to the text buffer for me? The buffer starting at address 0xb800?</p>
  
  <pre><code>   # Author: Matthew Hoggan
     # Date Created: Tuesday, Mar 6, 2012
     .code16                        # Tell assembler to work in 16 bit mode (directive)
     .section .text
     .globl _start                  # Help linker find start of program
     _start:
         movb $0x0e,     %ah        # Function to print a character to the screen                 
         movb $0x00,     %bh        # Indicate the page number
         movb $0x07,     %bl        # Text attribute
         mov  $'A',      %al        # Move data into low nibble                   
         int  $0x10                 # Video Service Request to Bios                             
     _hang:                         
         jmp  _hang                 
         .end   
  </code></pre>