Reference Section
_check_key ...
if (_check_key())
{
_put_str ("\n\rKeystrokes are in the buffer--flushing");
_flush_keys ();
} else
_put_str ("\n\rNo keystrokes are in the buffer");
...
#include <inline.h>
{
...
check_key (); /* is keystroke pending? */
jnecheck_key_010/* n: display "No" message */
_put_str ("\n\rKeystrokes are in the buffer--flushing");
flush_keys ();
jmp short check_key_020
check_key_010:
_put_str ("\n\rNo keystrokes are in the buffer");
check_key_020:
...
}
Source file _DIOCHKE.ASM ASM equiv CHECK_KEY
...
if (_check_key ())
{
_put_str ("\n\rKeystrokes are in the buffer--flushing");
_flush_keys ();
}
else
_put_str ("\n\rNo keystrokes are in the buffer");
...
#include <inline.h>
check_key (); /* is a keystroke waiting? */
jnecheck_key_010/* n: write "no" message */
_put_str ("\n\rKeystrokes are in the buffer--flushing");
flush_keys ();
jmp short check_key_020
check_key_010:
_put_str ("\n\rNo keystrokes are in the buffer");
check_key_020:
...
Source file DIOFLKEY.ASM ASM equiv FLUSH_KEYS
{
char chr;
chr = _get_chr ();
if (chr != 0)
{
/* handle regular keystroke */
} else
{
chr = _get_chr ();
/* handle extended keystroke */
}
}
#include <inline.h>
get_chr (); /* AL = chr */
jc get_chr_010
... /* regular keystroke */
jmp short get_chr_020
get_chr_010:
... /* extended keystroke */
get_chr_020:
...
Source file _DIOGCHR.ASM ASM equiv GET_CHR
{
char chr;
if (_get_chra (&chr) == 0)
{
/* handle regular keystroke */
} else
{
/* handle extended keystroke */
}
}
#include <inline.h>
get_chr ();/* AL = new chr */
jc get_chr_010
... /* handle regular keystroke */
jmp short get_chr_020
get_chr_010:
... /* handle extended keystroke */
get_chr_020:
Source file _DIOGCHA.ASM ASM equiv GET_CHR
{
char chr;
if (!_get_chrae (&chr))
{
/* handle regular keystroke */
} else
{
/* handle extended keystroke */
}
}
#include <inline.h>
...
get_chre (); /* AL = chr, is chr extended? */
jc get_chre_010/* y: handle extended key */
... /* n: handle regular key */
jmp short get_chre_020
get_chre_010:
... /* handle extended keystroke */
get_chre_020:
...
Source file _DIOGCAE.ASM ASM equiv GET_CHRE
{
char chr;
chr = _get_chre ();
if (chr)
{
/* handle regular keystroke */
} else
{
chr = _get_chre ();
/* handle extended keystroke */
}
}
#include <inline.h>
...
get_chre ();/* AL = new chr, is chr extended? */
jc get_chre_010/* y: handle extended keys */
... /* n: handle regular keys */
jmp short get_chre_020
get_chre_010:
... /* handle extended keystroke */
get_chre_020:
...
Source file _DIOGCHE.ASM ASM equiv GET_CHRE
{
char str[10];
...
_get_str (str, 9);/* process the string */
...
}
#include <inline.h>
{
char str[10];
...
mov cl,9 /* CL = max # chars to read */
lea si,str /* SI -> str buffer */
get_str (); /* get a max of CL chars */
put_str (); /* write them to STDOUT */
...
}
Source file _DIOGSTR.ASM ASM equiv GET_STR
_put_beep ();
#include <inline.h>
put_beep ();
Source file DIOPBEEP.ASM ASM equiv PUT_BEEP
_put_chr ('c');/* write 'c' to STDOUT */
#include <inline.h>
mov al,'a'/* AL = char to write */
put_chr ();/* write it to STDOUT */
Source file _DIOPCHR.ASM ASM equiv PUT_CHR
_put_newline();
#include <inline.h>
put_newline();
Source file DIOPNLIN.ASM ASM equiv PUT_NEWLINE
char *str = "Hello, world";
_put_str(str)
#include <inline.h>
{
char str[10];
...
mov cl,9 /* CL = max # of chars to read */
lea si,str /* DS:SI -> str buffer */
get_str (); /* get a max of CL chars */
put_str (); /* write them to STDOUT */
... /* process the string */
}
Source file _DIOPSTR.ASM ASM equiv PUT_STR