Changeset 625 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu/Dialog
- Timestamp:
- Feb 19, 2023, 9:26:52 PM (21 months ago)
- Location:
- trunk/Assembly_Library/Src/Menu/Dialog
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm
r593 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 95 95 96 96 ;-------------------------------------------------------------------- 97 ; Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero 98 ; Parameters: 99 ; DS:SI: Ptr to MENUINIT struct to initialize 100 ; SS:BP: Ptr to DIALOG 101 ; Returns: 102 ; DS:SI: Ptr to initialized MENUINIT struct 103 ; CF: Set since event processed 104 ;-------------------------------------------------------------------- 105 ALIGN JUMP_ALIGN 106 Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero: 107 xor ax, ax 108 ; Fall to Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX 109 110 ;-------------------------------------------------------------------- 97 111 ; Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX 98 112 ; Parameters: … … 104 118 ; CF: Set since event processed 105 119 ;-------------------------------------------------------------------- 106 ALIGN JUMP_ALIGN107 120 Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX: 108 121 les di, [bp+DIALOG.fpDialogIO] -
trunk/Assembly_Library/Src/Menu/Dialog/DialogDrive.asm
r596 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 56 56 ALIGN JUMP_ALIGN 57 57 .InitializeMenuinitFromDSSI: 58 xor ax, ax 59 call Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX 58 call Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero 60 59 call Drive_GetFlagsForAvailableDrivesToDXAX 61 60 mov [bp+MENU.dwUserData], ax -
trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
r602 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 121 121 .rgszInfoStringLookup: 122 122 dw g_szChangeDrive 123 %ifndef EXCLUDE_FROM_XTIDECFG 123 124 dw g_szSelectDirectory 124 125 dw g_szCreateNew 126 %endif 125 127 126 128 .rgfnEventHandlers: … … 156 158 call LoadItemStringBufferToESDI 157 159 call SortDirectoryContentsStringFromESDIwithCountInCX 158 call RemoveLastLFandTerminateESDIwithNull159 160 xor ax, ax 161 mov [es:di-1], al ; Terminate with NULL 160 162 call Registers_CopySSBPtoDSSI 161 xor ax, ax162 163 call Dialog_EventInitializeMenuinitFromDSSIwithHighlightedItemInAX 163 164 call GetInfoLinesToCXandDialogFlagsToAX … … 436 437 437 438 ;-------------------------------------------------------------------- 438 ; RemoveLastLFandTerminateESDIwithNull439 ; Parameters:440 ; ES:DI: Ptr to end of buffer to terminate441 ; Returns:442 ; Nothing443 ; Corrupts registers:444 ; AX445 ;--------------------------------------------------------------------446 ALIGN JUMP_ALIGN447 RemoveLastLFandTerminateESDIwithNull:448 dec di449 xor ax, ax450 stosb451 ret452 453 454 ;--------------------------------------------------------------------455 439 ; GetInfoLinesToCXandDialogFlagsToAX 456 440 ; Parameters: … … 586 570 HandleFunctionKeyFromAH: 587 571 call GetDialogFlagsToAL 572 %ifndef EXCLUDE_FROM_XTIDECFG 588 573 cmp ah, KEY_FILEDIALOG_NEW_FILE_OR_DIR 589 574 je SHORT HandleFunctionKeyForCreatingNewFileOrDirectory 590 575 cmp ah, KEY_FILEDIALOG_SELECT_DIRECTORY 591 576 je SHORT HandleFunctionKeyForSelectingDirectoryInsteadOfFile 577 %endif 592 578 cmp ah, KEY_FILEDIALOG_CHANGE_DRIVE 593 579 je SHORT HandleFunctionKeyForDriveChange … … 607 593 ; All, except BP 608 594 ;-------------------------------------------------------------------- 595 %ifndef EXCLUDE_FROM_XTIDECFG 609 596 ALIGN JUMP_ALIGN 610 597 HandleFunctionKeyForCreatingNewFileOrDirectory: … … 649 636 jz SHORT ReturnWithoutHandlingKeystroke 650 637 ; Fall to CloseFileDialogAfterSuccessfulSelection 638 %endif ; EXCLUDE_FROM_XTIDECFG 651 639 652 640 ;-------------------------------------------------------------------- -
trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm
r596 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 89 89 ProgressEventHandler: 90 90 jmp [cs:bx+.rgfnEventHandlers] 91 92 93 ALIGN JUMP_ALIGN94 .InitializeMenuinitFromDSSI:95 mov ax, NO_ITEM_HIGHLIGHTED96 call Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX97 lds si, [bp+DIALOG.fpDialogIO]98 call TimerTicks_ReadFromBdaToAX99 mov [si+PROGRESS_DIALOG_IO.wStartTimeTicks], ax100 101 ; 0 = 65536 but it needs to be adjusted to 65535 to prevent division by zero102 cmp WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue], BYTE 0103 jne SHORT CalculateProgressNeededBeforeUpdatingCharacter104 dec WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue]105 jmp SHORT CalculateProgressNeededBeforeUpdatingCharacter106 91 107 92 … … 153 138 154 139 140 ALIGN JUMP_ALIGN 141 .InitializeMenuinitFromDSSI: 142 mov ax, NO_ITEM_HIGHLIGHTED 143 call Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX 144 lds si, [bp+DIALOG.fpDialogIO] 145 call TimerTicks_ReadFromBdaToAX 146 mov [si+PROGRESS_DIALOG_IO.wStartTimeTicks], ax 147 148 ; 0 = 65536 but it needs to be adjusted to 65535 to prevent division by zero 149 cmp WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue], BYTE 0 150 jne SHORT CalculateProgressNeededBeforeUpdatingCharacter 151 dec WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue] 152 ; Fall to CalculateProgressNeededBeforeUpdatingCharacter 153 155 154 ;-------------------------------------------------------------------- 156 155 ; CalculateProgressNeededBeforeUpdatingCharacter … … 163 162 ; AX, BX, DX, SI, DS 164 163 ;-------------------------------------------------------------------- 165 ALIGN JUMP_ALIGN166 164 CalculateProgressNeededBeforeUpdatingCharacter: 167 165 call MenuLocation_GetMaxTextLineLengthToAX … … 216 214 ALIGN JUMP_ALIGN 217 215 .RepeatProgressCharacterCXtimesFromAL: 218 jcxz NothingToRepeat219 216 JMP_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX 220 217 … … 233 230 mov bx, [si+PROGRESS_DIALOG_IO.wMaxProgressValue] 234 231 sub bx, [si+PROGRESS_DIALOG_IO.wMinProgressValue] 235 NothingToRepeat:236 232 ret 237 233 -
trunk/Assembly_Library/Src/Menu/Dialog/DialogString.asm
r596 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 55 55 56 56 ALIGN JUMP_ALIGN 57 .InitializeMenuinitFromDSSI:58 xor ax, ax59 jmp Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX60 61 62 ALIGN JUMP_ALIGN63 57 .IdleProcessing: 64 58 xor cx, cx ; Item 0 is used as input line … … 73 67 .rgfnEventHandlers: 74 68 istruc MENUEVENT 75 at MENUEVENT.InitializeMenuinitFromDSSI, dw .InitializeMenuinitFromDSSI69 at MENUEVENT.InitializeMenuinitFromDSSI, dw Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero 76 70 at MENUEVENT.ExitMenu, dw Dialog_EventExitMenu 77 71 at MENUEVENT.IdleProcessing, dw .IdleProcessing -
trunk/Assembly_Library/Src/Menu/Dialog/DialogWord.asm
r596 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 56 56 57 57 ALIGN JUMP_ALIGN 58 .InitializeMenuinitFromDSSI:59 xor ax, ax60 jmp Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX61 62 63 ALIGN JUMP_ALIGN64 58 .IdleProcessing: 65 59 xor cx, cx ; Item 0 is used as input line … … 74 68 .rgfnEventHandlers: 75 69 istruc MENUEVENT 76 at MENUEVENT.InitializeMenuinitFromDSSI, dw .InitializeMenuinitFromDSSI70 at MENUEVENT.InitializeMenuinitFromDSSI, dw Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero 77 71 at MENUEVENT.ExitMenu, dw Dialog_EventExitMenu 78 72 at MENUEVENT.IdleProcessing, dw .IdleProcessing -
trunk/Assembly_Library/Src/Menu/Dialog/ItemLineSplitter.asm
r526 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 51 51 call StringProcess_DSSIwithFunctionInDX 52 52 53 lea ax, [bx+1] 53 xchg bx, ax 54 inc ax 54 55 eLEAVE_STRUCT ITEM_LINE_SPLITTER_size 55 56 pop di … … 119 120 ProcessCharacterFromStringToSplit: 120 121 cmp al, ' ' 121 ja SHORT .CheckLineLength 122 mov di, si ; DS:DI now points start of new word 123 je SHORT .CheckLineLength 122 jbe SHORT .ControlCharacterOrSpace 124 123 125 cmp al, LF126 je SHORT .ChangeToNextLine127 cmp al, CR128 jne SHORT .IgnoreUnsupportedControlCharacter129 xor cx, cx ; Carriage return so reset line length so far130 131 ALIGN JUMP_ALIGN132 124 .CheckLineLength: 133 125 cmp [bp+ITEM_LINE_SPLITTER.wMaxTextLineLength], cx 134 126 jb SHORT .ChangeToNextLine 135 ret ; With CF cleared127 ret ; With CF cleared 136 128 137 129 ALIGN JUMP_ALIGN … … 140 132 je SHORT .WantedLineFound 141 133 142 inc bx ; Increment line 143 xor cx, cx ; Zero character counter (and clear CF) 144 mov si, di ; Start from complete word 134 inc bx ; Increment line 135 mov si, di ; Start from complete word 145 136 mov [bp+ITEM_LINE_SPLITTER.wStartOfLine], di 137 .CarriageReturn: 138 xor cx, cx ; Zero character counter (and clear CF) 146 139 ret 147 140 148 141 ALIGN JUMP_ALIGN 149 .IgnoreUnsupportedControlCharacter: 142 .ControlCharacterOrSpace: 143 mov di, si ; DS:DI now points start of new word 144 je SHORT .CheckLineLength ; Jump if space 145 cmp al, LF 146 je SHORT .ChangeToNextLine 147 cmp al, CR 148 je SHORT .CarriageReturn ; Reset line length 149 ; Unsupported control character - ignore it 150 150 dec cx 151 151 clc -
trunk/Assembly_Library/Src/Menu/Dialog/StringsForDialogs.asm
r526 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 19 19 20 20 ; Strings for Progress Dialog 21 g_szTimeElapsed: db "Time elapsed :",NULL22 g_szTimeLeft: db "Estimated left:",NULL23 g_szTimeFormat: db " %2-u min %2-u sec",LF,CR,NULL21 g_szTimeElapsed: db "Time elapsed :",NULL 22 g_szTimeLeft: db "Estimated left:",NULL 23 g_szTimeFormat: db " %2-u min %2-u sec",LF,CR,NULL 24 24 25 25 ; Strings for Drive Dialog 26 g_szDriveFormat: db "%c:",NULL26 g_szDriveFormat: db "%c:",NULL 27 27 28 28 ; Strings for File Dialog 29 g_szChangeDrive: db "F2 Change Drive",LF,CR,NULL 30 g_szSelectDirectory: db "F3 Select Current Directory",LF,CR,NULL 31 g_szCreateNew: db "F4 Input new File or Directory",NULL 29 g_szChangeDrive: db "F2 Change Drive",NULL 30 %ifndef EXCLUDE_FROM_XTIDECFG 31 g_szSelectDirectory: db "F3 Select Current Directory",NULL 32 g_szCreateNew: db "F4 Input new File or Directory",NULL 33 %endif 32 34 33 g_szSelectNewDrive: 34 db "Select new drive.",NULL 35 g_szLoadingPleaseWait: 36 db "Loading. Please wait...",NULL 35 g_szSelectNewDrive: db "Select new drive.",NULL 36 g_szLoadingPleaseWait: db "Loading. Please wait...",NULL 37 37 38 g_szEnterNewFileOrDirectory: 39 db "Enter name for new file or directory.",NULL 38 %ifndef EXCLUDE_FROM_XTIDECFG 39 g_szEnterNewFileOrDirectory: db "Enter name for new file or directory.",NULL 40 %endif 40 41 41 42 FILE_STRING_LENGTH EQU (24+1) ; +1 = LF in directory contents string 42 g_szFileFormat: 43 db "%16S%4-u %c%cB",LF,NULL 44 g_szDirectoryFormat: 45 db "%16S%s-DIR",LF,NULL 46 g_szSub: 47 db ANGLE_QUOTE_RIGHT,"SUB",NULL 48 g_szUp: 49 db ANGLE_QUOTE_LEFT," UP",NULL 43 g_szFileFormat: db "%16S%4-u %c%cB",LF,NULL 44 g_szDirectoryFormat: db "%16S%s-DIR",LF,NULL 45 g_szSub: db ANGLE_QUOTE_RIGHT,"SUB",NULL 46 g_szUp: db ANGLE_QUOTE_LEFT," UP",NULL 50 47 51 48 g_szSingleItem: ; Used by Dialog.asm for single item line 52 g_szUpdir: 53 db ".." 54 g_szNull: 55 db NULL 49 g_szUpdir: db ".." 50 g_szNull: db NULL
Note:
See TracChangeset
for help on using the changeset viewer.