You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
/**
|
|
* Runtime configuration
|
|
*
|
|
* Created on 2021/11/13.
|
|
*/
|
|
|
|
#ifndef FORTH_FH_CONFIG_H
|
|
#define FORTH_FH_CONFIG_H
|
|
|
|
#define DATA_STACK_DEPTH 256
|
|
#define RETURN_STACK_DEPTH 256
|
|
#define MAX_NAME_LEN 32
|
|
#define HEAP_SIZE (1024*1024)
|
|
#define MAXLINE 65535
|
|
#define PAD_OFFSET 340 // why? copied from somewhere
|
|
#define WORDBUF_SIZE 256
|
|
#define INPUT_BUFFER_SIZE 256
|
|
#define MIN_PAD_SIZE 256
|
|
|
|
#define CELL 4
|
|
|
|
#define HEAP_END (HEAP_SIZE - WORDBUF_SIZE - INPUT_BUFFER_SIZE)
|
|
#define WORDBUF_ADDR HEAP_END
|
|
#define WORDBUF_LASTCHAR_ADDR (WORDBUF_ADDR + WORDBUF_SIZE - 1)
|
|
#define INPUTBUF_ADDR (HEAP_END + WORDBUF_SIZE)
|
|
|
|
// SFR and magic addresses are "negative"
|
|
#define MAGICADDR_EXEC_INTERACTIVE 0xFFFFFFFFULL
|
|
#define MAGICADDR_DICTFIRST 0xFFFFd1c7ULL
|
|
#define MAGICADDR_BASE 0xFFFFBA5EULL
|
|
#define MAGICADDR_HERE 0xFFFF4E7EULL
|
|
#define MAGICADDR_STATE 0xFFFF57a7ULL
|
|
#define MAGICADDR_INPTR 0xFFFFF175ULL
|
|
#define MAGICADDR_UNRESOLVED 0xFFFFFBADULL
|
|
#define MAGICADDR_ENDCASE_UNRESOLVED 0xFFFC5BADULL
|
|
|
|
#define FH_PROMPT_STR "> "
|
|
|
|
#endif //FORTH_FH_CONFIG_H
|
|
|