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 00:58
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Address Issue of Program Segment for Files Larger Than 1M View 1,932 Replies 1
Original Poster Posted 2010-01-22 17:01 ·  中国 北京 联通
初级用户
Credits 36
Posts 12
Joined 2010-01-21 17:17
16-year member
UID 159186
Gender Male
Status Offline
Currently, a difficult problem, hope all the bosses can help take a look.
Problem description: An executable file A.exe outputs a string in graphics mode, and calls outtextxy in bgi16.dll to output the string. I rewrote outtextxy, passed the pointer value of the string to my custom interrupt, and wrote the address into the file in the interrupt.
During operation, it is found that the offset address is correct, but the segment address is far away.
A.exe itself is more than 1M. Through IDA analysis, it can be seen that the segment address at the string is almost breaking through FFFF, but the value obtained by the interrupt is only about 350, which is obviously incorrect. I hope the bosses can give pointers.
Floor 2 Posted 2010-01-29 15:53 ·  中国 北京 海淀区 联通
初级用户
Credits 36
Posts 12
Joined 2010-01-21 17:17
16-year member
UID 159186
Gender Male
Status Offline
I'll reply to myself. Finally, I found that this program uses DPMI. DPMI is the abbreviation of DOS PROTECTED MODE INTERFACE. Through it, applications can enter protected mode and achieve direct addressing of the entire physical memory (greater than 4G). When creating a project in BC 4.5, DOS (16-BIT DPMI) and DOS (32BIT DPMI) created are DPMI applications, and their operation requires the support of rtm.exe and dpmi16bi.ovl.
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
DOSforever +2 2010-02-03 18:48
Forum Jump: