Changeset ca8f84f in mainline for kernel/arch/amd64/src/asm.S


Ignore:
Timestamp:
2010-07-02T19:59:57Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fef504a
Parents:
bbfdf62
Message:

it might be handy for early_putchar to also interpret backspace
(i.e. for printing numeric updates and avoiding a time-consuming scrolling)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/asm.S

    rbbfdf62 rca8f84f  
    347347 * Since the EGA can only display Extended ASCII (usually
    348348 * ISO Latin 1) characters, some of the Unicode characters
    349  * can be displayed in a wrong way. Only the newline character
    350  * is interpreted, all other characters (even unprintable) are
     349 * can be displayed in a wrong way. Only newline and backspace
     350 * are interpreted, all other characters (even unprintable) are
    351351 * printed verbatim.
    352352 *
     
    399399       
    400400        cmp $0x0a, %al
    401         jne early_putchar_print
     401        jne early_putchar_backspace
    402402       
    403403                /* Interpret newline */
     
    413413                subw %dx, %bx
    414414               
    415                 jmp early_putchar_newline
     415                jmp early_putchar_skip
     416       
     417        early_putchar_backspace:
     418       
     419                cmp $0x08, %al
     420                jne early_putchar_print
     421               
     422                /* Interpret backspace */
     423               
     424                cmp $0x0000, %bx
     425                je early_putchar_skip
     426               
     427                dec %bx
     428                jmp early_putchar_skip
    416429       
    417430        early_putchar_print:
     
    423436                inc %bx
    424437       
    425         early_putchar_newline:
     438        early_putchar_skip:
    426439       
    427440        /* Sanity check for the cursor on the last line */
Note: See TracChangeset for help on using the changeset viewer.