Changeset 97 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Timestamp:
- Jan 30, 2011, 6:43:08 PM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r90 r97 13 13 ; Nothing 14 14 ; Returns: 15 ; Nothing 16 ; Corrupts registers: 17 ; AX, CX, DI, DS 18 ;-------------------------------------------------------------------- 19 ALIGN JUMP_ALIGN 15 ; DS: RAMVARS segment 16 ; Corrupts registers: 17 ; AX, CX, DI 18 ;-------------------------------------------------------------------- 20 19 RamVars_Initialize: 21 20 push es 22 call .StealMemoryForRAMVARS ; Get RAMVARS segment to DS even if no stealing 23 call .ClearRamvarsFromDS 24 pop es 25 jmp DriveXlate_Reset 21 ; Fall to .StealMemoryForRAMVARS 26 22 27 23 ;-------------------------------------------------------------------- … … 34 30 ; AX 35 31 ;-------------------------------------------------------------------- 36 ALIGN JUMP_ALIGN37 32 .StealMemoryForRAMVARS: 38 33 test BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE 39 jz SHORT RamVars_GetSegmentToDS40 41 LOAD_BDA_SEGMENT_TO ds, ax ; Zero AX34 jz SHORT .InitializeRamvars ; No need to steal RAM 35 36 LOAD_BDA_SEGMENT_TO ds, ax ; Zero AX 42 37 mov al, [cs:ROMVARS.bStealSize] 43 38 sub [BDA.wBaseMem], ax 44 39 mov ax, [BDA.wBaseMem] 45 eSHL_IM ax, 6 ; Segment to first stolen kB (*=40h)40 eSHL_IM ax, 6 ; Segment to first stolen kB (*=40h) 46 41 mov ds, ax 47 ret 48 49 ;-------------------------------------------------------------------- 50 ; .ClearRamvarsFromDS 51 ; Parameters: 52 ; DS: RAMVARS segment 53 ; Returns: 54 ; Nothing 42 mov WORD [FULLRAMVARS.wSign], W_SIGN_FULLRAMVARS 43 ; Fall to .InitializeRamvarsFromDS 44 45 ;-------------------------------------------------------------------- 46 ; .InitializeRamvars 47 ; Parameters: 48 ; Nothing 49 ; Returns: 50 ; DS: RAMVARS segment 55 51 ; Corrupts registers: 56 52 ; AX, CX, DI, ES 57 53 ;-------------------------------------------------------------------- 58 ALIGN JUMP_ALIGN 59 .ClearRamvarsFromDS: 60 call FindDPT_PointToFirstDPT ; Get RAMVARS/FULLRAMVARS size to DI61 mov cx, di ; Copy byte count to CX54 .InitializeRamvars: 55 call RamVars_GetSegmentToDS 56 mov cx, RAMVARS_size 57 xor di, di 62 58 push ds 63 59 pop es 64 xor di, di ; ES:DI now points to RAMVARS/FULLRAMVARS 65 xor ax, ax ; Store zeroes 66 rep stosb 67 mov WORD [FULLRAMVARS.wSign], W_SIGN_FULLRAMVARS 68 ret 60 call Memory_ZeroESDIwithSizeInCX 61 ; Fall to .InitializeDriveTranslationAndReturn 62 63 ;-------------------------------------------------------------------- 64 ; .InitializeDriveTranslationAndReturn 65 ; Parameters: 66 ; DS: RAMVARS segment 67 ; Returns: 68 ; Nothing 69 ; Corrupts registers: 70 ; AX 71 ;-------------------------------------------------------------------- 72 .InitializeDriveTranslationAndReturn: 73 pop es 74 jmp DriveXlate_Reset 69 75 70 76
Note:
See TracChangeset
for help on using the changeset viewer.