Changeset 592 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu
- Timestamp:
- Jun 25, 2018, 10:29:27 PM (6 years ago)
- Location:
- trunk/Assembly_Library/Src/Menu
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
r589 r592 249 249 ALIGN JUMP_ALIGN 250 250 AppendFileFromDTAinDSSItoOffScreenBuffer: 251 call .FilterCurrentDirectory ; We never want "." 252 call .FilterUpDirectoryWhenInRoot ; No ".." when in root directory 251 cmp WORD [si+DTA.szFile], CURRENTDIR_CHARACTERS 252 je SHORT .Return ; We never want "." 253 test dl, dl 254 jnz SHORT .NotInRootDirectory 255 cmp WORD [si+DTA.szFile], UPDIR_CHARACTERS 256 je SHORT .Return ; No ".." when in root directory 257 .NotInRootDirectory: 253 258 inc cx ; Nothing filtered so increment files/directories 254 259 … … 262 267 pop si 263 268 pop bp 264 ret 265 266 ;-------------------------------------------------------------------- 267 ; .FilterCurrentDirectory 268 ; .FilterUpDirectoryWhenInRoot 269 ; Parameters: 270 ; DL: Zero if root directory selected 271 ; DS:SI: Ptr to DTA containing file information 272 ; Returns: 273 ; Nothing 274 ; Returns from AppendFileToBufferInESDIfromDtaInDSSI when filtering 275 ; Corrupts registers: 276 ; AX 277 ;-------------------------------------------------------------------- 278 ALIGN JUMP_ALIGN 279 .FilterCurrentDirectory: 280 cmp WORD [si+DTA.szFile], CURRENTDIR_CHARACTERS 281 je SHORT .DoFilter 282 ret 283 284 ALIGN JUMP_ALIGN 285 .FilterUpDirectoryWhenInRoot: 286 test dl, dl ; Set ZF if root directory selected 287 jnz SHORT .ReturnWithoutFiltering 288 cmp WORD [si+DTA.szFile], UPDIR_CHARACTERS 289 jne SHORT .ReturnWithoutFiltering 290 .DoFilter: 291 add sp, BYTE 2 ; Remove return address from stack 292 ALIGN JUMP_ALIGN, ret 293 .ReturnWithoutFiltering: 269 .Return: 294 270 ret 295 271 … … 473 449 ALIGN JUMP_ALIGN 474 450 GetInfoLinesToCXandDialogFlagsToAX: 475 xor ax, ax476 call GetDialogFlagsToAL477 jmp Bit_GetSetCountToCXfromAX451 ePUSH_T ax, Bit_GetSetCountToCXfromAX 452 xor ah, ah 453 ; Fall to GetDialogFlagsToAL 478 454 479 455 ;-------------------------------------------------------------------- … … 696 672 call .ChangeDriveToUserSelectionFromIoInDSSI 697 673 add sp, BYTE DRIVE_DIALOG_IO_size 674 .UserCancelledDriveChange: 698 675 ret 699 676 … … 729 706 jne SHORT .UserCancelledDriveChange 730 707 708 ; Install our Custom Critical Error Handler to catch "Drive Not Ready" errors. This handler only works on DOS 3.0+ systems 709 ; but that should be OK because only DOS 3.1+ will trigger it. Under older DOS versions drives are enumerated using 710 ; GET_DOS_DRIVE_PARAMETER_BLOCK_FOR_SPECIFIC_DRIVE which will access the drive so we know it is available at this point. 711 mov dx, DosCritical_CustomHandler 712 call DosCritical_InstallNewHandlerFromCSDX 713 714 ; Save the current drive on stack in case the selected drive is not ready and the user decides to cancel the change. 715 call Drive_GetDefaultToAL 716 xchg dx, ax 717 718 .RetryDrive: 719 push dx ; Save the previous current drive to stack 720 731 721 mov dl, [si+DRIVE_DIALOG_IO.bReturnDriveNumber] 732 722 call Drive_SetDefaultFromDL 723 724 ; Now we must try to force a media access to catch "Drive Not Ready". 725 push ds 726 push ss 727 pop ds 728 ePUSH_T ax, CURRENTDIR_CHARACTERS 729 mov cx, FLG_FILEATTR_DIRECTORY 730 mov dx, sp 731 mov ax, FIND_FIRST_MATCHING_FILE<<8 732 int DOS_INTERRUPT_21h 733 pop ax 734 pop ds 735 736 pop dx ; Restore the previous current drive from stack 737 738 xchg ah, [cs:bLastCriticalError] ; Zero bLastCriticalError and fetch error code to AH 739 cmp ah, ERR_DOS_DRIVE_NOT_READY 740 jne SHORT .DriveIsReady 741 742 mov bx, g_szDlgDriveNotReady 743 call Dialogs_DisplayYesNoResponseDialogWithTitleStringInBX 744 jz SHORT .RetryDrive 745 ; The user cancelled the drive change. Restore current drive to what it was previously. 746 call Drive_SetDefaultFromDL 747 jmp DosCritical_RestoreDosHandler 748 749 .DriveIsReady: 750 call DosCritical_RestoreDosHandler 733 751 jmp RefreshFilesToDisplay 734 .UserCancelledDriveChange:735 ret736 752 737 753 -
trunk/Assembly_Library/Src/Menu/MenuAttributes.asm
r526 r592 91 91 92 92 .rgcColorAttributes: 93 ; Classic (default theme) 93 94 istruc ATTRIBUTE_CHARS 94 95 at ATTRIBUTE_CHARS.cBordersAndBackground, db COLOR_ATTRIBUTE(COLOR_YELLOW, COLOR_BLUE) … … 100 101 at ATTRIBUTE_CHARS.cNormalTimeout, db COLOR_ATTRIBUTE(COLOR_GREEN, COLOR_BLUE) 101 102 iend 103 ColorTheme equ MenuAttribute_GetToAXfromTypeInSI.rgcColorAttributes 102 104 103 105 .rgcBlackAndWhiteAttributes: ; Only COLOR_WHITE, COLOR_BRIGHT_WHITE and COLOR_BLACK should be used -
trunk/Assembly_Library/Src/Menu/MenuBorders.asm
r583 r592 87 87 ; AX, BX, CX, DX, SI, DI 88 88 ;-------------------------------------------------------------------- 89 %ifndef EXCLUDE_FROM_X TIDE_UNIVERSAL_BIOS89 %ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG 90 90 ALIGN MENU_JUMP_ALIGN 91 91 MenuBorders_RefreshItemBorders: -
trunk/Assembly_Library/Src/Menu/MenuInit.asm
r532 r592 114 114 ; AX, BX, DX 115 115 ;-------------------------------------------------------------------- 116 %ifndef EXCLUDE_FROM_X TIDE_UNIVERSAL_BIOS116 %ifndef EXCLUDE_FROM_XUB 117 117 ALIGN MENU_JUMP_ALIGN 118 118 MenuInit_CloseMenuIfExitEventAllows: … … 138 138 139 139 140 %ifndef EXCLUDE_FROM_X TIDE_UNIVERSAL_BIOS140 %ifndef EXCLUDE_FROM_XUB 141 141 ;-------------------------------------------------------------------- 142 142 ; MenuInit_HighlightItemFromAX … … 168 168 mov ax, [bp+MENUINIT.wHighlightedItem] 169 169 ret 170 %endif ; EXCLUDE_FROM_X TIDE_UNIVERSAL_BIOS170 %endif ; EXCLUDE_FROM_XUB 171 171 172 172 … … 183 183 ; Nothing 184 184 ;-------------------------------------------------------------------- 185 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 185 %ifndef EXCLUDE_FROM_XUB 186 %ifndef EXCLUDE_FROM_XTIDECFG 186 187 ALIGN MENU_JUMP_ALIGN 187 188 MenuInit_SetTitleHeightFromAL: … … 193 194 mov [bp+MENUINIT.bInfoLines], al 194 195 ret 196 %endif ; EXCLUDE_FROM_XTIDECFG 195 197 196 198 ALIGN MENU_JUMP_ALIGN … … 198 200 mov [bp+MENUINIT.wItems], ax 199 201 ret 200 %endif 202 %endif ; EXCLUDE_FROM_XUB 201 203 202 204 … … 212 214 ; Nothing 213 215 ;-------------------------------------------------------------------- 214 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 216 %ifndef EXCLUDE_FROM_XUB 217 %ifndef EXCLUDE_FROM_XTIDECFG 215 218 ALIGN MENU_JUMP_ALIGN 216 219 MenuInit_SetUserDataFromDSSI: … … 218 221 mov [bp+MENU.dwUserData+2], ds 219 222 ret 223 %endif ; EXCLUDE_FROM_XTIDECFG 220 224 221 225 ALIGN MENU_JUMP_ALIGN … … 223 227 lds si, [bp+MENU.dwUserData] 224 228 ret 225 %endif 229 %endif ; EXCLUDE_FROM_XUB -
trunk/Assembly_Library/Src/Menu/MenuLocation.asm
r583 r592 55 55 ; Nothing 56 56 ;-------------------------------------------------------------------- 57 %ifndef EXCLUDE_FROM_X TIDE_UNIVERSAL_BIOS57 %ifndef EXCLUDE_FROM_XUB 58 58 MenuLocation_GetItemBordersTopLeftCoordinatesToAX: 59 59 %endif -
trunk/Assembly_Library/Src/Menu/MenuText.asm
r583 r592 32 32 ; AX, BX, CX, DX, SI, DI 33 33 ;-------------------------------------------------------------------- 34 %ifndef EXCLUDE_FROM_X TIDE_UNIVERSAL_BIOS34 %ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG 35 35 ALIGN MENU_JUMP_ALIGN 36 36 MenuText_ClearTitleArea:
Note:
See TracChangeset
for help on using the changeset viewer.