![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-10-31 18:51 |
共 47,815 主题排行 / 349,930 发帖 / 今日 0 篇 / 48,290 会员排行 |
| DOS开发编程 & 发展交流 (开发室) » XMS分配大于64M问题 |
| 可打印版本 1,436 / 5 |
| 第1楼 byxyk | 发表于 2007-06-19 21:40 |
| 初级用户 发帖 54 积分 112 | |
|
XMS分配大于64M问题 如何使XMS分配大于64M空间?XMS3.0规范吗?具体调用格式是怎样的?
有知道的同志,请不吝指教! |
|
| 第2楼 xuxuezeng | 发表于 2007-06-25 12:12 |
| 新手上路 发帖 9 积分 18 | |
|
我也想知道,但是好像没发现哟!
|
|
| 第3楼 duanml | 发表于 2007-06-25 17:02 |
| 中级用户 发帖 112 积分 231 | |
|
什么意思啊?
我在1998年的时候,将老机器的内存从16M扩到80M的时候,用dos622的himem.sys只能分配到64M,但是用win98(4.10.1998)的himem.sys就能分配到80M了。 |
|
| 第4楼 johnsonlam | 发表于 2007-06-26 16:35 |
| 银牌会员 发帖 497 积分 1,410 来自 九龍,香港 | |
|
答 案 因 為 問 題 沒 有 說 甚 麼 語 言 , 我 假 設 是 在 談 匯 編 , 因 為 在 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 暫 存 器 ) |
|
| 第5楼 byxyk | 发表于 2007-06-28 20:20 |
| 初级用户 发帖 54 积分 112 | |
|
谢谢johnsonlam。
|
|
| 第6楼 kinglin | 发表于 2007-07-03 11:51 |
| 初级用户 发帖 28 积分 62 | |
|
帮顶
|
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |