| /src/stand/ficl/ |
| H A D | words.c | 57 static void colonParen(FICL_VM *pVM); 58 static void literalIm(FICL_VM *pVM); 59 static int ficlParseWord(FICL_VM *pVM, STRINGINFO si); 78 static void doLocalIm(FICL_VM *pVM); 79 static void do2LocalIm(FICL_VM *pVM); 89 static void markBranch(FICL_DICT *dp, FICL_VM *pVM, char *tag) in markBranch() argument 96 static void markControlTag(FICL_VM *pVM, char *tag) in markControlTag() argument 102 static void matchControlTag(FICL_VM *pVM, char *tag) in matchControlTag() argument 106 vmCheckStack(pVM, 1, 0); in matchControlTag() 108 cp = (char *)stackPopPtr(pVM->pStack); in matchControlTag() [all …]
|
| H A D | tools.c | 84 static void vmSetBreak(FICL_VM *pVM, FICL_BREAKPOINT *pBP) in vmSetBreak() argument 86 FICL_WORD *pStep = ficlLookup(pVM->pSys, "step-break"); in vmSetBreak() 89 pBP->address = pVM->ip; in vmSetBreak() 90 pBP->origXT = *pVM->ip; in vmSetBreak() 91 *pVM->ip = pStep; in vmSetBreak() 98 static void debugPrompt(FICL_VM *pVM) in debugPrompt() argument 100 vmTextOut(pVM, "dbg> ", 0); in debugPrompt() 153 static FICL_WORD *findEnclosingWord(FICL_VM *pVM, CELL *cp) in findEnclosingWord() argument 156 FICL_DICT *pd = vmGetDict(pVM); in findEnclosingWord() 186 static void seeColon(FICL_VM *pVM, CELL *pc) in seeColon() argument [all …]
|
| H A D | float.c | 58 static void Fadd(FICL_VM *pVM) in Fadd() argument 63 vmCheckFStack(pVM, 2, 1); in Fadd() 75 static void Fsub(FICL_VM *pVM) in Fsub() argument 80 vmCheckFStack(pVM, 2, 1); in Fsub() 92 static void Fmul(FICL_VM *pVM) in Fmul() argument 97 vmCheckFStack(pVM, 2, 1); in Fmul() 109 static void Fnegate(FICL_VM *pVM) in Fnegate() argument 114 vmCheckFStack(pVM, 1, 1); in Fnegate() 125 static void Fdiv(FICL_VM *pVM) in Fdiv() argument 130 vmCheckFStack(pVM, 2, 1); in Fdiv() [all …]
|
| H A D | loader.c | 67 ficlSetenv(FICL_VM *pVM) in ficlSetenv() argument 76 vmCheckStack(pVM, 4, 0); in ficlSetenv() 78 names = stackPopINT(pVM->pStack); in ficlSetenv() 79 namep = (char*) stackPopPtr(pVM->pStack); in ficlSetenv() 80 values = stackPopINT(pVM->pStack); in ficlSetenv() 81 valuep = (char*) stackPopPtr(pVM->pStack); in ficlSetenv() 86 vmThrowErr(pVM, "Error: out of memory"); in ficlSetenv() 91 vmThrowErr(pVM, "Error: out of memory"); in ficlSetenv() 104 ficlSetenvq(FICL_VM *pVM) in ficlSetenvq() argument 113 vmCheckStack(pVM, 5, 0); in ficlSetenvq() [all …]
|
| H A D | vm.c | 69 void vmBranchRelative(FICL_VM *pVM, int offset) in vmBranchRelative() argument 71 pVM->ip += offset; in vmBranchRelative() 82 FICL_VM *vmCreate(FICL_VM *pVM, unsigned nPStack, unsigned nRStack) in vmCreate() argument 84 if (pVM == NULL) in vmCreate() 86 pVM = (FICL_VM *)ficlMalloc(sizeof (FICL_VM)); in vmCreate() 87 assert (pVM); in vmCreate() 88 memset(pVM, 0, sizeof (FICL_VM)); in vmCreate() 91 if (pVM->pStack) in vmCreate() 92 stackDelete(pVM->pStack); in vmCreate() 93 pVM->pStack = stackCreate(nPStack); in vmCreate() [all …]
|
| H A D | fileaccess.c | 19 static void pushIor(FICL_VM *pVM, int success) in pushIor() argument 26 stackPushINT(pVM->pStack, ior); in pushIor() 31 static void ficlFopen(FICL_VM *pVM, char *writeMode) /* ( c-addr u fam -- fileid ior ) */ in ficlFopen() argument 33 int fam = stackPopINT(pVM->pStack); in ficlFopen() 34 int length = stackPopINT(pVM->pStack); in ficlFopen() 35 void *address = (void *)stackPopPtr(pVM->pStack); in ficlFopen() 48 stackPushPtr(pVM->pStack, NULL); in ficlFopen() 49 stackPushINT(pVM->pStack, EINVAL); in ficlFopen() 67 stackPushPtr(pVM->pStack, NULL); in ficlFopen() 73 stackPushPtr(pVM->pStack, NULL); in ficlFopen() [all …]
|
| H A D | testmain.c | 56 static void ficlGetCWD(FICL_VM *pVM) in ficlGetCWD() argument 61 vmTextOut(pVM, cp, 1); in ficlGetCWD() 73 static void ficlChDir(FICL_VM *pVM) in ficlChDir() argument 75 FICL_STRING *pFS = (FICL_STRING *)pVM->pad; in ficlChDir() 76 vmGetString(pVM, pFS, '\n'); in ficlChDir() 82 vmTextOut(pVM, "Error: path not found", 1); in ficlChDir() 83 vmThrow(pVM, VM_QUIT); in ficlChDir() 88 vmTextOut(pVM, "Warning (chdir): nothing happened", 1); in ficlChDir() 101 static void ficlSystem(FICL_VM *pVM) in ficlSystem() argument 103 FICL_STRING *pFS = (FICL_STRING *)pVM->pad; in ficlSystem() [all …]
|
| H A D | gfx_loader.c | 61 ficl_term_putimage(FICL_VM *pVM) in ficl_term_putimage() argument 71 vmCheckStack(pVM, 7, 1); in ficl_term_putimage() 73 names = stackPopINT(pVM->pStack); in ficl_term_putimage() 74 namep = (char *) stackPopPtr(pVM->pStack); in ficl_term_putimage() 75 y2 = stackPopINT(pVM->pStack); in ficl_term_putimage() 76 x2 = stackPopINT(pVM->pStack); in ficl_term_putimage() 77 y1 = stackPopINT(pVM->pStack); in ficl_term_putimage() 78 x1 = stackPopINT(pVM->pStack); in ficl_term_putimage() 79 f = stackPopINT(pVM->pStack); in ficl_term_putimage() 94 vmThrowErr(pVM, "Error: out of memory"); in ficl_term_putimage() [all …]
|
| H A D | search.c | 57 static void definitions(FICL_VM *pVM) in definitions() argument 59 FICL_DICT *pDict = vmGetDict(pVM); in definitions() 64 vmThrowErr(pVM, "DEFINITIONS error - empty search order"); in definitions() 79 static void forthWordlist(FICL_VM *pVM) in forthWordlist() argument 81 FICL_HASH *pHash = vmGetDict(pVM)->pForthWords; in forthWordlist() 82 stackPushPtr(pVM->pStack, pHash); in forthWordlist() 92 static void getCurrent(FICL_VM *pVM) in getCurrent() argument 95 stackPushPtr(pVM->pStack, vmGetDict(pVM)->pCompile); in getCurrent() 109 static void getOrder(FICL_VM *pVM) in getOrder() argument 111 FICL_DICT *pDict = vmGetDict(pVM); in getOrder() [all …]
|
| H A D | ficl.h | 399 #define PUSHPTR(p) stackPushPtr(pVM->pStack,p) 400 #define PUSHUNS(u) stackPushUNS(pVM->pStack,u) 401 #define PUSHINT(i) stackPushINT(pVM->pStack,i) 402 #define PUSHFLOAT(f) stackPushFloat(pVM->fStack,f) 403 #define PUSH(c) stackPush(pVM->pStack,c) 404 #define POPPTR() stackPopPtr(pVM->pStack) 405 #define POPUNS() stackPopUNS(pVM->pStack) 406 #define POPINT() stackPopINT(pVM->pStack) 407 #define POPFLOAT() stackPopFloat(pVM->fStack) 408 #define POP() stackPop(pVM->pStack) [all …]
|
| H A D | ficl.c | 227 void ficlListParseSteps(FICL_VM *pVM) in ficlListParseSteps() argument 230 FICL_SYSTEM *pSys = pVM->pSys; in ficlListParseSteps() 233 vmTextOut(pVM, "Parse steps:", 1); in ficlListParseSteps() 234 vmTextOut(pVM, "lookup", 1); in ficlListParseSteps() 240 vmTextOut(pVM, pSys->parseList[i]->name, 1); in ficlListParseSteps() 255 FICL_VM *pVM = vmCreate(NULL, defaultStack, defaultStack); in ficlNewVM() local 256 pVM->link = pSys->vmList; in ficlNewVM() 257 pVM->pSys = pSys; in ficlNewVM() 258 pVM->pExtend = pSys->pExtend; in ficlNewVM() 259 vmSetTextOut(pVM, pSys->textOut); in ficlNewVM() [all …]
|
| H A D | prefix.c | 72 int ficlParsePrefix(FICL_VM *pVM, STRINGINFO si) in ficlParsePrefix() argument 76 FICL_WORD *pFW = ficlLookup(pVM->pSys, list_name); in ficlParsePrefix() 103 vmSetTibIndex(pVM, si.cp + n - pVM->tib.cp ); in ficlParsePrefix() 104 vmExecute(pVM, pFW); in ficlParsePrefix() 116 static void tempBase(FICL_VM *pVM, int base) in tempBase() argument 118 int oldbase = pVM->base; in tempBase() 119 STRINGINFO si = vmGetWord0(pVM); in tempBase() 121 pVM->base = base; in tempBase() 122 if (!ficlParseNumber(pVM, si)) in tempBase() 125 vmThrowErr(pVM, "%.*s not recognized", i, SI_PTR(si)); in tempBase() [all …]
|
| H A D | stack.c | 72 void vmCheckStack(FICL_VM *pVM, int popCells, int pushCells) in vmCheckStack() argument 74 FICL_STACK *pStack = pVM->pStack; in vmCheckStack() 79 vmThrowErr(pVM, "Error: stack underflow"); in vmCheckStack() 84 vmThrowErr(pVM, "Error: stack overflow"); in vmCheckStack() 91 void vmCheckFStack(FICL_VM *pVM, int popCells, int pushCells) in vmCheckFStack() argument 93 FICL_STACK *fStack = pVM->fStack; in vmCheckFStack() 98 vmThrowErr(pVM, "Error: float stack underflow"); in vmCheckFStack() 103 vmThrowErr(pVM, "Error: float stack overflow"); in vmCheckFStack()
|
| H A D | dict.c | 308 void dictCheck(FICL_DICT *pDict, FICL_VM *pVM, int n) in dictCheck() argument 312 vmThrowErr(pVM, "Error: dictionary full"); in dictCheck() 317 vmThrowErr(pVM, "Error: dictionary underflow"); in dictCheck() 323 vmThrowErr(pVM, "Error: search order overflow"); in dictCheck() 328 vmThrowErr(pVM, "Error: search order underflow"); in dictCheck() 475 void dictHashSummary(FICL_VM *pVM) in dictHashSummary() argument 477 FICL_DICT *dp = vmGetDict(pVM); in dictHashSummary() 490 dictCheck(dp, pVM, 0); in dictHashSummary() 526 sprintf(pVM->pad, in dictHashSummary() 534 ficlTextOut(pVM, pVM->pad, 1); in dictHashSummary()
|
| /src/stand/ficl/x86/ |
| H A D | sysdep.c | 10 ficlOutb(FICL_VM *pVM) in ficlOutb() argument 15 port=stackPopUNS(pVM->pStack); in ficlOutb() 16 c=(u_char)stackPopINT(pVM->pStack); in ficlOutb() 25 ficlInb(FICL_VM *pVM) in ficlInb() argument 30 port=stackPopUNS(pVM->pStack); in ficlInb() 32 stackPushINT(pVM->pStack,c); in ficlInb()
|
| /src/stand/ficl/aarch64/ |
| H A D | sysdep.c | 52 void ficlTextOut(FICL_VM *pVM, char *msg, int fNewline) in ficlTextOut() argument 54 IGNORE(pVM); in ficlTextOut()
|
| H A D | sysdep.h | 375 void ficlTextOut(struct vm *pVM, char *msg, int fNewline);
|
| /src/stand/ficl/powerpc/ |
| H A D | sysdep.c | 52 void ficlTextOut(FICL_VM *pVM, char *msg, int fNewline) in ficlTextOut() argument 54 IGNORE(pVM); in ficlTextOut()
|
| /src/stand/ficl/amd64/ |
| H A D | sysdep.c | 54 void ficlTextOut(FICL_VM *pVM, char *msg, int fNewline) in ficlTextOut() argument 56 IGNORE(pVM); in ficlTextOut()
|
| /src/stand/ficl/arm/ |
| H A D | sysdep.c | 52 void ficlTextOut(FICL_VM *pVM, char *msg, int fNewline) in ficlTextOut() argument 54 IGNORE(pVM); in ficlTextOut()
|
| H A D | sysdep.h | 386 void ficlTextOut(struct vm *pVM, char *msg, int fNewline);
|
| /src/stand/ficl/i386/ |
| H A D | sysdep.c | 54 void ficlTextOut(FICL_VM *pVM, char *msg, int fNewline) in ficlTextOut() argument 56 IGNORE(pVM); in ficlTextOut()
|
| H A D | sysdep.h | 385 void ficlTextOut(struct vm *pVM, char *msg, int fNewline);
|
| /src/stand/ficl/riscv/ |
| H A D | sysdep.c | 52 void ficlTextOut(FICL_VM *pVM, char *msg, int fNewline) in ficlTextOut() argument 54 IGNORE(pVM); in ficlTextOut()
|
| H A D | sysdep.h | 375 void ficlTextOut(struct vm *pVM, char *msg, int fNewline);
|