Reference Section
_is_instr {
char chr = _to_upper (_get_chr());
if (chr == 0)
_get_chr ();/* get extended chars also */
else
{
if (!_is_instr (chr, "ABCD"))
{
_put_str ("Invalid selection\n\r");
}
else
{
/* process the keystroke */
}
}
...
}
#include <inline.h>
{
char string[] = "beam me up...!";
...
lea si,string
get_chr (); /* AL = chr */
is_instr (); /* is chr in string? */
je instr_020/* y: handle the keystroke */
_put_str ("Invalid selection");
/* n: give message and exit */
put_newline ();
jmp instr_040
instr_020:
/* Handle the keystroke */
instr_040:
...
}
Source file _CHISINS.ASM ASM equiv IS_INSTR
{
char chr = _get_chr ();
if (chr == 0)
_get_chr (); /* get extended chars also */
chr = _to_lower (chr); /* Process the lowercase keystroke */
}
#include <inline.h>
...
get_chr (); /* AL = character*/
to_lower (); /* AL = converted chr*/
/* Handle the keystroke */
...
Source file _CHTOLWR.ASM ASM equiv TO_LOWER
{
char chr = _get_chr ();
if (chr == 0)
_get_chr (); /* get extended chars also */
chr = _to_upper (chr); /* Process the uppercase keystroke */
}
#include <inline.h>
get_chr (); /* AL = character*/
to_upper (); /* AL = converted chr*/
/* Handle the keystroke */
Source file _CHTOUPR.ASM ASM equiv TO_UPPER