From 9cc4b363244b52b57676eb77f34367054d6b221e Mon Sep 17 00:00:00 2001 From: crc Date: Fri, 26 Jan 2018 17:04:41 +0000 Subject: [PATCH] rre, repl: haiku error messages FossilOrigin-Name: 8b6abe080b10e7b8cb3a60d38fed060a71ea5ad4b0281d81c6ab81dd96269bb5 --- interfaces/repl.c | 8 ++++++-- interfaces/rre.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/interfaces/repl.c b/interfaces/repl.c index 2791538..8ba31e0 100644 --- a/interfaces/repl.c +++ b/interfaces/repl.c @@ -274,8 +274,11 @@ void execute(int cell) { ip = cell; while (ip < IMAGE_SIZE) { if (ip == NotFound) { + retro_puts("\n"); + retro_puts("Rather than a beep\nOr a rude error message,\n"); + retro_puts("These words: 'word not found.'\n\nUnrecognized: "); retro_puts(string_extract(TIB)); - retro_puts(" ?\n"); + retro_puts("\n\n"); } opcode = memory[ip]; if (ngaValidatePackedOpcodes(opcode) != 0) { @@ -407,7 +410,8 @@ CELL ngaLoadImage(char *imageFile) { fclose(fp); } else { - retro_puts("Unable to find the ngaImage!\n"); + retro_puts("You step in the stream\nBut the water has moved on\n"); + retro_puts("Image file not found.\n"); exit(1); } return imageSize; diff --git a/interfaces/rre.c b/interfaces/rre.c index aef1f89..fb1c4fd 100644 --- a/interfaces/rre.c +++ b/interfaces/rre.c @@ -63,7 +63,7 @@ ---------------------------------------------------------------------*/ #define CELL int32_t /* Cell size (32 bit, signed integer */ -#define IMAGE_SIZE 524288 * 16 /* Amount of RAM. 8MiB by default. */ +#define IMAGE_SIZE 524288 * 32 /* Amount of RAM. 16MiB by default. */ #define ADDRESSES 2048 /* Depth of address stack */ #define STACK_DEPTH 512 /* Depth of data stack */ @@ -1144,7 +1144,11 @@ void execute(int cell) { ip = cell; while (ip < IMAGE_SIZE) { if (ip == NotFound) { - printf("%s ?\n", string_extract(TIB)); + printf("\n"); + printf("Rather than a beep\nOr a rude error message,\n"); + printf("These words: 'word not found.'\n\nUnrecognized: "); + printf("%s", string_extract(TIB)); + printf("\n\n"); } opcode = memory[ip]; if (ngaValidatePackedOpcodes(opcode) != 0) {