rre, repl: haiku error messages

FossilOrigin-Name: 8b6abe080b10e7b8cb3a60d38fed060a71ea5ad4b0281d81c6ab81dd96269bb5
This commit is contained in:
crc 2018-01-26 17:04:41 +00:00
parent 1b12afda39
commit 9cc4b36324
2 changed files with 12 additions and 4 deletions

View file

@ -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;

View file

@ -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) {