Gillius's Programming

Information

You could call this a sort of "dictionary." Basically some additional explanation of some topics.

Thanks goes out the Beej's sockets for a lot of my internet understanding.

Contents

Allegro
ANSI Standard Compiler
BIOS
CWSDPMI
DJGPP
DPMI
IP
Libsocket
Socket
TCP
UDP

Allegro

Input/output library for the DJGPP compiler and others now supported with the new multi-platform Allegro. This library provides the foundations for games: keyboard controls, mouse, joystick, timing functions, video output and drawing, compressed datafiles (contain BMPs, JPGS, WAVs or any other type), sound output, sound recording, basic GUI functions, and much more. I use this library for my DOS and Windows-based games. See its page from the Links Page.

ANSI Standard Compiler

This is really a fancy term that SHOULD apply to any compiler. C++ standards come from ANSI, and all compilers follow this standard to ensure that a program can cross-compile on different compilers and sometimes different platforms. Every major compiler is (or should be) ANSI compatable, as well as any other compiler worth the disk space it takes up.

The important things ANSI agrees upon is not only the syntax of the lanuguage but the features/includes, such as deciding the interface to cout and what exactly the commands are called and what they do.

BIOS

The BIOS, Basic Input/Output System, provides exactly what it says. It allows a program to display text and colors on the screen, as well as simple keyboard input and printer/COM output, without the programmer needing to know what video card or devices existed in the system.

Today the main function of BIOS is in the start of the computer -- in the bootup sequence before the OS starts up. Other than that the BIOS has been virtually outdated since the invent of Windows and other GUI systems, as it works only in text-based modes, and only support COM speeds up to 9600bps -- completely inadequate for todays 28800bps and higher modems, yet it remains a very basic and essential part of the system.

CWSDPMI

CWSDPMI's main function is to provide a DPMI and virtual memory functions in DOS. Windows has this functionality built-in, so protected mode programs running in straight DOS rather than in the Windows DOS box need this program. Since most people are running a version of Windows, this program is not included by default into my programs.

DJGPP

DJGPP is a free ANSI compatable C/C++ and assembly compiler made to compiler true 32 bit protected mode applications in DOS. It is based off of the GNU GCC compiler, a totally free compiler.

Why DOS? Well learning programming is MUCH easier and much simpler in DOS, where one line can output something to the user, whereas a Windows GUI application requires a few hundred lines simply to show a dialog windows. However, with Windows this is a one-time overhead -- so DOS is best used for very simple and small applications and Windows for large and extensive applications. When I programmed in DJGPP and Allegro, I did so mainly because I lacked the knowledge and resources (a Windows C++ compiler) to make the programs in Windows.

IP

Stands for Internet Protocol. This is the protocol which deals with the specific routing from computer to computer over the internet.

DPMI

DPMI stands for DOS protected mode interface. This allows for calls to DOS and BIOS for things like input and output to the screen, printer, mouse, and more. A DPMI server also manages the program's memory allocation, and can do things such as: detecting dereferenced NULL pointers and setting up virtual memory.

Libsocket

Libsocket is in my opinion the only decent DOS networking library available to DJGPP that accesses Winsock and the Windows TCP/IP stack, and it simulates a BSD sockets implementation (you find this on UNIX machines). The reason why this is so difficult is because to access Windows in DOS requires a hack, which may or may not work on a certain version of Windows. Right now Libsockets's Winsock 1 (Early Windows 95 versions) support is very good, its Winsock 2 (Windows 95B and Windows 98) support provided through a helper virtual device program is mediocre, but it's Windows NT support is non-existant because the hack does not work in NT. This is the library I am using in my game Project V2143, as it is the only DOS networking library that works ... at all.

Socket

A socket is a file descriptor which communcates with other computers over a network (usually internet, but also LANs). All I/O goes through a file descriptor in Unix, and sockets work much like any other -- as sequencial "streams" of data just like STDIN and files you can open.

TCP

TCP stands for Transmission Control Protocol. This is the most widely used protocol on the internet. This protocol makes the internet connection act like a data stream, and is used in some multiplayer games, and most commonly in HTTP (the protocol you are using to view this page). Packets using the TCP protocol will always arrive arrive at their destination if it is at all possible to communicate. The packets will arrive error free and in order. The only downside to TCP is higher overhead than other internet protocols, and that computers must be constantly "connected."

UDP

UDP is commonly associated with datagram sockets, and the FTP protocol. It stands for User Datagram Protocol. Two computers do not have to be connected to use the UDP, all that is needed is simply the IP address of the other computer. This allows for transfer (or a sort of "broadcast") to a high number of computers, through only a single, unconnected socket. Unlike TCP packets, UDP packets can arrive out of order (late) or not ever arrive at all (packet loss). The advantage to this? If the program is forgiving enough to let packets go, or has a buffer to allow for resends, the UDP protocol is a much faster and efficent way to communicate, since it requires much less overhead (UDP packets can be much smaller than TCP, resulting in less bandwith and time needed). This protocol is very popular with live updating or broadcasting software, and also in many multiplayer games, where the smaller UDP packets can be sent more often and using less time, resulting in much lower ping times with more network updates a second.