X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=csrc%2Fpf_inner.c;fp=csrc%2Fpf_inner.c;h=dcf12c6076dd0d1e2ed14fe1a2d8ebad06d6f2eb;hb=0868989592470c064bae35eea78a6d23669d1995;hp=7cdaeb13180c917f151c7a3a962feb507d3580d5;hpb=452fad6a218f534f3c3fbbef65410d12a4e1c9dc;p=debian%2Fpforth diff --git a/csrc/pf_inner.c b/csrc/pf_inner.c index 7cdaeb1..dcf12c6 100644 --- a/csrc/pf_inner.c +++ b/csrc/pf_inner.c @@ -1559,16 +1559,6 @@ DBUG(("XX ah,m,l = 0x%8x,%8x,%8x - qh,l = 0x%8x,%8x\n", ah,am,al, qh,ql )); endcase; #endif -/* Source Stack -** EVALUATE >IN SourceID=(-1) 1111 -** keyboard >IN SourceID=(0) 2222 -** file >IN lineNumber filePos SourceID=(fileID) -*/ - case ID_SAVE_INPUT: /* FIXME - finish */ - { - } - endcase; - case ID_SP_FETCH: /* ( -- sp , address of top of stack, sorta ) */ PUSH_TOS; TOS = (cell_t)STKPTR; @@ -1650,6 +1640,16 @@ DBUG(("XX ah,m,l = 0x%8x,%8x,%8x - qh,l = 0x%8x,%8x\n", ah,am,al, qh,ql )); else M_DROP; endcase; + case ID_SOURCE_LINE_NUMBER_FETCH: /* ( -- linenr ) */ + PUSH_TOS; + TOS = gCurrentTask->td_LineNumber; + endcase; + + case ID_SOURCE_LINE_NUMBER_STORE: /* ( linenr -- ) */ + gCurrentTask->td_LineNumber = TOS; + TOS = M_POP; + endcase; + case ID_SWAP: Scratch = TOS; TOS = *STKPTR;