Changeset 133 in xtideuniversalbios
- Timestamp:
- Mar 12, 2011, 1:48:48 PM (14 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/Display.inc
r91 r133 37 37 .InitializeDisplayContext resb 2 38 38 39 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 39 40 .SetCharacterPointerFromBXAX resb 2 41 %endif 40 42 .SetCharOutputFunctionFromAXwithAttribFlagInBL resb 2 41 43 .SetCharacterOutputParameterFromAX resb 2 … … 46 48 .SynchronizeDisplayContextToHardware resb 2 47 49 50 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 48 51 .GetCharacterPointerToBXAX resb 2 52 %endif 49 53 .GetSoftwareCoordinatesToAX resb 2 50 54 .GetColumnsToALandRowsToAH resb 2 -
trunk/Assembly_Library/Src/Display/Display.asm
r101 r133 63 63 at DISPLAY_LIB.InitializeDisplayContext, dw DisplayContext_Initialize 64 64 65 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 65 66 at DISPLAY_LIB.SetCharacterPointerFromBXAX, dw DisplayContext_SetCharacterPointerFromBXAX 67 %endif 66 68 at DISPLAY_LIB.SetCharOutputFunctionFromAXwithAttribFlagInBL, dw DisplayContext_SetCharOutputFunctionFromAXwithAttribFlagInBL 67 69 at DISPLAY_LIB.SetCharacterOutputParameterFromAX, dw DisplayContext_SetCharacterOutputParameterFromAX … … 72 74 at DISPLAY_LIB.SynchronizeDisplayContextToHardware, dw DisplayContext_SynchronizeToHardware 73 75 76 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 74 77 at DISPLAY_LIB.GetCharacterPointerToBXAX, dw DisplayContext_GetCharacterPointerToBXAX 78 %endif 75 79 at DISPLAY_LIB.GetSoftwareCoordinatesToAX, dw DisplayCursor_GetSoftwareCoordinatesToAX 76 80 at DISPLAY_LIB.GetColumnsToALandRowsToAH, dw DisplayPage_GetColumnsToALandRowsToAH -
trunk/Assembly_Library/Src/Display/DisplayContext.asm
r115 r133 148 148 ; AX, DI 149 149 ;-------------------------------------------------------------------- 150 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 150 151 ALIGN JUMP_ALIGN 151 152 DisplayContext_PrepareOffScreenBufferInESBXwithLengthInCX: … … 165 166 pop ds 166 167 ret 168 %endif 167 169 168 170 … … 177 179 ; AX 178 180 ;-------------------------------------------------------------------- 181 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 179 182 ALIGN JUMP_ALIGN 180 183 DisplayContext_SetCharacterPointerFromBXAX: … … 184 187 mov es, bx 185 188 ret 189 %endif 186 190 187 191 … … 195 199 ; Nothing 196 200 ;-------------------------------------------------------------------- 201 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 197 202 ALIGN JUMP_ALIGN 198 203 DisplayContext_GetCharacterPointerToBXAX: … … 200 205 mov bx, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fpCursorPosition+2] 201 206 ret 207 %endif 202 208 203 209 … … 261 267 ; Corrupts registers: 262 268 ; Nothing 263 ;-------------------------------------------------------------------- 269 ;-------------------------------------------------------------------- 270 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS ; This appears to be completely unused 264 271 ALIGN JUMP_ALIGN 265 272 DisplayContext_GetCharacterOutputParameterToDX: 266 273 mov dx, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam] 267 274 ret 275 %endif 268 276 269 277 … … 277 285 ; Corrupts registers: 278 286 ; Nothing 279 ;-------------------------------------------------------------------- 287 ;-------------------------------------------------------------------- 280 288 ALIGN JUMP_ALIGN 281 289 DisplayContext_GetCharacterOffsetToAXfromByteOffsetInAX: … … 294 302 ; Corrupts registers: 295 303 ; Nothing 296 ;-------------------------------------------------------------------- 304 ;-------------------------------------------------------------------- 297 305 ALIGN JUMP_ALIGN 298 306 DisplayContext_GetByteOffsetToAXfromCharacterOffsetInAX: -
trunk/Assembly_Library/Src/File/Drive.asm
r41 r133 1 ; File name : Drive.asm2 1 ; Project name : Assembly Library 3 ; Created date : 1.9.20104 ; Last update : 3.9.20105 ; Author : Tomi Tilli6 2 ; Description : Functions for accessing drives. 7 3 … … 52 48 xor bx, bx 53 49 xor ax, ax ; Temporary use BX:AX for flags 54 xor dx, dx; Start from drive 050 cwd ; Start from drive 0 55 51 call .CheckDriveValidityUntilCXisZero 56 52 mov dx, bx ; Flags now in DX:AX … … 163 159 Drive_GetDefaultToAL: 164 160 mov ah, GET_CURRENT_DEFAULT_DRIVE 165 int DOS_INTERRUPT_21h166 ret161 SKIP2B f ; cmp ax, <next instruction> 162 ; Fall to Drive_SetDefaultFromDL 167 163 168 164 … … 176 172 ; AH 177 173 ;-------------------------------------------------------------------- 178 ALIGN JUMP_ALIGN179 174 Drive_SetDefaultFromDL: 180 175 mov ah, SELECT_DEFAULT_DRIVE 181 176 int DOS_INTERRUPT_21h 182 177 ret 183 -
trunk/Assembly_Library/Src/File/FileIO.asm
r105 r133 25 25 xchg si, dx 26 26 mov bx, ax ; Copy file handle to BX 27 ret28 29 30 ;--------------------------------------------------------------------31 ; FileIO_CloseUsingHandleFromBX32 ; Parameters:33 ; BX: File handle34 ; Returns:35 ; AX: DOS error code if CF set36 ; CF: Clear if file closed successfully37 ; Set if error38 ; Corrupts registers:39 ; AX40 ;--------------------------------------------------------------------41 ALIGN JUMP_ALIGN42 FileIO_CloseUsingHandleFromBX:43 mov ah, CLOSE_FILE44 int DOS_INTERRUPT_21h45 27 ret 46 28 … … 70 52 ; File position is updated so next read will start where 71 53 ; previous read stopped. 72 ; 54 ; 73 55 ; FileIO_ReadCXbytesToDSSIusingHandleFromBX 74 56 ; Parameters: … … 117 99 ; File position is updated so next write will start where 118 100 ; previous write stopped. 119 ; 101 ; 120 102 ; FileIO_WriteCXbytesFromDSSIusingHandleFromBX: 121 103 ; Parameters: … … 249 231 250 232 ;-------------------------------------------------------------------- 233 ; FileIO_CloseUsingHandleFromBX 234 ; Parameters: 235 ; BX: File handle 236 ; Returns: 237 ; AX: DOS error code if CF set 238 ; CF: Clear if file closed successfully 239 ; Set if error 240 ; Corrupts registers: 241 ; AX 242 ;-------------------------------------------------------------------- 243 ALIGN JUMP_ALIGN 244 FileIO_CloseUsingHandleFromBX: 245 mov ah, CLOSE_FILE 246 SKIP2B f ; cmp ax, <next instruction> 247 ; Fall to FileIO_SeekFromOriginInALtoOffsetInDXAXusingHandleFromBX 248 249 250 ;-------------------------------------------------------------------- 251 251 ; FileIO_SeekFromOriginInALtoOffsetInDXAXusingHandleFromBX: 252 252 ; Parameters: … … 262 262 ; Nothing 263 263 ;-------------------------------------------------------------------- 264 ALIGN JUMP_ALIGN265 264 FileIO_SeekFromOriginInALtoOffsetInDXAXusingHandleFromBX: 266 265 mov ah, SET_CURRENT_FILE_POSITION -
trunk/Assembly_Library/Src/Keyboard/Keyboard.asm
r131 r133 10 10 ; Reads user inputted word. 11 11 ; Function returns when ENTER or ESC will be pressed. 12 ; 12 ; 13 13 ; Keyboard_ReadUserInputtedWordWhilePrinting 14 14 ; Parameters … … 51 51 ; supported to ignore unwanted characters. 52 52 ; Function returns when ENTER or ESC will be pressed. 53 ; 53 ; 54 54 ; Keyboard_ReadUserInputtedStringToESDIWhilePrinting 55 55 ; Parameters: … … 249 249 ; AX 250 250 ;-------------------------------------------------------------------- 251 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS ; Only used when debugging 251 252 ALIGN JUMP_ALIGN 252 253 Keyboard_RemoveAllKeystrokesFromBuffer: … … 254 255 jnz SHORT Keyboard_RemoveAllKeystrokesFromBuffer 255 256 ret 257 %endif 256 258 257 259 … … 271 273 ;-------------------------------------------------------------------- 272 274 ALIGN JUMP_ALIGN 273 Keyboard_GetKeystrokeToAX:274 call Keyboard_GetKeystrokeToAXandLeaveItToBuffer275 jnz SHORT Keyboard_GetKeystrokeToAXandWaitIfNecessary276 ret277 ALIGN JUMP_ALIGN278 275 Keyboard_GetKeystrokeToAXandLeaveItToBuffer: 279 276 mov ah, CHECK_FOR_KEYSTROKE 280 277 int BIOS_KEYBOARD_INTERRUPT_16h 281 278 ret 279 ALIGN JUMP_ALIGN 280 Keyboard_GetKeystrokeToAX: 281 call Keyboard_GetKeystrokeToAXandLeaveItToBuffer 282 jz SHORT Keyboard_GetKeystrokeToAXReturn 283 ; Fall to Keyboard_GetKeystrokeToAXandWaitIfNecessary 282 284 ALIGN JUMP_ALIGN 283 285 Keyboard_GetKeystrokeToAXandWaitIfNecessary: … … 285 287 int BIOS_KEYBOARD_INTERRUPT_16h 286 288 test ax, ax ; Clear ZF 287 ret 289 Keyboard_GetKeystrokeToAXReturn: 290 ret -
trunk/Assembly_Library/Src/Menu/Dialog/ItemLineSplitter.asm
r52 r133 1 ; File name : ItemLineSplitter.asm2 1 ; Project name : Assembly Library 3 ; Created date : 12.10.20104 ; Last update : 12.10.20105 ; Author : Tomi Tilli6 2 ; Description : Functions for splitting strings to item lines. 7 3 … … 130 126 131 127 inc bx ; Increment line 132 xor cx, cx ; Zero character counter 128 xor cx, cx ; Zero character counter (and clear CF) 133 129 mov si, di ; Start from complete word 134 130 mov [bp+ITEM_LINE_SPLITTER.wStartOfLine], di 135 clc136 131 ret 137 132 -
trunk/Assembly_Library/Src/Menu/MenuEvent.asm
r104 r133 21 21 pop ds 22 22 mov si, bp 23 mov b x, MENUEVENT.InitializeMenuinitFromDSSI23 mov bl, MENUEVENT.InitializeMenuinitFromDSSI 24 24 jmp SHORT MenuEvent_SendFromBX 25 25 … … 37 37 ALIGN JUMP_ALIGN 38 38 MenuEvent_ExitMenu: 39 mov b x, MENUEVENT.ExitMenu39 mov bl, MENUEVENT.ExitMenu 40 40 jmp SHORT MenuEvent_SendFromBX 41 41 … … 53 53 ALIGN JUMP_ALIGN 54 54 MenuEvent_IdleProcessing: 55 mov b x, MENUEVENT.IdleProcessing55 mov bl, MENUEVENT.IdleProcessing 56 56 jmp SHORT MenuEvent_SendFromBX 57 57 … … 71 71 ALIGN JUMP_ALIGN 72 72 MenuEvent_RefreshTitle: 73 mov b x, MENUEVENT.RefreshTitle74 jmp SHORT LoadHighlightedItemToCXandSendMessageFromBX73 mov bl, MENUEVENT.RefreshTitle 74 SKIP2B cx ; mov cx, <next instruction> 75 75 76 ALIGN JUMP_ALIGN77 76 MenuEvent_RefreshInformation: 78 mov bx, MENUEVENT.RefreshInformation 79 LoadHighlightedItemToCXandSendMessageFromBX: 77 mov bl, MENUEVENT.RefreshInformation 80 78 mov cx, [bp+MENUINIT.wHighlightedItem] 81 79 jmp SHORT MenuEvent_SendFromBX … … 96 94 ALIGN JUMP_ALIGN 97 95 MenuEvent_RefreshItemFromCX: 98 mov b x, MENUEVENT.RefreshItemFromCX96 mov bl, MENUEVENT.RefreshItemFromCX 99 97 jmp SHORT MenuEvent_SendFromBX 100 98 … … 116 114 push dx 117 115 118 mov b x, MENUEVENT.ItemHighlightedFromCX116 mov bl, MENUEVENT.ItemHighlightedFromCX 119 117 call MenuEvent_SendFromBX 120 118 … … 139 137 ALIGN JUMP_ALIGN 140 138 MenuEvent_KeyStrokeInAX: 141 mov b x, MENUEVENT.KeyStrokeInAX142 jmp SHORT MenuEvent_SendFromBX139 mov bl, MENUEVENT.KeyStrokeInAX 140 SKIP2B dx ; mov dx, <next instruction> 143 141 144 142 … … 154 152 ; AX, BX, DX 155 153 ;-------------------------------------------------------------------- 156 ALIGN JUMP_ALIGN157 154 MenuEvent_ItemSelectedFromCX: 158 mov b x, MENUEVENT.ItemSelectedFromCX159 jmp SHORTMenuEvent_SendFromBX155 mov bl, MENUEVENT.ItemSelectedFromCX 156 ; Fall to MenuEvent_SendFromBX 160 157 161 158 … … 163 160 ; MenuEvent_SendFromBX 164 161 ; Parameters 165 ; B X: Menu event to send162 ; BL: Menu event to send 166 163 ; SS:BP: Ptr to MENU 167 164 ; Other registers: Event specific parameters … … 180 177 push si 181 178 push cx 179 xor bh, bh 182 180 call [bp+MENU.fnEventHandler] 183 181 pop cx -
trunk/Assembly_Library/Src/Menu/MenuInit.asm
r129 r133 57 57 CALL_DISPLAY_LIBRARY SetCursorShapeFromAX 58 58 call MenuEvent_InitializeMenuinit ; User initialization 59 %ifndef USE_186 59 60 call MenuInit_RefreshMenuWindow 60 61 jmp MenuLoop_Enter 62 %else 63 push MenuLoop_Enter 64 ; Fall to MenuInit_RefreshMenuWindow 65 %endif 61 66 62 67 … … 117 122 ; Nothing 118 123 ;-------------------------------------------------------------------- 124 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 119 125 ALIGN JUMP_ALIGN 120 126 MenuInit_GetHighlightedItemToAX: 121 127 mov ax, [bp+MENUINIT.wHighlightedItem] 122 128 ret 129 %endif 123 130 124 131 … … 135 142 ; Nothing 136 143 ;-------------------------------------------------------------------- 144 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 137 145 ALIGN JUMP_ALIGN 138 146 MenuInit_SetTitleHeightFromAL: … … 149 157 mov [bp+MENUINIT.wItems], ax 150 158 ret 159 %endif 151 160 152 161 … … 162 171 ; Nothing 163 172 ;-------------------------------------------------------------------- 173 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 164 174 ALIGN JUMP_ALIGN 165 175 MenuInit_SetUserDataFromDSSI: … … 172 182 lds si, [bp+MENU.dwUserData] 173 183 ret 184 %endif -
trunk/Assembly_Library/Src/Menu/MenuLoop.asm
r105 r133 56 56 ; SS:BP: Ptr to MENU 57 57 ; Returns: 58 ; Nothing 58 ; Nothing 59 59 ; Corrupts registers: 60 60 ; AX, BX, CX, DX, SI, DI … … 92 92 test BYTE [bp+MENU.bFlags], FLG_MENU_USER_HANDLES_SCROLLING 93 93 jz SHORT MenuLoop_ProcessScrollingKeysFromAX 94 clc ; Clear CF since keystroke not processed 95 ret 94 ret ; Return with CF cleared since keystroke not processed 96 95 97 96 ALIGN JUMP_ALIGN -
trunk/Assembly_Library/Src/Menu/MenuScrollbars.asm
r105 r133 59 59 ; Corrupts registers: 60 60 ; CX, DX 61 ;-------------------------------------------------------------------- 61 ;-------------------------------------------------------------------- 62 62 ALIGN JUMP_ALIGN 63 63 .GetLastThumbLineToAX: … … 161 161 .RotateItemInCX: 162 162 mov dx, [bp+MENUINIT.wItems] 163 cmp cx, BYTE 0164 j lSHORT .RotateNegativeItemInCX163 test cx, cx 164 js SHORT .RotateNegativeItemInCX 165 165 cmp cx, dx 166 166 jae SHORT .RotatePositiveItemInCX … … 193 193 ALIGN JUMP_ALIGN 194 194 MenuScrollbars_IsItemInCXonVisiblePage: 195 cmp cx, [bp+MENU.wFirstVisibleItem]196 j bSHORT .ItemIsNotVisible195 cmp [bp+MENU.wFirstVisibleItem], cx 196 ja SHORT .ItemIsNotVisible 197 197 198 198 call MenuScrollbars_GetLastVisibleItemOnPageToAX … … 200 200 ja SHORT .ItemIsNotVisible 201 201 stc ; Item is visible 202 ret 203 ALIGN JUMP_ALIGN 202 ALIGN JUMP_ALIGN, ret 204 203 .ItemIsNotVisible: 205 clc206 204 ret 207 205 -
trunk/Assembly_Library/Src/Menu/MenuText.asm
r125 r133 155 155 call MenuLocation_GetTextCoordinatesToAXforItemInAX 156 156 mov dx, MenuCharOut_MenuTeletypeOutput 157 ; Fall to AdjustDisplayContextForDrawingTextsAtCoord inatesInAXwithAttributeTypeInSI157 ; Fall to AdjustDisplayContextForDrawingTextsAtCoordsInAXwithAttrTypeInSIandCharOutFunctionInDX 158 158 159 159 ;-------------------------------------------------------------------- -
trunk/Assembly_Library/Src/Menu/MenuTime.asm
r105 r133 97 97 xchg dx, ax 98 98 call TimerTicks_GetSecondsToAXfromTicksInDX 99 jmp SHORT .PopRegistersAndReturn99 SKIP2B f ; cmp ax, <next instruction> 100 100 .TimeoutHasOccurredSoMakeSureTicksAreNotBelowZero: 101 101 xor ax, ax 102 .PopRegistersAndReturn: 102 103 103 pop bx 104 104 pop cx -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm
r109 r133 112 112 g_szItemIdeIRQ: db "IRQ",NULL 113 113 114 g_szDlgBusType: db "Select type of bus where I deController is connected.",NULL114 g_szDlgBusType: db "Select type of bus where IDE Controller is connected.",NULL 115 115 g_szDlgIdeCmdPort: db "Enter IDE command block (base port) address.",NULL 116 116 g_szDlgIdeCtrlPort: db "Enter IDE control block address (usually command block + 200h).",NULL
Note:
See TracChangeset
for help on using the changeset viewer.