/[grub]/grub/stage2/asm.S
ViewVC logotype

Diff of /grub/stage2/asm.S

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.63 by okuji, Sun Oct 27 23:59:53 2002 UTC revision 1.64 by okuji, Thu Nov 28 07:40:37 2002 UTC
# Line 2128  ENTRY(console_gotoxy) Line 2128  ENTRY(console_gotoxy)
2128                    
2129  /*  /*
2130   * void console_cls (void)   * void console_cls (void)
2131   * BIOS call "INT 10H Function 0Fh" to get current video mode   * BIOS call "INT 10H Function 09h" to write character and attribute
2132   *      Call with       %ah = 0x0f   *      Call with       %ah = 0x09
2133   *      Returns         %al = (video mode)   *                      %al = (character)
2134   *                      %bh = (page number)   *                      %bh = (page number)
2135   * BIOS call "INT 10H Function 00h" to set the video mode (clears screen)   *                      %bl = (attribute)
2136   *      Call with       %ah = 0x00   *                      %cx = (number of times)
  *                      %al = (video mode)  
2137   */   */
2138    
2139    
# Line 2145  ENTRY(console_cls) Line 2144  ENTRY(console_cls)
2144          call    EXT_C(prot_to_real)          call    EXT_C(prot_to_real)
2145          .code16          .code16
2146    
2147          movb    $0xf, %ah          /* move the cursor to the beginning */
2148          int     $0x10                   /* Get Current Video mode */          movb    $0x02, %ah
2149          xorb    %ah, %ah          xorb    %bh, %bh
2150          int     $0x10                   /* Set Video mode (clears screen) */          xorw    %dx, %dx
2151            int     $0x10
2152    
2153            /* write spaces to the entire screen */
2154            movw    $0x0920, %ax
2155            movw    $0x07, %bx
2156            movw    $(80 * 25), %cx
2157            int     $0x10
2158    
2159            /* move back the cursor */
2160            movb    $0x02, %ah
2161            int     $0x10
2162    
2163          DATA32  call    EXT_C(real_to_prot)          DATA32  call    EXT_C(real_to_prot)
2164          .code32          .code32

Legend:
Removed from v.1.63  
changed lines
  Added in v.1.64

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26