/[pupa]/pupa/kern/i386/pc/startup.S
ViewVC logotype

Diff of /pupa/kern/i386/pc/startup.S

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

revision 1.8 by okuji, Fri Jan 31 03:26:56 2003 UTC revision 1.9 by okuji, Thu Sep 25 20:15:52 2003 UTC
# Line 1090  xsmap: Line 1090  xsmap:
1090    
1091                    
1092  /*  /*
1093   * void pupa_console_putchar (int c)   * void pupa_console_real_putchar (int c)
1094   *   *
1095   * Put the character C on the console. Because GRUB wants to write a   * Put the character C on the console. Because GRUB wants to write a
1096   * character with an attribute, this implementation is a bit tricky.   * character with an attribute, this implementation is a bit tricky.
# Line 1103  xsmap: Line 1103  xsmap:
1103   * get the height of the screen, and the TELETYPE OUPUT BIOS call doesn't   * get the height of the screen, and the TELETYPE OUPUT BIOS call doesn't
1104   * support setting a background attribute.   * support setting a background attribute.
1105   */   */
1106  FUNCTION(pupa_console_putchar)  FUNCTION(pupa_console_real_putchar)
1107          movl    %eax, %edx          movl    %eax, %edx
1108          pusha          pusha
1109          movb    EXT_C(pupa_console_cur_color), %bl          movb    EXT_C(pupa_console_cur_color), %bl
# Line 1514  FUNCTION(pupa_currticks) Line 1514  FUNCTION(pupa_currticks)
1514    
1515          popl    %ebp          popl    %ebp
1516          ret          ret
1517    
1518    
1519    /*
1520     * unsigned char pupa_vga_set_mode (unsigned char mode)
1521     */
1522    FUNCTION(pupa_vga_set_mode)
1523            pushl   %ebp
1524            pushl   %ebx
1525            movl    %eax, %ecx
1526    
1527            call    prot_to_real
1528            .code16
1529            /* get current mode */
1530            xorw    %bx, %bx
1531            movb    $0x0f, %ah
1532            int     $0x10
1533            movb    %al, %dl
1534    
1535            /* set the new mode */
1536            movb    %cl, %al
1537            xorb    %ah, %ah
1538            int     $0x10
1539    
1540            DATA32  call    real_to_prot
1541            .code32
1542    
1543            movb    %dl, %al
1544            popl    %ebx
1545            popl    %ebp
1546            ret
1547    
1548    
1549    /*
1550     * unsigned char *pupa_vga_get_font (void)
1551     */
1552    FUNCTION(pupa_vga_get_font)
1553            pushl   %ebp
1554            pushl   %ebx
1555    
1556            call    prot_to_real
1557            .code16
1558            movw    $0x1130, %ax
1559            movb    $0x06, %bh
1560            int     $0x10
1561            movw    %es, %bx
1562            movw    %bp, %dx
1563            DATA32  call    real_to_prot
1564            .code32
1565    
1566            movzwl  %bx, %ecx
1567            shll    $4, %ecx
1568            movw    %dx, %ax
1569            addl    %ecx, %eax
1570    
1571            popl    %ebx
1572            popl    %ebp
1573            ret

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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