ChaOS Header Files                     Back

accdis.html

accdis (accept-display) is the text display engine for ChaOS. It is derived from ACCEPT and DISPLAY used in COBOL. I never liked the standard C scanf and printf functions for formatted input/output, because their format strings are not interchangeable ( printf uses variable-sized arguments on the stack, whilst scanf uses pointers). In ChaOS the equivalent functions are accept and display, which both use 32-bit pointers as arguments - so format strings/argument lists for accepting and displaying data are identical. In addition accdis is strict on keystrokes and beeps to the user if a disallowed key is pressed. Special argument types for times and dates block invalid user input, e.g. 29/02/2009, by holding focus on the field until the user inputs a valid date/time, or all zeros

e.g. to prompt the user for two 6-digit decimal values to be stored in unsigned long ints a and b: 

accept("a=%6l, b=%6l",&a,&b);

e.g. to display two 6-digit decimal values be stored in unsigned long ints a and b: 

display("a=%6l, b=%6l",&a,&b);

argument types are indicated by % in the format string, like printf, and can be preceded by a sign and size indicator but the format types are different, here are some:

%8l = long (32-bit), 8 digits displayed

%5i  = short int (16-bit), 5 digits displayed

%+8P = signed Motorola long (big-endian) 8 digits displayed + sign

There are hundreds of permutations, to be fully documented. When I forget I just look at the accdis code

 bios.html

obsolete - prototypes for BIOS keyboard calls - used only when porting DOS4GW projects to ChaOS 

 boot.html

 structures and pointers to access info in the bootstrap

 bootmap.html

bootstrap 

 box.html

popup boxes for text screens

chaoskey.html

#defines for keystrokes generated by keyboard handler. NOTE: keystroke codes in ChaOS are not the same as those generated by BIOS interrupt 0x16

ctype.html

character types, used a lot by compilers

drive.html

generic mass storage, FAT and ext2 filesystems, also a custom ChaOS filesystem

 es.html

 editor

 os.html

 operating system structures, XEC file header

stdlib.html

malloc etc

string.html

string handling, memcpy etc