Changeset 58 in xtideuniversalbios for trunk/Assembly_Library/Src


Ignore:
Timestamp:
Nov 18, 2010, 2:42:28 PM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to Assembly Library:

  • Exiting menu with ESC can now be canceled.
Location:
trunk/Assembly_Library/Src
Files:
11 edited

Legend:

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

    r52 r58  
    136136ALIGN WORD_ALIGN
    137137.rgfnSelectionHandler:
    138     dw      .ExitMenu
     138    dw      .ExitMenuByItem
    139139    dw      .ToggleTitle
    140140    dw      .ToggleInfo
     
    148148
    149149ALIGN JUMP_ALIGN
    150 .ExitMenu:
     150.ExitMenuByItem:
    151151    CALL_MENU_LIBRARY Close
     152.ExitMenuByMenuLibrary:
    152153    stc
    153154    ret
     
    317318ALIGN WORD_ALIGN
    318319.rgfnMenuEvents:
    319     dw      .InitializeMenu     ; .InitializeMenuinitToDSSI
    320     dw      .NotHandled         ; .ExitMenu
    321     dw      .NotHandled         ; .IdleProcessing
    322     dw      .NotHandled         ; .ItemHighlightedFromCX
    323     dw      .ItemSelectedFromCX ; .ItemSelectedFromCX
    324     dw      .NotHandled         ; .KeyStrokeInDX
    325     dw      .RefreshTitle       ; .RefreshTitle
    326     dw      .RefreshInformation ; .RefreshInformation
    327     dw      .RefreshItemFromCX  ; .RefreshItemFromCX
     320    dw      .InitializeMenu         ; .InitializeMenuinitToDSSI
     321    dw      .ExitMenuByMenuLibrary  ; .ExitMenu
     322    dw      .NotHandled             ; .IdleProcessing
     323    dw      .NotHandled             ; .ItemHighlightedFromCX
     324    dw      .ItemSelectedFromCX     ; .ItemSelectedFromCX
     325    dw      .NotHandled             ; .KeyStrokeInDX
     326    dw      .RefreshTitle           ; .RefreshTitle
     327    dw      .RefreshInformation     ; .RefreshInformation
     328    dw      .RefreshItemFromCX      ; .RefreshItemFromCX
    328329
    329330.rgszItems:
  • trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm

    r52 r58  
    22; Project name  :   Assembly Library
    33; Created date  :   6.8.2010
    4 ; Last update   :   12.10.2010
     4; Last update   :   18.11.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Common functions for many dialogs.
     
    6363;--------------------------------------------------------------------
    6464; Dialog_EventAnyThatClosesDialog
     65; Dialog_EventExitMenu
    6566;   Parameters:
    6667;       SS:BP:  Ptr to DIALOG
     
    7374Dialog_EventAnyThatClosesDialog:
    7475    call    MenuInit_CloseMenuWindow
     76ALIGN JUMP_ALIGN
     77Dialog_EventExitMenu:
    7578    stc
    7679    ret
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogDrive.asm

    r54 r58  
    22; Project name  :   Assembly Library
    33; Created date  :   22.10.2010
    4 ; Last update   :   23.10.2010
     4; Last update   :   18.11.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Displays drive dialog.
     
    9191istruc MENUEVENT
    9292    at  MENUEVENT.InitializeMenuinitFromDSSI,   dw  .InitializeMenuinitFromDSSI
    93     at  MENUEVENT.ExitMenu,                     dw  Dialog_EventNotHandled
     93    at  MENUEVENT.ExitMenu,                     dw  Dialog_EventExitMenu
    9494    at  MENUEVENT.IdleProcessing,               dw  Dialog_EventNotHandled
    9595    at  MENUEVENT.ItemHighlightedFromCX,        dw  Dialog_EventNotHandled
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm

    r54 r58  
    22; Project name  :   Assembly Library
    33; Created date  :   6.9.2010
    4 ; Last update   :   24.10.2010
     4; Last update   :   18.11.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Displays file dialog.
     
    101101istruc MENUEVENT
    102102    at  MENUEVENT.InitializeMenuinitFromDSSI,   dw  InitializeMenuinitFromSSBP
    103     at  MENUEVENT.ExitMenu,                     dw  Dialog_EventNotHandled
     103    at  MENUEVENT.ExitMenu,                     dw  Dialog_EventExitMenu
    104104    at  MENUEVENT.IdleProcessing,               dw  Dialog_EventNotHandled
    105105    at  MENUEVENT.ItemHighlightedFromCX,        dw  Dialog_EventNotHandled
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogMessage.asm

    r52 r58  
    22; Project name  :   Assembly Library
    33; Created date  :   6.8.2010
    4 ; Last update   :   12.10.2010
     4; Last update   :   18.11.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Displays message dialog.
     
    5959istruc MENUEVENT
    6060    at  MENUEVENT.InitializeMenuinitFromDSSI,   dw  .InitializeMenuinitFromDSSI
    61     at  MENUEVENT.ExitMenu,                     dw  Dialog_EventNotHandled
     61    at  MENUEVENT.ExitMenu,                     dw  Dialog_EventExitMenu
    6262    at  MENUEVENT.IdleProcessing,               dw  Dialog_EventNotHandled
    6363    at  MENUEVENT.ItemHighlightedFromCX,        dw  Dialog_EventNotHandled
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm

    r52 r58  
    22; Project name  :   Assembly Library
    33; Created date  :   15.8.2010
    4 ; Last update   :   12.10.2010
     4; Last update   :   18.11.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Displays progress bar dialog and starts progress task.
     
    120120istruc MENUEVENT
    121121    at  MENUEVENT.InitializeMenuinitFromDSSI,   dw  .InitializeMenuinitFromDSSI
    122     at  MENUEVENT.ExitMenu,                     dw  Dialog_EventNotHandled
     122    at  MENUEVENT.ExitMenu,                     dw  Dialog_EventExitMenu
    123123    at  MENUEVENT.IdleProcessing,               dw  .IdleProcessing
    124124    at  MENUEVENT.ItemHighlightedFromCX,        dw  Dialog_EventNotHandled
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogSelection.asm

    r52 r58  
    22; Project name  :   Assembly Library
    33; Created date  :   13.8.2010
    4 ; Last update   :   12.10.2010
     4; Last update   :   18.11.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Displays selection dialog.
     
    5151istruc MENUEVENT
    5252    at  MENUEVENT.InitializeMenuinitFromDSSI,   dw  .InitializeMenuinitFromDSSI
    53     at  MENUEVENT.ExitMenu,                     dw  Dialog_EventNotHandled
     53    at  MENUEVENT.ExitMenu,                     dw  Dialog_EventExitMenu
    5454    at  MENUEVENT.IdleProcessing,               dw  Dialog_EventNotHandled
    5555    at  MENUEVENT.ItemHighlightedFromCX,        dw  Dialog_EventNotHandled
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogString.asm

    r52 r58  
    22; Project name  :   Assembly Library
    33; Created date  :   12.8.2010
    4 ; Last update   :   12.10.2010
     4; Last update   :   18.11.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Displays word input dialog.
     
    6262istruc MENUEVENT
    6363    at  MENUEVENT.InitializeMenuinitFromDSSI,   dw  .InitializeMenuinitFromDSSI
    64     at  MENUEVENT.ExitMenu,                     dw  Dialog_EventNotHandled
     64    at  MENUEVENT.ExitMenu,                     dw  Dialog_EventExitMenu
    6565    at  MENUEVENT.IdleProcessing,               dw  .IdleProcessing
    6666    at  MENUEVENT.ItemHighlightedFromCX,        dw  Dialog_EventNotHandled
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogWord.asm

    r52 r58  
    22; Project name  :   Assembly Library
    33; Created date  :   10.8.2010
    4 ; Last update   :   12.10.2010
     4; Last update   :   18.11.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Displays word input dialog.
     
    6262istruc MENUEVENT
    6363    at  MENUEVENT.InitializeMenuinitFromDSSI,   dw  .InitializeMenuinitFromDSSI
    64     at  MENUEVENT.ExitMenu,                     dw  Dialog_EventNotHandled
     64    at  MENUEVENT.ExitMenu,                     dw  Dialog_EventExitMenu
    6565    at  MENUEVENT.IdleProcessing,               dw  .IdleProcessing
    6666    at  MENUEVENT.ItemHighlightedFromCX,        dw  Dialog_EventNotHandled
  • trunk/Assembly_Library/Src/Menu/MenuEvent.asm

    r52 r58  
    3434;       SS:BP:  Ptr to MENU
    3535;   Returns:
    36 ;       CF:     Set if event processed
    37 ;               Cleared if event not processed
     36;       CF:     Set to exit from menu
     37;               Cleared to cancel exit
    3838;   Corrupts registers:
    3939;       AX, BX, DX
  • trunk/Assembly_Library/Src/Menu/MenuLoop.asm

    r52 r58  
    22; Project name  :   Assembly Library
    33; Created date  :   22.7.2010
    4 ; Last update   :   12.10.2010
     4; Last update   :   18.10.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Menu loop for waiting keystrokes.
     
    2020ALIGN JUMP_ALIGN
    2121MenuLoop_Enter:
     22    call    KeystrokeProcessing
     23    call    TimeoutProcessing
     24    call    IdleTimeProcessing
    2225    test    BYTE [bp+MENU.bFlags], FLG_MENU_EXIT
    23     jnz     SHORT .ExitMenu
    24     call    IdleTimeProcessing
    25 
    26     call    MenuTime_UpdateSelectionTimeout
    27     mov     ah, MENU_KEY_ENTER          ; Fake ENTER to select item
    28     jc      SHORT .ProcessFakedKeystrokeCausedByTimeout
    29 
    30     call    Keyboard_GetKeystrokeToAX
    3126    jz      SHORT MenuLoop_Enter
    32 .ProcessFakedKeystrokeCausedByTimeout:
    33     call    ProcessKeystrokeFromAX
    34     jmp     SHORT MenuLoop_Enter
    35 
    36 ALIGN JUMP_ALIGN
    37 .ExitMenu:
    38     jmp     MenuEvent_ExitMenu
     27    ret
    3928
    4029
    4130;--------------------------------------------------------------------
    4231; IdleTimeProcessing
     32; TimeoutProcessing
     33; KeystrokeProcessing
    4334;   Parameters
    4435;       SS:BP:  Ptr to MENU
     
    4637;       Nothing
    4738;   Corrupts registers:
    48 ;       AX, BX, DX
     39;       All, except SS:BP
    4940;--------------------------------------------------------------------
    5041ALIGN JUMP_ALIGN
    5142IdleTimeProcessing:
    52     jmp     MenuEvent_IdleProcessing    ; User idle processing
     43    jmp     MenuEvent_IdleProcessing        ; User idle processing
     44
     45ALIGN JUMP_ALIGN
     46TimeoutProcessing:
     47    call    MenuTime_UpdateSelectionTimeout
     48    mov     ah, MENU_KEY_ENTER              ; Fake ENTER to select item
     49    jc      SHORT ProcessKeystrokeFromAX    ; Process faked ENTER
     50    ret
     51
     52ALIGN JUMP_ALIGN
     53KeystrokeProcessing:
     54    call    Keyboard_GetKeystrokeToAX
     55    jnz     SHORT ProcessKeystrokeFromAX
     56    ret
    5357
    5458
     
    101105ALIGN JUMP_ALIGN
    102106.LeaveMenuWithoutSelectingItem:
     107    call    MenuEvent_ExitMenu
     108    jnc     SHORT .CancelMenuExit
    103109    call    MenuInit_CloseMenuWindow
    104110    mov     WORD [bp+MENUINIT.wHighlightedItem], NO_ITEM_HIGHLIGHTED
     111.CancelMenuExit:
    105112    stc
    106113    ret
Note: See TracChangeset for help on using the changeset viewer.