Changeset 105 in xtideuniversalbios for trunk/Assembly_Library/Src
- Timestamp:
- Feb 17, 2011, 2:52:42 PM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/Assembly_Library/Src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/File/FileIO.asm
r67 r105 1 ; File name : FileIO.asm2 1 ; Project name : Assembly Library 3 ; Created date : 1.9.20104 ; Last update : 6.12.20105 ; Author : Tomi Tilli6 2 ; Description : Functions for file access. 7 3 … … 175 171 ALIGN JUMP_ALIGN 176 172 .TransferNextBytes: 177 call Registers_NormalizeDSSI173 call NormalizeDSSI 178 174 call bp ; Transfer function 179 175 jc SHORT .ErrorOccurredDuringTransfer … … 184 180 pop cx ; CX = Bytes for last transfer 185 181 jcxz .ReturnErrorCodeInAX ; No remaining bytes 186 call Registers_NormalizeDSSI182 call NormalizeDSSI 187 183 call bp 188 184 .ReturnErrorCodeInAX: … … 195 191 pop cx ; Remove bytes for last transfer 196 192 jmp SHORT .ReturnErrorCodeInAX 193 194 ;-------------------------------------------------------------------- 195 ; NormalizeDSSI 196 ; Parameters 197 ; DS:SI: Ptr to normalize 198 ; Returns: 199 ; DS:SI: Normalized pointer 200 ; Corrupts registers: 201 ; Nothing 202 ;-------------------------------------------------------------------- 203 ALIGN JUMP_ALIGN 204 NormalizeDSSI: 205 push dx 206 push ax 207 NORMALIZE_FAR_POINTER ds, si, ax, dx 208 pop ax 209 pop dx 210 ret 197 211 198 212 -
trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
r103 r105 45 45 .ItemSelectedFromCX: 46 46 call LoadItemStringBufferToESDI 47 Registers_CopyESDItoDSSI47 COPY_ESDI_to_DSSI 48 48 call ItemLineSplitter_GetLineToDSSIandLengthToCXfromStringInDSSIwithIndexInCX 49 49 jmp ParseSelectionFromItemLineInDSSI … … 128 128 call RemoveLastLFandTerminateESDIwithNull 129 129 130 Registers_CopySSBPtoDSSI130 COPY_SSBP_TO_DSSI 131 131 xor ax, ax 132 132 call Dialog_EventInitializeMenuinitFromDSSIwithHighlightedItemInAX … … 198 198 ALIGN JUMP_ALIGN 199 199 .ClearDLifInRootDirectory: 200 Registers_CopyESDItoDSSI200 COPY_ESDI_to_DSSI 201 201 call Directory_WriteCurrentPathToDSSI 202 202 mov dl, [si] … … 374 374 ALIGN JUMP_ALIGN 375 375 SortDirectoryContentsStringFromESDIwithCountInCX: 376 Registers_CopyESDItoDSSI376 COPY_ESDI_to_DSSI 377 377 call .AddDirectoryContentsStringLengthToDI 378 378 mov bx, .FileStringComparator -
trunk/Assembly_Library/Src/Menu/MenuBorders.asm
r104 r105 394 394 db DOUBLE_BOTTOM_LEFT_CORNER 395 395 db DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL 396 db "%A Autoselection in %2u s",NULL396 db "%ASelection in %2u s",NULL 397 397 398 398 -
trunk/Assembly_Library/Src/Menu/MenuLoop.asm
r60 r105 1 ; File name : MenuLoop.asm2 1 ; Project name : Assembly Library 3 ; Created date : 22.7.20104 ; Last update : 25.11.20105 ; Author : Tomi Tilli6 2 ; Description : Menu loop for waiting keystrokes. 7 3 … … 22 18 call KeystrokeProcessing 23 19 call TimeoutProcessing 24 call IdleTimeProcessing20 call MenuEvent_IdleProcessing ; User idle processing 25 21 test BYTE [bp+MENU.bFlags], FLG_MENU_EXIT 26 22 jz SHORT MenuLoop_Enter … … 29 25 30 26 ;-------------------------------------------------------------------- 31 ; IdleTimeProcessing27 ; KeystrokeProcessing 32 28 ; TimeoutProcessing 33 ; KeystrokeProcessing34 29 ; Parameters 35 30 ; SS:BP: Ptr to MENU … … 40 35 ;-------------------------------------------------------------------- 41 36 ALIGN JUMP_ALIGN 42 IdleTimeProcessing: 43 jmp MenuEvent_IdleProcessing ; User idle processing 37 KeystrokeProcessing: 38 call Keyboard_GetKeystrokeToAX 39 jnz SHORT ProcessKeystrokeFromAX 40 NoKeystrokeToProcess: 41 ret 44 42 45 43 ALIGN JUMP_ALIGN 46 44 TimeoutProcessing: 47 45 call MenuTime_UpdateSelectionTimeout 46 jnc NoKeystrokeToProcess 48 47 mov ah, MENU_KEY_ENTER ; Fake ENTER to select item 49 jc SHORT ProcessKeystrokeFromAX ; Process faked ENTER 50 ret 51 52 ALIGN JUMP_ALIGN 53 KeystrokeProcessing: 54 call Keyboard_GetKeystrokeToAX 55 jnz SHORT ProcessKeystrokeFromAX 56 ret 48 ; Fall to ProcessKeystrokeFromAX 57 49 58 50 … … 74 66 xchg ax, cx 75 67 call .ProcessMenuSystemKeystrokeFromAX 76 jc SHORT .Return68 jc SHORT NoKeystrokeToProcess 77 69 jmp MenuEvent_KeyStrokeInAX 78 ALIGN JUMP_ALIGN, ret79 .Return:80 ret81 70 82 71 ;-------------------------------------------------------------------- -
trunk/Assembly_Library/Src/Menu/MenuScrollbars.asm
r67 r105 1 ; File name : MenuScrollbars.asm2 1 ; Project name : Assembly Library 3 ; Created date : 20.7.20104 ; Last update : 9.12.20105 ; Author : Tomi Tilli6 2 ; Description : Functions for drawing scroll bars over menu borders. 7 3 … … 185 181 186 182 ;-------------------------------------------------------------------- 187 ; .IsItemInCXonVisiblePage183 ; MenuScrollbars_IsItemInCXonVisiblePage 188 184 ; Parameters 189 185 ; CX: Item whose visibility is to be checked … … 197 193 ALIGN JUMP_ALIGN 198 194 MenuScrollbars_IsItemInCXonVisiblePage: 199 cmp cx, [bp+MENUINIT.wItems]200 jae SHORT .ItemIsNotVisible201 202 195 cmp cx, [bp+MENU.wFirstVisibleItem] 203 196 jb SHORT .ItemIsNotVisible … … 215 208 216 209 ;-------------------------------------------------------------------- 217 ; Menu Location_GetLastVisibleItemOnPageToAX210 ; MenuScrollbars_GetLastVisibleItemOnPageToAX 218 211 ; Parameters 219 212 ; SS:BP: Ptr to MENU -
trunk/Assembly_Library/Src/Menu/MenuTime.asm
r62 r105 1 ; File name : MenuTime.asm2 1 ; Project name : Assembly Library 3 ; Created date : 25.7.20104 ; Last update : 30.11.20105 ; Author : Tomi Tilli6 2 ; Description : Menu timeouts other time related functions. 7 3 … … 41 37 MenuTime_StopSelectionTimeout: 42 38 test BYTE [bp+MENU.bFlags], FLG_MENU_TIMEOUT_COUNTDOWN 43 jz SHORT .TimeoutAlreadyStopped39 jz SHORT TimeoutAlreadyStopped 44 40 and BYTE [bp+MENU.bFlags], ~FLG_MENU_TIMEOUT_COUNTDOWN 45 41 jmp MenuBorders_RedrawBottomBorderLine 46 ALIGN JUMP_ALIGN47 .TimeoutAlreadyStopped:48 ret49 42 50 43 … … 77 70 call MenuBorders_RedrawBottomBorderLine 78 71 clc 79 ALIGN JUMP_ALIGN80 72 .ReturnSinceTimeoutDisabled: 73 TimeoutAlreadyStopped: 81 74 ret 82 75 -
trunk/Assembly_Library/Src/Util/Memory.asm
r103 r105 66 66 push di 67 67 push ax 68 Registers_CopySSBPtoESDI68 call Registers_CopySSBPtoESDI 69 69 call Memory_ZeroESDIwithSizeInCX 70 70 pop ax -
trunk/Assembly_Library/Src/Util/Registers.asm
r103 r105 1 1 ; Project name : Assembly Library 2 2 ; Description : Functions for register operations. 3 4 ;--------------------------------------------------------------------5 ; NORMALIZE_FAR_POINTER6 ; Parameters:7 ; %1:%2: Far pointer to normalize8 ; %3: Scratch register9 ; %4: Scratch register10 ; Returns:11 ; %1:%2: Normalized far pointer12 ; Corrupts registers:13 ; %3, %414 ;--------------------------------------------------------------------15 %macro NORMALIZE_FAR_POINTER 416 mov %4, %2 ; Copy offset to scratch reg17 and %2, BYTE 0Fh ; Clear offset bits 15...418 eSHR_IM %4, 4 ; Divide offset by 1619 mov %3, %1 ; Copy segment to scratch reg20 add %3, %4 ; Add shifted offset to segment21 mov %1, %3 ; Set normalized segment22 %endmacro23 3 24 4 25 5 ; Section containing code 26 6 SECTION .text 27 28 ;--------------------------------------------------------------------29 ; Registers_NormalizeDSSI30 ; Registers_NormalizeESDI31 ; Parameters32 ; DS:SI or ES:DI: Ptr to normalize33 ; Returns:34 ; DS:SI or ES:DI: Normalized pointer35 ; Corrupts registers:36 ; Nothing37 ;--------------------------------------------------------------------38 ALIGN JUMP_ALIGN39 Registers_NormalizeDSSI:40 push dx41 push ax42 NORMALIZE_FAR_POINTER ds, si, ax, dx43 pop ax44 pop dx45 ret46 47 ALIGN JUMP_ALIGN48 Registers_NormalizeESDI:49 push dx50 push ax51 NORMALIZE_FAR_POINTER es, di, ax, dx52 pop ax53 pop dx54 ret55 56 7 57 8 ;-------------------------------------------------------------------- … … 76 27 ;-------------------------------------------------------------------- 77 28 ; Registers_CopySSBPtoESDI 78 ; Registers_CopySSBPtoDSSI 79 ; Registers_CopyDSSItoESDI 80 ; Registers_CopyESDItoDSSI 29 ; Registers_CopySSBPtoDSSI (uncommented to save bytes) 30 ; Registers_CopyDSSItoESDI (uncommented to save bytes) 31 ; Registers_CopyESDItoDSSI (uncommented to save bytes) 81 32 ; Parameters 82 33 ; Nothing … … 86 37 ; Nothing 87 38 ;-------------------------------------------------------------------- 88 %macro Registers_CopySSBPtoESDI 0 89 push ss 90 pop es 91 mov di, bp 92 %endmacro 39 ALIGN JUMP_ALIGN 40 Registers_CopySSBPtoESDI: 41 COPY_SSBP_TO_ESDI 42 ret 93 43 94 %macro Registers_CopySSBPtoDSSI 0 95 push ss 96 pop ds 97 mov si, bp 98 %endmacro 44 ;ALIGN JUMP_ALIGN 45 ;Registers_CopySSBPtoDSSI: 46 ; COPY_SSBP_TO_DSSI 47 ; ret 99 48 100 %macro Registers_CopyDSSItoESDI 0 101 push ds 102 pop es 103 mov di, si 104 %endmacro 49 ;ALIGN JUMP_ALIGN 50 ;Registers_CopyDSSItoESDI: 51 ; COPY_DSSI_TO_ESDI 52 ; ret 105 53 106 %macro Registers_CopyESDItoDSSI 0 107 push es 108 pop ds 109 mov si, di 110 %endmacro 54 ;ALIGN JUMP_ALIGN 55 ;Registers_CopyESDItoDSSI: 56 ; COPY_ESDI_to_DSSI 57 ; ret 111 58 112 59 113 60 ;-------------------------------------------------------------------- 114 ; Registers_SetZFifNullPointerInDSSI 61 ; Registers_SetZFifNullPointerInDSSI (uncommented to save bytes) 115 62 ; Parameters 116 63 ; DS:SI: Far pointer … … 120 67 ; Nothing 121 68 ;-------------------------------------------------------------------- 122 ALIGN JUMP_ALIGN123 Registers_SetZFifNullPointerInDSSI:124 push ax125 mov ax, ds126 or ax, si127 pop ax128 ret69 ;ALIGN JUMP_ALIGN 70 ;Registers_SetZFifNullPointerInDSSI: 71 ; push ax 72 ; mov ax, ds 73 ; or ax, si 74 ; pop ax 75 ; ret
Note:
See TracChangeset
for help on using the changeset viewer.