Function name: kbhit
Function: check the current key pressed
Usage: int kbhit (void);
Program example:
# Include
int main (void)
(
cprintf ("Press any key to continue:");
while (! kbhit ()) / bin / boot / dev / etc / home / lib / lost + found / media / misc / mnt / net / opt / proc / root / sbin / selinux / srv / sys / tmp / u01 / usr / var / vmware do nothing backup / bin / conf / data / log / maint / svn / tmp /;
cprintf ("rnA key was pressed ... rn");
return 0;
)
Function name: keep
Function: quit and continued presence
Usage: void keep (int status, int size);
Program example:
/ *** NOTE:
This is an interrupt service routine. You
can NOT compile this program with Test
Stack Overflow turned on and get an
executable file which will operate
correctly. Due to the nature of this
function the formula used to compute
the number of paragraphs may not
necessarily work in all cases. Use with
care! Terminate Stay Resident (TSR)
programs are complex and no other support
for them is provided. Refer to the
MS-DOS technical documentation
for more information. backup / bin / conf / data / log / maint / svn / tmp /
# Include
/ Bin / boot / dev / etc / home / lib / lost + found / media / misc / mnt / net / opt / proc / root / sbin / selinux / srv / sys / tmp / u01 / usr / var / vmware The clock tick interrupt backup / bin / conf / data / log / maint / svn / tmp /
# Define INTR 0x1C
/ Bin / boot / dev / etc / home / lib / lost + found / media / misc / mnt / net / opt / proc / root / sbin / selinux / srv / sys / tmp / u01 / usr / var / vmware Screen attribute (blue on grey) backup / bin / conf / data / log / maint / svn / tmp /
# Define ATTR 0x7900
/ Bin / boot / dev / etc / home / lib / lost + found / media / misc / mnt / net / opt / proc / root / sbin / selinux / srv / sys / tmp / u01 / usr / var / vmware reduce heaplength and stacklength
to make a smaller program in memory backup / bin / conf / data / log / maint / svn / tmp /
extern unsigned _heaplen = 1024;
extern unsigned _stklen = 512;
void interrupt (* oldhandler) (void);
void interrupt handler (void)
(
unsigned int (far * screen) [80];
static int count;
/ Bin / boot / dev / etc / home / lib / lost + found / media / misc / mnt / net / opt / proc / root / sbin / selinux / srv / sys / tmp / u01 / usr / var / vmware For a color screen the video memory
is at B800: 0000. For a monochrome
system use B000: 000 backup / bin / conf / data / log / maint / svn / tmp /
screen = MK_FP (0xB800, 0);
/ Bin / boot / dev / etc / home / lib / lost + found / media / misc / mnt / net / opt / proc / root / sbin / selinux / srv / sys / tmp / u01 / usr / var / vmware increase the counter and keep it
within 0 to 9 backup / bin / conf / data / log / maint / svn / tmp /
count + +;
count% = 10;
/ Bin / boot / dev / etc / home / lib / lost + found / media / misc / mnt / net / opt / proc / root / sbin / selinux / srv / sys / tmp / u01 / usr / var / vmware put the number on the screen backup / bin / conf / data / log / maint / svn / tmp /
screen [0] [79] = count +''0''+ ATTR;
/ Bin / boot / dev / etc / home / lib / lost + found / media / misc / mnt / net / opt / proc / root / sbin / selinux / srv / sys / tmp / u01 / usr / var / vmware call the old interrupt handler backup / bin / conf / data / log / maint / svn / tmp /
oldhandler ();
)
int main (void)
(
/ Bin / boot / dev / etc / home / lib / lost + found / media / misc / mnt / net / opt / proc / root / sbin / selinux / srv / sys / tmp / u01 / usr / var / vmware get the address of the current clock
tick interrupt backup / bin / conf / data / log / maint / svn / tmp /
oldhandler = getvect (INTR);
/ Bin / boot / dev / etc / home / lib / lost + found / media / misc / mnt / net / opt / proc / root / sbin / selinux / srv / sys / tmp / u01 / usr / var / vmware install the new interrupt handler backup / bin / conf / data / log / maint / svn / tmp /
setvect (INTR, handler);
/ Bin / boot / dev / etc / home / lib / lost + found / media / misc / mnt / net / opt / proc / root / sbin / selinux / srv / sys / tmp / u01 / usr / var / vmware _psp is the starting address of the
program in memory. The top of the stack
is the end of the program. Using _SS and
_SP Together we can get the end of the
stack. You may want to allow a bit of
saftey space to insure that enough room
is being allocated ie:
(_SS + ((_SP + Safety space) / 16) - _psp)
backup / bin / conf / data / log / maint / svn / tmp /
keep (0, (_SS + (_SP/16) - _psp));
return 0;
)
Recommended links:
UML: the perfect combination with The Zachman
Graduates felt the "job card" applauded
Dynamic change CBA BUTTON
Selected Examples Of Flash Mouse Effects (5)
for you Graphic
P2P Popular series of four
YouTube to WMV
3G really do lead to economic disaster
recover deleted sms phone memory
AVI to MKV
Stealing "technology" take "clever" with CorelDraw
Audio Recorders reviews
Photoshop Retouching Images (e) Remove Color Cast
Matroska to MPEG
FRONTPAGE2000 Jianzhan contrast detail - Relative 98
No comments:
Post a Comment