Changeset 592 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
- Timestamp:
- Jun 25, 2018, 10:29:27 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r567 r592 31 31 ; DS: RAMVARS segment 32 32 ; Corrupts registers: 33 ; AX, CX, D I33 ; AX, CX, DX, DI 34 34 ;-------------------------------------------------------------------- 35 35 RamVars_Initialize: 36 36 push es 37 ; Fall to .StealMemoryForRAMVARS38 37 39 ;--------------------------------------------------------------------40 ; .StealMemoryForRAMVARS41 ; Parameters:42 ; Nothing43 ; Returns:44 ; DS: RAMVARS segment45 ; Corrupts registers:46 ; AX, CL47 ;--------------------------------------------------------------------48 .StealMemoryForRAMVARS:49 38 %ifndef USE_AT 50 39 mov ax, LITE_MODE_RAMVARS_SEGMENT … … 56 45 mov al, [cs:ROMVARS.bStealSize] 57 46 sub [BDA.wBaseMem], ax 58 mov ax, [BDA.wBaseMem]59 47 %ifdef USE_186 60 shl ax, 6 ; Segment to first stolen kB (*=40h)48 imul ax, [BDA.wBaseMem], 64 61 49 %else 62 mov cl, 663 shl ax, cl50 mov al, 64 51 mul WORD [BDA.wBaseMem] 64 52 %endif 65 ; Fall to .InitializeRamvars66 53 67 ;--------------------------------------------------------------------68 ; .InitializeRamvars69 ; Parameters:70 ; AX: RAMVARS segment71 ; Returns:72 ; DS: RAMVARS segment73 ; Corrupts registers:74 ; AX, CX, DI, ES75 ;--------------------------------------------------------------------76 54 .InitializeRamvars: 55 xor di, di 77 56 mov ds, ax 78 57 mov es, ax 79 58 mov cx, RAMVARS_size 80 xor di, di81 59 call Memory_ZeroESDIwithSizeInCX 82 60 mov WORD [RAMVARS.wDrvDetectSignature], RAMVARS_DRV_DETECT_SIGNATURE … … 121 99 .GetStolenSegmentToDS: 122 100 LOAD_BDA_SEGMENT_TO ds, di 101 ;%ifdef USE_186 102 ; imul di, [BDA.wBaseMem], 64 ; 2 bytes less but slower, especially on 386/486 processors 103 ;%else 123 104 mov di, [BDA.wBaseMem] ; Load available base memory size in kB 124 105 eSHL_IM di, 6 ; Segment to first stolen kB (*=40h) 106 ;%endif 125 107 ALIGN JUMP_ALIGN 126 108 .LoopStolenKBs:
Note:
See TracChangeset
for help on using the changeset viewer.