Changeset ca8f84f in mainline for kernel/arch/ia32/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/ia32/src/asm.S

    rbbfdf62 rca8f84f  
    428428 * Since the EGA can only display Extended ASCII (usually
    429429 * ISO Latin 1) characters, some of the Unicode characters
    430  * can be displayed in a wrong way. Only the newline character
    431  * is interpreted, all other characters (even unprintable) are
     430 * can be displayed in a wrong way. Only newline and backspace
     431 * are interpreted, all other characters (even unprintable) are
    432432 * printed verbatim.
    433433 *
     
    481481       
    482482        cmp $0x0a, %al
    483         jne early_putchar_print
     483        jne early_putchar_backspace
    484484       
    485485                /* Interpret newline */
     
    495495                subw %dx, %bx
    496496               
    497                 jmp early_putchar_newline
     497                jmp early_putchar_skip
     498       
     499        early_putchar_backspace:
     500       
     501                cmp $0x08, %al
     502                jne early_putchar_print
     503               
     504                /* Interpret backspace */
     505               
     506                cmp $0x0000, %bx
     507                je early_putchar_skip
     508               
     509                dec %bx
     510                jmp early_putchar_skip
    498511       
    499512        early_putchar_print:
     
    505518                inc %bx
    506519       
    507         early_putchar_newline:
     520        early_putchar_skip:
    508521       
    509522        /* Sanity check for the cursor on the last line */
Note: See TracChangeset for help on using the changeset viewer.