Changeset 51 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu


Ignore:
Timestamp:
Oct 11, 2010, 8:27:43 AM (14 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to Assembly Library:
File handle is now properly returned when opening file.
Added function for getting file size by using file handle.

Location:
trunk/Assembly_Library/Src/Menu
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm

    r50 r51  
    22; Project name  :   Assembly Library
    33; Created date  :   6.9.2010
    4 ; Last update   :   9.10.2010
     4; Last update   :   10.10.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Displays file dialog.
     
    523523ALIGN JUMP_ALIGN
    524524.ChangeToUpdir:
     525    push    cs
     526    pop     ds
    525527    mov     si, g_szUpdir
    526528    jmp     SHORT .ChangeDirectoryToDSSI
  • trunk/Assembly_Library/Src/Menu/Dialog/LineSplitter.asm

    r46 r51  
    148148ALIGN JUMP_ALIGN
    149149.RemoveEmptyLinesAtTheEndIfAnyExists:
    150     mov     al, [si-2]          ; Load character before NULL
    151     cmp     al, SOH
    152     je      SHORT .RemoveEmptyLineAtTheEndOfString
    153     cmp     al, LF
     150    cmp     BYTE [si-2], SOH    ; Character before NULL
    154151    je      SHORT .RemoveEmptyLineAtTheEndOfString
    155152    ret
     
    203200    mov     si, di              ; SI points to start of first line
    204201    mov     al, STX             ; Last control character to scan for
    205     inc     cx                  ; Increment CX to get length for first line
     202    inc     cx                  ; Increment CX to line count
    206203    cld
    207204ALIGN JUMP_ALIGN
    208205.LineScanLoop:
    209206    scasb                       ; cmp al, [es:di]. Increment DI
    210     jb      SHORT .LineScanLoop ; Non control character
    211 
    212     ; Our end of line characters or NULL character
     207    jb      SHORT .LineScanLoop ; Ignore all above STX
     208
     209    ; NULL, SOH or STX
    213210    dec     cx                  ; Decrement lines to scan through
    214211    jz      SHORT .WantedLineFound
     
    223220.EndOfString:
    224221    lahf                        ; Load FLAGS low to AH
    225     lea     cx, [di-1]          ; We don't want control character to be printed
    226     sub     cx, si              ; String length to CX
     222    lea     cx, [di-1]          ; CX = offset to NULL, SOH or STX
     223    sub     cx, si              ; CX = string length
    227224    sahf                        ; Store AH to FLAGS low
    228225    ret
  • trunk/Assembly_Library/Src/Menu/MenuCharOut.asm

    r48 r51  
    22; Project name  :   Assembly Library
    33; Created date  :   15.7.2010
    4 ; Last update   :   8.10.2010
     4; Last update   :   10.10.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Character out function for printing withing menu window.
     
    8080ALIGN JUMP_ALIGN
    8181MovePartialWordToNewTextLineAndPrintCharacterFromAX:
    82     cmp     al, ' '
    83     je      SHORT .MoveCursorInDItoBeginningOfNextLine
     82    cmp     al, ' '     ; Space or any control character
     83    jb      SHORT .MoveCursorInDItoBeginningOfNextLine
    8484    push    si
    8585    push    cx
Note: See TracChangeset for help on using the changeset viewer.