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-07-31 20:46
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Ask: How to close the UCDOS prompt bar in the graphical interface of UCSDK for C View 2,756 Replies 4
Original Poster Posted 2004-10-23 00:00 ·  中国 广东 深圳 电信
初级用户
Credits 124
Posts 6
Joined 2004-09-09 00:00
21-year member
UID 31260
Gender Male
Status Offline
I used the UCDOS SDK for C to make a Win window graphic interface, but there is always a UCDOS prompt bar at the bottom. I would like to ask you all which function can be used to turn it off and make the graphics fill the screen.
Floor 2 Posted 2004-11-11 00:00 ·  中国 湖北 天门 电信
中级用户
★★
绝不写垃圾帖
Credits 322
Posts 99
Joined 2004-07-03 00:00
22-year member
UID 27774
Gender Male
From 湖北
Status Offline
This is found from UCDOS. The middle ClearPromptLine(int Color) should be able to do it, set Color to your background color.

#include <stdio.h>
#include <dos.h>

int IsUcdosResident(void)
{
union REGS regs; regs.x.ax = 0xdb00;
int86(0x2f,&regs,&regs);
return regs.x.bx == 0x5450;
}void SetPromptLineColor(int Color1,int Color2,int Color3,int Color4)
{
union REGS regs; regs.x.ax = 0xff0f;
regs.h.bl = 0x8b;
regs.h.cl = Color1;
regs.h.ch = Color2;
regs.h.dl = Color3;
regs.h.dh = Color4;
int86(0x10,&regs,&regs);
}void InitPromptLine(void)
{
union REGS regs; regs.x.ax = 0xff07;
int86(0x16,&regs,&regs);
}void ClearPromptLine(int Color)
{
union REGS regs; regs.x.ax = 0xff10;
regs.h.bl = 0;
regs.h.bh = Color;
int86(0x10,&regs,&regs);
}void WritePromptMoreChar(char ch,int Color,int Count)
{
union REGS regs; regs.x.ax = 0xff10;
regs.h.bl = 1;
regs.h.bh = Color;
regs.x.cx = Count;
regs.h.dl = ch;
int86(0x10,&regs,&regs);
}void WriteUcdosPromptLine(const char *msg)
{
// char msg="一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五";
if (IsUcdosResident()) {
char *p;
SetPromptLineColor(0x17,0x11,0x1c,0xb1);
InitPromptLine();
ClearPromptLine(0x7);
for (p=msg;*p;p++)
WritePromptMoreChar(*p,0xb4,1);
}
else {
printf("The UCDOS is not residented.\n");
}
}
从95年开始用DOS3.2,96年在Windows3.1里认识了鼠标,97年开始用Win95,98年装过NetWare,99年迷过Linux,现在用WinXP、WinME和DOS7.1。一回首,从盲到忙,从忙到茫。
Floor 3 Posted 2004-11-11 00:00 ·  中国 广东 深圳 电信
初级用户
Credits 124
Posts 6
Joined 2004-09-09 00:00
21-year member
UID 31260
Gender Male
Status Offline
Thanks a lot, finally met an expert. For this problem, my head is almost broken. Getting the expert's guidance is like being in the spring breeze, just one word "cool". May I ask where the above code can be found, or what tool is used for decompilation? Little brother is inexperienced, hope to get more advice, and express thanks again.
Floor 4 Posted 2005-12-30 14:05 ·  中国 福建 厦门 电信
新手上路
Credits 17
Posts 9
Joined 2005-12-27 18:17
20-year member
UID 47990
Status Offline
Thank you very much. Recently I just happened to use it
Floor 5 Posted 2010-12-16 15:59 ·  中国 辽宁 大连 中移铁通
新手上路
Credits 8
Posts 4
Joined 2010-11-11 14:15
15-year member
UID 177336
Gender Male
Status Offline
Thank you very much. I just happened to use it recently
Forum Jump: