From 6bb50149642c7c530b955218664b0a8fe8d22724 Mon Sep 17 00:00:00 2001 From: Thiago Auler dos Santos Date: Tue, 28 Nov 2017 20:34:08 -0200 Subject: [PATCH] correcting BRK jump --- src/interface.c | 5 +++-- src/opcodes.c | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/interface.c b/src/interface.c index 4db10b6..feadaa6 100644 --- a/src/interface.c +++ b/src/interface.c @@ -21,8 +21,9 @@ void input() { int ch = getch(); - if (ch == 0x7F) { ch = '_'; } - if (ch == '\n') { ch = '\r'; } + if (ch == 0x107) { ch = '_'; } + if (ch == 0x7F) { ch = '_'; } + if (ch == '\n') { ch = '\r'; } if (ch >= 'a' && ch <= 'z') { ch = ch - 0x20; } if (ch == '\r' || (ch >= 0x20 && ch <= 0x7F)) diff --git a/src/opcodes.c b/src/opcodes.c index e4710b9..c266dd0 100644 --- a/src/opcodes.c +++ b/src/opcodes.c @@ -258,6 +258,7 @@ void brk() I_SET; push_word(pc); push_byte(sr); + pc = read_word(0xFFEF); } void bvc()