中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-10-31 06:27
47,815 topics / 349,930 posts / today 0 new / 48,290 members
DOS开发编程 & 发展交流 (开发室) » The Terminator of DOS Interface Development
Printable Version  100,774 / 290
Floor76 zhgwbzhd Posted 2005-12-20 19:50
高级用户 Posts 187 Credits 506
Still getting an error. But this time it didn't crash. Still thanks to Guo Heng.
Floor77 LiveOnLove Posted 2005-12-20 22:40
中级用户 Posts 161 Credits 493 From ZHCN
Studying...
Floor78 lyq Posted 2006-01-09 10:19
初级用户 Posts 14 Credits 44
Guo Daxia! You're really awesome, it makes me so happy!!!, I'm kissing you hard
Floor79 GONGXP Posted 2006-01-21 21:15
初级用户 Posts 31 Credits 184
Winsail is really great, but where does the compiled program run? If the mouse and keyboard are not moved, it freezes after a while. Does it have to bring:
//Register Callback Function for Window
pDialog->SetTimeFc(NULL);//Register timer callback function
pDialog->SetDrawFc(NULL);//Register drawing callback function
pDialog->SetHelpFc(NULL);//Register help callback function
pDialog->SetKeyboardFc(NULL);//Register virtual keyboard callback function
Floor80 coolboy163 Posted 2006-02-16 14:45
初级用户 Posts 74 Credits 176
Wow, this is powerful,
But, I don't understand, heh heh
Floor81 firstsail Posted 2006-04-17 11:10
高级用户 Posts 295 Credits 668 From 广东深圳
```c
#include <string.h>

#include <Symbol.h>
#include <Memory.h>


extern unsigned _stklen = 50L * 1024L;


int main()
{
// Create a default page frame of 256 bytes
CXmsMemory mXmsMemory;

// Allocate a new memory block as a new page frame. The larger the page frame, the faster the access to XMS
BYTE* pNewBlock = new BYTE[2048];
// The user's default page frame is 256 bytes, change the page frame to 2048 bytes
BYTE* pOldBlock = mXmsMemory.ChangeFrame(pNewBlock, 2048);
// Delete the old page frame
delete pOldBlock;

// Allocate 200K bytes of XMS memory
mXmsMemory.SetSize(200L, 1024L);

// Increase 100K of XMS memory (300 = 200 + 100)
mXmsMemory.SetSizeEx(300L, 1024L);


// Write the string "My name is LiPing!" to the position with byte - unit index "120030L"
char buf[100] = "My Name is LiPing!";
mXmsMemory.SetByteData(120030L, (BYTE *)buf, _fstrlen(buf) + 1);

// Read the string "My name is LiPing!" from the position with byte - unit index "120030L"
_fmemset((BYTE *)buf, 0, 100);
mXmsMemory.GetByteData(120030L, (BYTE *)buf, 100);
printf("\n S = \"%s\"", buf);
getch();

// Release the allocated XMS memory block
mXmsMemory.FreeXms();

return(0);
}
```
Floor82 jawbin Posted 2006-04-24 09:57
高级用户 Posts 444 Credits 994
How to use it on pcm3486?
Floor83 firstsail Posted 2006-04-24 12:46
高级用户 Posts 295 Credits 668 From 广东深圳
In the XMS module, the global variable int nAfxXmsStyle is the variable that controls the default XMS memory allocation mode.
nAfxXmsStyle = XMSMEMORY_STYLE_MORAL (=0) means the default XMS
Floor84 firstsail Posted 2006-04-24 12:58
高级用户 Posts 295 Credits 668 From 广东深圳
In the XMS module, the global variable int nAfxXmsStyle is the variable that controls the default XMS memory allocation mode.

nAfxXmsStyle = 0 (=XMSMEMORY_STYLE_MORAL) means default XMS

nAfxXmsStyle = 1 (=XMSMEMORY_STYLE_DISK) means disk XMS

nAfxXmsStyle = 2 (=XMSMEMORY_STYLE_EMSCARD) means the extended memory card of PCM3486

If you call the "InitSystem()" function, it will analyze the "XmsStyle" key in the "Boot" section of the "Config.Sys" file.


Actually, you can call CXmsMemory::SetXmsStyle() to change the XMS property, and it must be called before the following functions:

CXmsMemory::SetSize()

CXmsMemory::SetSizeEx()

CXmsMemory::MallocXms() function

//---------------------------------------------

#include <string.h>

#include <Symbol.h>
#include <Memory.h>


extern unsigned _stklen = 50L * 1024L;

extern int nAfxXmsStyle;
int main()
{
nAfxXmsStyle = XMSMEMORY_STYLE_DISK; // Use disk emulated XMS memory


// Create a default frame with 256 bytes
CXmsMemory mXmsMemory;

// Allocate a new memory block as a new frame. The larger the frame, the faster the access to XMS
BYTE* pNewBlock = new BYTE[2048];
// The user's default frame is 256 bytes, change the frame to 2048 bytes
BYTE* pOldBlock = mXmsMemory.ChangeFrame(pNewBlock, 2048);
// Delete the old frame
delete pOldBlock;

// Allocate 200K bytes of XMS memory
mXmsMemory.SetSize(200L, 1024L);

// Increase 100K of XMS memory (300 = 200 + 100)
mXmsMemory.SetSizeEx(300L, 1024L);


// Write the string "My name is LiPing1!" to the position with byte-based index "120030L"
char buf[100] = "My Name is LiPing1!";
mXmsMemory.SetByteData(120030L, (BYTE *)buf, _fstrlen(buf) + 1);

// Read the string "My name is LiPing1!" from the position with byte-based index "120030L"
_fmemset((BYTE *)buf, 0, 100);
mXmsMemory.GetByteData(120030L, (BYTE *)buf, 100);
printf("\n S = \"%s\"", buf);


// If running on an ordinary PC, you can change the memory to XMS
mXmsMemroy.FreeXms();
mXmsMemory.SetXmsStyle(XMSMEMORY_STYLE_NORMAL); // If it is PCM3486, change to XMSMEMORY_STYLE_EMSCARD
mXmsMemory.SetSize(300L, 1024L);

// Write the string "My name is LiPing2!" to the position with byte-based index "120030L"
_fmemcpy(buf, "My Name is LiPing2!");
mXmsMemory.SetByteData(120030L, (BYTE *)buf, _fstrlen(buf) + 1);

// Read the string "My name is LiPing2!" from the position with byte-based index "120030L"
_fmemset((BYTE *)buf, 0, 100);
mXmsMemory.GetByteData(120030L, (BYTE *)buf, 100);
printf("\n S = \"%s\"", buf);


getch();

// Release the allocated XMS memory block
mXmsMemory.FreeXms();

return(0);
}
Floor85 LLing Posted 2006-06-03 13:25
新手上路 Posts 1 Credits 2 From 广东深圳
What a great thing!

Having searched far and wide without finding it, now I get it without any effort!

Thanks a lot to the LZ for selfless dedication!
Floor86 firstsail Posted 2006-07-17 18:33
高级用户 Posts 295 Credits 668 From 广东深圳
Excuse me, moderator, how to insert pictures in the post?
Floor87 profree Posted 2006-07-17 22:08
中级用户 Posts 132 Credits 478
to firstsail: It is strongly suggested that you create an integrated development environment, just like boywindows and qbwin, etc. This would be more convenient. Although the code generated by converting with your program to VC++, I think it is not bad, but not very good. So if you have time, a strong suggestion!!!!!
Floor88 johnsonlam Posted 2006-07-22 11:49
银牌会员 Posts 497 Credits 1,410 From 九龍,香港
Firstsail's interface is really great. It is hoped that these domestic experts can participate in world - class projects like ReactOS... On one hand, it won't be exploited by Microsoft, and on the other hand, it will also bring honor to the Chinese people!
Floor89 LLM545 Posted 2006-07-24 09:09
新手上路 Posts 1 Credits 2
Please provide the Chinese text that needs to be translated.
Floor90 profree Posted 2006-07-25 00:44
中级用户 Posts 132 Credits 478
Boss, why are there no replies?
Prev  1 … 3 4 5 6 7 8 9 … 20  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023