Changeset 593 in xtideuniversalbios for trunk/Assembly_Library/Src
- Timestamp:
- Jun 30, 2018, 8:27:04 AM (6 years ago)
- Location:
- trunk/Assembly_Library/Src
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/AssemblyLibrary.asm
r592 r593 5 5 ; 6 6 ; XTIDE Universal BIOS and Associated Tools 7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-201 3by XTIDE Universal BIOS Team.7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2018 by XTIDE Universal BIOS Team. 8 8 ; 9 9 ; This program is free software; you can redistribute it and/or modify … … 45 45 %include "Drive.asm" 46 46 %include "FileIO.asm" 47 %include "InterruptHandlers.asm" 47 48 %endif 48 49 … … 134 135 %include "Sort.asm" 135 136 %endif 137 138 %ifdef INCLUDE_CMOS_LIBRARY 139 %include "CMOS.asm" 140 %endif 136 141 %endif 137 142 -
trunk/Assembly_Library/Src/Display/CgaSnow.asm
r592 r593 37 37 38 38 ; All standard CGA modes use 25 rows but only EGA and later store it to BDA. 39 cmp BYTE [BDA.bVidRows], 2 5 ; *FIXME* Shouldn't this be 24 (rows - 1)?39 cmp BYTE [BDA.bVidRows], 24 ; BDA contains rows - 1 40 40 jae SHORT .CgaNotFound 41 41 ret -
trunk/Assembly_Library/Src/File/DosCritical.asm
r592 r593 45 45 push ds 46 46 47 push cs 48 pop ds 49 mov ax, (SET_INTERRUPT_VECTOR<<8) | DOS_CRITICAL_ERROR_HANDLER_24h 50 int DOS_INTERRUPT_21h 47 mov al, DOS_CRITICAL_ERROR_HANDLER_24h 48 call HookInterruptVectorInALwithHandlerInCSDX 51 49 52 50 pop ds -
trunk/Assembly_Library/Src/File/Drive.asm
r592 r593 131 131 .IsValidDriveNumberInDL: 132 132 push ds 133 push ax 134 cmp dl, 1 135 jbe SHORT .FloppyDrive 136 137 .MessageSuppressedByInt2FhHandler: 138 .MoreThanOneFloppyDrive: 139 .NoFloppyDrive: 133 140 push bx 134 push ax135 141 136 142 inc dx ; Default drive is 00h and first drive is 01h … … 152 158 test al, al 153 159 160 pop bx 161 .ReturnFromFloppyDriveFiltering: 154 162 pop ax 155 pop bx156 163 pop ds 157 164 ret 165 166 .FloppyDrive: 167 ; On single-floppy-drive systems, both A: and B: will point to the same physical drive. The problem is that DOS will print a message telling the user 168 ; to "insert a disk and press any key to continue" when swapping from one logical drive to the other. To avoid this mess we hook interrupt 2Fh/AX=4A00h 169 ; to signal to DOS that we will handle this ourselves. However, this only works on DOS 5+ so on older DOS versions we instead try to filter out 170 ; the "other" logical drive (the one that isn't the current drive) during drive enumeration so the user can't select the "phantom" drive to begin with. 171 ; This will have the somewhat strange effect of having a drive B: but no drive A: if B: happens to be the current logical floppy drive. 172 173 cmp BYTE [bDosVersionMajor], 5 ; bDosVersionMajor must be provided by the application as it's not part of the library 174 jae SHORT .MessageSuppressedByInt2FhHandler 175 LOAD_BDA_SEGMENT_TO ds, ax 176 mov al, [BDA.wEquipment] 177 test al, 0C0h 178 jnz SHORT .MoreThanOneFloppyDrive ; No phantom drive so no need for any filtering 179 test al, 1 ; Any floppy drive at all? 180 jz SHORT .NoFloppyDrive ; A pre-DOS 5 machine with no FDD is indeed a strange beast. However, don't trust the BIOS - let DOS decide 181 cmp dl, [504h] ; MS-DOS - LOGICAL DRIVE FOR SINGLE-FLOPPY SYSTEM (A: / B:) 182 jmp SHORT .ReturnFromFloppyDriveFiltering 158 183 159 184 ;-------------------------------------------------------------------- -
trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm
r583 r593 32 32 ; AX: Selected item 33 33 ; Corrupts registers: 34 ; BX, CX, DX, SI,DI34 ; BX, CX, DX, DI 35 35 ;-------------------------------------------------------------------- 36 36 ALIGN JUMP_ALIGN … … 38 38 push es 39 39 push ds 40 mov di, bp 40 mov di, bp ; Backup parent MENU 41 41 mov cx, DIALOG_size 42 42 eENTER_STRUCT cx … … 52 52 53 53 mov ax, [bp+MENUINIT.wHighlightedItem] 54 mov si, [bp+DIALOG.fpDialogIO] ; Restore SI 54 55 eLEAVE_STRUCT DIALOG_size 55 56 pop ds -
trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
r592 r593 32 32 ; Nothing 33 33 ; Corrupts registers: 34 ; AX, BX, CX, DX, SI,DI34 ; AX, BX, CX, DX, DI 35 35 ;-------------------------------------------------------------------- 36 36 ALIGN JUMP_ALIGN 37 37 DialogFile_GetFileNameWithIoInDSSI: 38 ; We need to store default drive because user might change drive but 39 ; then cancel the file selection. In that case the original default directory 40 ; must be restored. 41 call Drive_GetDefaultToAL 42 push ax 43 38 44 mov bx, FileEventHandler 39 45 mov BYTE [si+FILE_DIALOG_IO.bUserCancellation], TRUE 40 jmp Dialog_DisplayWithDialogInputInDSSIandHandlerInBX 46 call Dialog_DisplayWithDialogInputInDSSIandHandlerInBX 47 48 ; Now restore the default drive if user cancellation 49 pop dx 50 cmp BYTE [si+FILE_DIALOG_IO.bUserCancellation], TRUE 51 je Drive_SetDefaultFromDL 52 ret 41 53 42 54 -
trunk/Assembly_Library/Src/Util/Bit.asm
r592 r593 86 86 jb SHORT Bit_SetToAXfromIndexInCL 87 87 88 %ifdef USE_NEC_V 89 eSET1 dx, cl ; SET1 ignores bits 7...4 in CL 90 %else 88 91 sub cl, 16 89 92 xchg ax, dx … … 91 94 xchg dx, ax 92 95 add cl, 16 96 %endif 93 97 ret 94 98 … … 106 110 ALIGN JUMP_ALIGN 107 111 Bit_SetToAXfromIndexInCL: 112 %ifdef USE_NEC_V 113 eSET1 ax, cl 114 %else 108 115 push dx 109 116 … … 113 120 114 121 pop dx 122 %endif 115 123 ret 116 124
Note:
See TracChangeset
for help on using the changeset viewer.