Changeset 625 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Timestamp:
- Feb 19, 2023, 9:26:52 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r623 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 36 36 push es 37 37 38 %ifndef USE_AT 39 mov ax, LITE_MODE_RAMVARS_SEGMENT 40 test BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE 41 jz SHORT .InitializeRamvars ; No need to steal RAM 42 %endif 38 mov ax, [cs:ROMVARS.wRamVars] 39 test ax, ax ; UMB segment or LITE_MODE_RAMVARS_SEGMENT? 40 jnz SHORT .InitializeRamvars ; No need to steal RAM 43 41 44 LOAD_BDA_SEGMENT_TO ds, ax, ! ; Zero AX42 mov ds, ax 45 43 mov al, [cs:ROMVARS.bStealSize] 46 44 sub [BDA.wBaseMem], ax … … 67 65 ret 68 66 67 69 68 ;-------------------------------------------------------------------- 70 69 ; Returns segment to RAMVARS. 71 ; RAMVARS might be located at the top of interrupt vectors (0030:0000h) 72 ; or at the top of system base RAM.70 ; RAMVARS might be located at the top of interrupt vectors (0030:0000h), 71 ; at the top of system base RAM or in a user configured UMB. 73 72 ; 74 73 ; RamVars_GetSegmentToDS … … 82 81 ALIGN JUMP_ALIGN 83 82 RamVars_GetSegmentToDS: 83 mov ds, [cs:ROMVARS.wRamVars] 84 mov di, ds 85 test di, di ; UMB segment or LITE_MODE_RAMVARS_SEGMENT? 86 jnz SHORT .Return 84 87 85 %ifndef USE_AT ; Always in Full Mode for AT builds86 test BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE87 jnz SHORT .GetStolenSegmentToDS88 %ifndef USE_18689 mov di, LITE_MODE_RAMVARS_SEGMENT90 mov ds, di91 %else92 push LITE_MODE_RAMVARS_SEGMENT93 pop ds94 %endif95 ret96 %endif97 98 ALIGN JUMP_ALIGN99 .GetStolenSegmentToDS:100 LOAD_BDA_SEGMENT_TO ds, di101 88 ;%ifdef USE_186 102 89 ; imul di, [BDA.wBaseMem], 64 ; 2 bytes less but slower, especially on 386/486 processors … … 111 98 cmp WORD [RAMVARS.wSignature], RAMVARS_RAM_SIGNATURE 112 99 jne SHORT .LoopStolenKBs ; Loop until sign found (always found eventually) 100 .Return: 113 101 ret 114 102
Note:
See TracChangeset
for help on using the changeset viewer.