Changeset 141 in xtideuniversalbios for trunk/Assembly_Library
- Timestamp:
- Mar 14, 2011, 3:49:50 PM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/Assembly_Library
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/BiosFunctions.inc
r41 r141 1 ; File name : BiosFunctions.inc2 1 ; Project name : AssemblyLibrary 3 ; Created date : 25.6.20104 ; Last update : 24.7.20105 ; Author : Tomi Tilli6 2 ; Description : Defines for BIOS functions. 7 3 %ifndef BIOS_FUNCTIONS_INC … … 15 11 16 12 ; BIOS video functions 13 SET_VIDEO_MODE EQU 00h 17 14 SET_TEXT_MODE_CURSOR_SHAPE EQU 01h 18 15 SET_CURSOR_POSITION EQU 02h -
trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
r106 r141 498 498 call Char_IsUpperCaseLetterInAL 499 499 jc SHORT .ParseAndChangeToSubdirInDSSI 500 call Char_IsDecimalDigitInAL 501 jc SHORT .ParseAndChangeToSubdirInDSSI ; Assume subdir and check for errors 500 502 ; Fall to .ParseAndSelectFileFromDSSI 501 503 … … 550 552 .ChangeDirectoryToDSSI: 551 553 call Directory_ChangeToPathFromDSSI 554 jc SHORT .ParseAndSelectFileFromDSSI ; Must have been a file starting with number 552 555 ; Fall to RefreshFilesToDisplay 553 556 -
trunk/Assembly_Library/Src/Util/Size.asm
r85 r141 43 43 cmp ax, 10000 ; 5 digits needed? 44 44 jae SHORT Size_DivideSizeInBXDXAXby1024andIncrementMagnitudeInCX 45 add sp, BYTE 2 ; Clean return address from stack 46 xchg si, cx ; CX = Remainder (0...1023), SI = Magnitude 45 47 46 add sp, BYTE 2 ; Clean return address from stack 47 call Size_ConvertMagnitudeRemainderInSItoTenths 48 call Size_GetMagnitudeCharacterToDLfromMagnitudeInCX 49 mov cx, si 48 ; Convert remainder to tenths 49 xchg bx, ax ; Store AX 50 mov ax, 10 51 mul cx ; DX:AX = remainder * 10 52 eSHR_IM ax, 10 ; Divide AX by 1024 53 xchg cx, ax ; CX = tenths 54 xchg ax, bx 55 56 ; Convert magnitude to character 57 mov dl, [cs:si+.rgbMagnitudeToChar] 50 58 51 59 pop si 52 60 ret 61 .rgbMagnitudeToChar: db " kMGTP" 62 53 63 54 64 ;-------------------------------------------------------------------- … … 98 108 rcr ax, 1 ; ...kiB 99 109 ret 100 101 102 ;--------------------------------------------------------------------103 ; Size_ConvertMagnitudeRemainderInSItoTenths104 ; Parameters:105 ; SI: Remainder from last magnitude division (0...1023)106 ; Returns:107 ; SI: Tenths108 ; Corrupts registers:109 ; DX110 ;--------------------------------------------------------------------111 ALIGN JUMP_ALIGN112 Size_ConvertMagnitudeRemainderInSItoTenths:113 push ax114 115 mov ax, 10116 mul si ; DX:AX = remainder * 10117 eSHR_IM ax, 10 ; Divide AX by 1024118 xchg si, ax ; SI = tenths119 120 pop ax121 ret122 123 124 ;--------------------------------------------------------------------125 ; Size_GetMagnitudeCharacterToDLfromMagnitudeInCX126 ; Parameters:127 ; CX: Magnitude in BYTE_MULTIPLES128 ; Returns:129 ; DL: Magnitude character130 ; Corrupts registers:131 ; BX132 ;--------------------------------------------------------------------133 ALIGN JUMP_ALIGN134 Size_GetMagnitudeCharacterToDLfromMagnitudeInCX:135 mov bx, cx136 mov dl, [cs:bx+.rgbMagnitudeToChar]137 ret138 ALIGN WORD_ALIGN139 .rgbMagnitudeToChar: db " kMGTP"
Note:
See TracChangeset
for help on using the changeset viewer.