Changeset 52 in xtideuniversalbios for trunk/Assembly_Library/Src/Keyboard


Ignore:
Timestamp:
Oct 12, 2010, 6:51:07 PM (14 years ago)
Author:
Tomi Tilli
google:author:
aitotat
Message:

Changes to Assembly Library:
Completely rewritten line splitting (slower but no need to modify string).
Some changes to string processing functions.
Saved few bytes from CGA detection.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Keyboard/Keyboard.asm

    r48 r52  
    22; Project name  :   Assembly Library
    33; Created date  :   5.7.2010
    4 ; Last update   :   7.10.2010
     4; Last update   :   12.10.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Functions for managing keyboard.
     
    2626ALIGN JUMP_ALIGN
    2727Keyboard_ReadUserInputtedWordWhilePrinting:
    28     push    es
    29     push    di
     28    push    ds
     29    push    si
    3030    push    cx
    3131
    32     eENTER_STRUCT BUFFER_SIZE_FOR_WORD_INPUT
    33     call    Memory_CopySSBPtoESDI
    34 
    3532    mov     cx, BUFFER_SIZE_FOR_WORD_INPUT
     33    call    Memory_ReserveCXbytesFromStackToDSSI
     34
    3635    call    Char_GetFilterFunctionToDXforNumericBaseInBX
     36    call    Memory_ExchangeDSSIwithESDI
    3737    call    Keyboard_ReadUserInputtedStringToESDIWhilePrinting
    38     jz      SHORT .Return
    39 
    40     call    Memory_ExchangeDSSIwithESDI
     38    call    Memory_ExchangeDSSIwithESDI ; Does not modify FLAGS
     39    jz      SHORT .CancelledByUser
     40
    4141    call    String_ConvertWordToAXfromStringInDSSIwithBaseInBX
    42     call    Memory_ExchangeDSSIwithESDI
    43 .Return:
    44     eLEAVE_STRUCT BUFFER_SIZE_FOR_WORD_INPUT
     42.CancelledByUser:
     43    add     sp, BYTE BUFFER_SIZE_FOR_WORD_INPUT
    4544    test    cx, cx                  ; Set ZF if string length is zero
    4645    pop     cx
    47     pop     di
    48     pop     es
     46    pop     si
     47    pop     ds
    4948    ret
    5049
Note: See TracChangeset for help on using the changeset viewer.