中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
作者:
标题: DJGPP教程1 -- 介绍 上一主题 | 下一主题
Wengier
系统支持

“新DOS时代”站长


积分 27734
发帖 10521
注册 2002-10-9
状态 离线
『楼 主』:  DJGPP教程1 -- 介绍

For the first step I will discuss about programming VGA cards at a resolution of 320x200 with 256 colors. This is the magic BIOS mode 13h, simple to use and very efficiently. Next I'll explain how to use the BMP and PCX graphics format at this resolution, whit the basics about sprites and frames.
What  languages  should  I  use?  
Until writing programs under DOS or Linux the best choice about languages is the famous C/C++. I prefer it because is very powerful, fast and very simple to interface with assembly procedures. If I write programs under Windows I prefer Delphi because is very simple to use, but I hardly make programs under Windows. Only under DOS or Linux I can take the whole control of the keyboard, the timer, the graphics card with my own code. Instead under Windows I must use the code written by other (because this OS is very hardly to use) and I never can take the whole control of the machine. In my opinion the windows system is useful only for serious application, not for games. Pheraphs I know only a bit about this system, so I can say bad.

How  about  compilators?  
For years I've used Turbo C and next Borland C/C++. Those compilators was very good for the DOS machine: very fast in compiling and linking and easy to use. But the programs compiled with those compilers are limited by the 16 bit code. But since I've discovered Internet I've used the great DJGPP 32 bit compiler: fast, powerful and FREE! I think is the best choice if you haven't enough money to buy Watchom C/C++, another 32 bit compiler. Read the next paragraph for more information.

What  is  DJGPP?
DJGPP is a 32 bit compiler for the i386 (or better) processor based upon DOS system. It use an DPMI server which allows a 4 GByte flat address space and up to 256 MBytes of virtual memory. It's very similar to the GNU project for Linux. For details see the readme.1st downloaded from one of the following ftp servers.

You can download the files from a lot of ftp site. There are a list:


Country         Host                     Directory
---------       ----------------------   -------------------
Australia       ftp.iniaccess.net.au     /pub/simtelnet
Australia       ftp.tas.gov.au           /pub/simtelnet
Belgium         ftp.linkline.be          /mirror/simtelnet
Belgium         ftp.tornado.be           /pub/simtelnet
Brazil          ftp.unicamp.br           /pub/simtelnet
Canada          ftp.direct.ca            /pub/simtelnet
Canada          ftp.synapse.net          /pub/simtelnet
Czech Republic  pub.vse.cz               /pub/simtelnet
China           ftp.pku.edu.cn           /pub/simtelnet
England         micros.hensa.ac.uk       /pub/simtelnet
England         ftp.demon.co.uk          /pub/simtelnet
England         sunsite.doc.ic.ac.uk     /packages/simtelnet
Finland         ftp.funet.fi             /mirrors/ftp.simtel.net/pub/simtelnet
France          ftp.grolier.fr           /pub/simtelnet
France          ftp.ibp.fr               /pub/simtelnet
Germany         ftp.tu-chemnitz.de       /pub/simtelnet
Germany         ftp.uni-heidelberg.de    /pub/simtelnet
Germany         ftp.uni-paderborn.de     /pub/simtelnet
Germany         ftp.uni-trier.de         /pub/pc/mirrors/simtelnet
Hong Kong       ftp.hkstar.com           /pub/simtelnet
Hong Kong       sunsite.ust.hk           /pub/simtelnet
Italy           cis.utovrm.it            /simtelnet
Italy           ftp.unina.it             /pub/simtelnet
Japan           ftp.iij.ad.jp            /pub/simtelnet
Japan           ftp.riken.go.jp          /pub/simtelnet
Japan           ftp.saitama-u.ac.jp      /pub/simtelnet
Korea           ftp.nuri.net             /pub/simtelnet
Mexico          ftp.gdl.iteso.mx         /pub/simtelnet
Netherlands     ftp.nic.surfnet.nl       /mirror-archive/software/simtelnet
New Zealand     ftp.vuw.ac.nz            /pub/simtelnet
Poland          ftp.icm.edu.pl           /pub/simtelnet
Portugal        ftp.ip.pt                /pub/simtelnet
Portugal        ftp.ua.pt                /pub/simtelnet
Romania         ftp.sorostm.ro           /pub/simtelnet
Slovenia        ftp.arnes.si             /software/simtelnet
South Africa    ftp.is.co.za             /pub/simtelnet
South Africa    ftp.sun.ac.za            /pub/simtelnet
South Korea     ftp.nuri.net             /pub/simtelnet
South Korea     ftp.sogang.ac.kr         /pub/simtelnet
Sweden          ftp.sunet.se             /pub/simtelnet
Switzerland     nic.switch.ch            /mirror/simtelnet
Taiwan          ftp.ncu.edu.tw           /Packages/simtelnet
Taiwan          NCTUCCCA.edu.tw          /PC/simtelnet
Thailand        ftp.nectec.or.th         /pub/mirrors/simtelnet
US, California  ftp.digital.com          /pub/micro/pc/simtelnet
US, Illinois    uiarchive.cso.uiuc.edu   /pub/systems/pc/simtelnet
US, Mass.       ftp.bu.edu               /pub/mirrors/simtelnet
US, Michigan    oak.oakland.edu          /pub/simtelnet
US, Oklahoma    ftp.uoknor.edu           /pub/simtelnet
US, Oregon      ftp.orst.edu             /pub/simtelnet
US, Virginia    mirrors.aol.com          /pub/simtelnet



There are a list of file to dowload (link are referred to ftp.digital.com):
To build C programs, you'll need
djdev201.zip (1502Kb) - Basically libraryes and application
gcc2721b.zip (1071Kb) - The compiler binary
bnu281b.zip (1740Kb)- various utility
For C++
gpp2721b.zip (665Kb) - The C++ compiler binaries
lgp271b.zip (623Kb)
Other stuff:
txi390b.zip (455Kb) for the online manual (info)
csdpmi3b.zip (39Kb) if you don't have a DPMI server
faq210b.zip (389Kb) - The full FAQ list
alleg22.zip - A graphics library
rhide13b.zip (1451Kb) - An integrated IDE like Borland C for DJGPP (very useful)
mak375b.zip (204Kb) - Make utility
infng100.zip - Trasform info file to norton guide database
For more informations visit the official site.




Wengier - 新DOS时代

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

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

2003-5-14 00:00
查看资料  发送邮件  访问主页  发短消息 网志  OICQ (29206679)  编辑帖子  回复  引用回复
Dark-Destroy
元老会员





积分 8312
发帖 3551
注册 2003-3-22
状态 离线
『第 2 楼』:  

呵呵,我是E盲~~看不懂...



MSN:tiqit2@hotmail.com
2003-5-14 00:00
查看资料  发送邮件  访问主页  发短消息 网志   编辑帖子  回复  引用回复
红色狂想
金牌会员

龙哥DOS


积分 4289
发帖 1501
注册 2003-2-23
来自 河南省
状态 离线
『第 3 楼』:  

这我可看不懂!



C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
C++   ☆☆☆ 中国DOS联盟成员 ☆☆☆    C++
C++    ★★★ 爱提问的红色狂想 ★★★     C++
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
2003-5-14 00:00
查看资料  发送邮件  访问主页  发短消息 网志  OICQ (189236106)  编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: