China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 06:49
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » You can directly access 4GB of memory like this in real mode View 1,517 Replies 4
Original Poster Posted 2003-12-23 00:00 ·  中国 江苏 南京 电信
初级用户
Credits 122
Posts 6
Joined 2003-02-03 00:00
23-year member
UID 837
Gender Male
Status Offline
Make sure config.sys contains
device=c:\dos\himem.sys
dos=high
There absolutely must not be emm386.exe.
This ensures the CPU is in real mode rather than V86 mode, and that A20 is also enabled.

Then you can do whatever you want in the program, for example
xor ax,ax
mov ds,ax
mov eax,12345678h
mov bx,
mov esi,40000000h
dec dword ptr

Unfortunately, none of the high-level language development tools under DOS support this kind of data access method, so
you can only use assembly.
Floor 2 Posted 2003-12-23 00:00 ·  美国
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Would it be possible to write a patch program for real-mode C compilers like TC and BC?
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 3 Posted 2004-01-14 00:00 ·  中国 北京 北京云方舟科技有限公司
初级用户
Credits 177
Posts 32
Joined 2003-10-06 00:00
22-year member
UID 10774
Status Offline
In real mode you can use the XMS interface to access it
but I still recommend using Watcom or djgpp.
http://wex.cn/dwing
Floor 4 Posted 2004-03-23 00:00 ·  中国 上海 嘉定区 电信
初级用户
Credits 110
Posts 5
Joined 2004-03-23 00:00
22-year member
UID 20883
Gender Male
Status Offline
Question for DWING in post #3: what method can WATCOM use to do this? The function is very simple, I just need to access data in memory beyond the 1MB range. I currently have no idea where to start.
Floor 5 Posted 2004-03-24 00:00 ·  中国 上海 松江区 电信
初级用户
Credits 110
Posts 5
Joined 2004-03-23 00:00
22-year member
UID 20883
Gender Male
Status Offline
I already figured out how to access it, and now I'm starting to appreciate how powerful WATCOM is.
Forum Jump: