|
byxyk
初级用户
 
积分 112
发帖 54
注册 2007-6-18
状态 离线
|
『楼 主』:
XMS分配大于64M问题
使用 LLM 解释/回答一下
如何使XMS分配大于64M空间?XMS3.0规范吗?具体调用格式是怎样的?
有知道的同志,请不吝指教!
|
|
2007-6-19 21:40 |
|
|
xuxuezeng
新手上路

积分 18
发帖 9
注册 2006-7-28
状态 离线
|
|
2007-6-25 12:12 |
|
|
duanml
中级用户
  
积分 231
发帖 112
注册 2007-6-19
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
什么意思啊?
我在1998年的时候,将老机器的内存从16M扩到80M的时候,用dos622的himem.sys只能分配到64M,但是用win98(4.10.1998)的himem.sys就能分配到80M了。
|
|
2007-6-25 17:02 |
|
|
johnsonlam
银牌会员
     阿林
积分 1410
发帖 497
注册 2004-6-28 来自 九龍,香港
状态 离线
|
『第 4 楼』:
答 案
使用 LLM 解释/回答一下
因 為 問 題 沒 有 說 甚 麼 語 言 , 我 假 設 是 在 談 匯 編 , 因 為 在 C 或 JAVA 環 境 下 要 向 系 統 分 配 64MB XMS 記 憶 應 該 挺 輕 鬆 的 , 匯 編 得 向 Jack Ellis 兄 詢 問 解 決 辦 法 :
Yes, they must load a V3.0 XMS manager, e.g. QHIMEM or V3.10+ HIMEM (MS-DOS V6.22+). They must use the program
steps shown below --
先 要 載 入 符 合 XMS 3.0 標 準 的 管 理 程 序 , 例 如 QHIMEM 或 HIMEM V3.10 ( MS-DOS V6.22 以 上 ) , 然 後 --
A) Find the "entry point" address of the XMS manager: ( 找 XMS 管 理 員 的 "進 入 地 址" )
XEnt: dd 0 ;XMS "entry address" holder. ( XMS "進 入 地 址" 儲 存 )
...
...
...
mov ax,04300h ;Inquire if we have an XMS manager. ( 有 沒 有 XMS 管 理 員 呢 ? )
int 02Fh
cmp al,080h ;Is an XMS manager installed? ( XMS 管 理 員 載 入 了 嗎 ? )
jne NoXMSDvr ;No? Take appropriate error action. ( 沒 有 就 宣 告 錯 誤 )
mov ax,04310h ;Get XMS manager "entry" address. ( 取 得 XMS 管 理 員 進 入 地 址 )
int 02Fh
push es ;Save XMS manager "entry" address ( 儲 存 起 "進 入 地 址" )
push bx ; in "XEnt" 32-bit word, above. ( 對 應 "XEnt" 32bit 字 組 )
pop XEnt
B) Ask the XMS manager for the desired XMS memory: ( 向 XMS 管 理 員 索 取 記 憶 體 )
mov ah,089h ;MUST use 089h (not 009h) for > 64-MB! ( 大 於 64MB 一 定 要 使 用 089h )
mov edx,MemKB ;MUST use EDX-reg. (not DX-reg.) for
; memory, which is number of KBytes. ( 一 定 要 使 用 EDX 暫 存 器 , 使 用 KBytes 為 單 位 )
call XEnt ;Call XMS manager with this request. ( 呼 叫 XMS 管 理 員 並 送 出 要 求 )
cmp ax,1 ;Did XMS manager return 1 = success? ( XMS 管 理 員 回 覆 1 嗎 ? 1 就 是 成 功 )
jne NoXMSMem ;No? Take appropriage error action. ( 宣 告 錯 誤 )
From then on, the steps to "lock" and use the XMS memory are the same
as for a V2.0 XMS manager and for using XMS memory blocks of 64-MB or
less. The IMPORTANT items are that the XMS "function code" used to
request over 64-MB of memory must be 089h (not 009h like before), and
the number of KBytes requested must be set in the 32-bit EDX register
(not the 16-bit DX register like before).
由 這 裡 開 始 , 鎖 定 64MB 以 下 的 XMS 記 憶 步 驟 和 XMS 2.0 是 一 樣 的 。
重 點 是 要 求 64MB 以 上 的 XMS 的 "功 能 號" 必 需 是 089h ( 並 非 一 般 的 009h ) , 並 必 需 將 正 確 的 KByte 數 字 設 定 在 32bit 的 EDX 暫 存 器 內 而 並 非 是 用 16bit 的 DX 暫 存 器 )
此帖被 +2 点积分 点击查看详情 评分人:【 byxyk 】 | 分数: +2 | 时间:2007-6-28 20:19 |
|
|

我 的 網 站 - http://optimizr.dyndns.org
|
|
2007-6-26 16:35 |
|
|
byxyk
初级用户
 
积分 112
发帖 54
注册 2007-6-18
状态 离线
|
|
2007-6-28 20:20 |
|
|
kinglin
初级用户
 
积分 62
发帖 28
注册 2007-7-3
状态 离线
|
|
2007-7-3 11:51 |
|