accepting numbers, text, and other symbols as user input
This commit is contained in:
parent
bac269c9c2
commit
1deb00495d
|
@ -16,7 +16,9 @@ void input()
|
|||
{
|
||||
int ch = getch();
|
||||
if (ch == '\n') { ch = '\r'; }
|
||||
if (ch == '\r' || (ch >= '0' && ch <= '9'))
|
||||
if (ch == '\r' || ch == '.' || ch == ':' ||
|
||||
(ch >= '0' && ch <= '9') ||
|
||||
(ch >= 'A' && ch <= 'Z'))
|
||||
{
|
||||
keyboard_buffer = ch | 0x80;
|
||||
keyboard_control = 0xFF;
|
||||
|
|
|
@ -307,6 +307,7 @@ void clv()
|
|||
void cmp()
|
||||
{
|
||||
// compare memory with accumulator
|
||||
C_SET;
|
||||
fetch_operand();
|
||||
operand = operand ^ 0xFF;
|
||||
adder(ac, operand);
|
||||
|
@ -315,6 +316,7 @@ void cmp()
|
|||
void cpx()
|
||||
{
|
||||
// compare memory and index x
|
||||
C_SET;
|
||||
fetch_operand();
|
||||
operand = operand ^ 0xFF;
|
||||
adder(x, operand);
|
||||
|
@ -323,6 +325,7 @@ void cpx()
|
|||
void cpy()
|
||||
{
|
||||
// compare memory and index y
|
||||
C_SET;
|
||||
fetch_operand();
|
||||
operand = operand ^ 0xFF;
|
||||
adder(y, operand);
|
||||
|
|
Loading…
Reference in New Issue