Re: Help on fig-FORTH 1.0 Bring Up
Posted: Wed Dec 17, 2014 2:38 am
I finally punted on the fig-FORTH from the archives, fig-FORTH 1.1. I am too much of a newbie to FORTH to understand what's happening. I significantly increased the amount of information that the trace subroutine output to the console, but that did not appear to help me find the problem.
I finally compared it to the file that enso had posted, which is for fig-FORTH 1.0k. I removed all changes from my file that I could detect using WinMerge, but still no luck. I opted to use enso's source file, and just provided the three monitor routines required for character I/O.
It came right up without any issues. Still can't see what the differences are between the two source files that causes the fig-FORTH 1.1 source to hang in the INTERPRET routine.
I've attached a capture of the terminal output from a working session:
After downloading the FPGA, I ran Klaus' functional test program, and it passed as expected. I then booted fig-FORTH 1.0a, ran vlist to get a listing of the dictionary, and then typed in and ran a small program (from Leo Brodie's Starting Forth). The program ran fine and a second vlist shows the words of the program added to the dictionary.
Any suggestions for additional tests are appreciated. I did try to FORGET some of the words in my test program, but that didn't seem to work as I expected.
I finally compared it to the file that enso had posted, which is for fig-FORTH 1.0k. I removed all changes from my file that I could detect using WinMerge, but still no luck. I opted to use enso's source file, and just provided the three monitor routines required for character I/O.
It came right up without any issues. Still can't see what the differences are between the two source files that causes the fig-FORTH 1.1 source to hang in the INTERPRET routine.
I've attached a capture of the terminal output from a working session:
Code: Select all
65C02 Monitor Lite v5.1.5 (7-Dec-14) Ready
>0400G
PC=3A1D A=2A X=B4 Y=FF S=FF P=73 (NVRBDIZC)=01110011
>D000G
fig-FORTH 1.0a
OK
vlist
MON VLIST TRIAD INDEX LIST ? . .R D. D.R #S # SIGN #> <# SPACES WHILE ELSE IF REPEAT AGAIN END UNTIL +LOOP LOOP DO THEN ENDIF BEGIN BACK FORGET ' RSW -BCD --> LOAD MESSAGE .LINE (LINE) BLOCK BUFFER DR1 DR0 EMPTY-BUFFERS FLUSH UPDATE +BUF PREV USE M/MOD */ */MOD MOD / /MOD * M/ M* MAX MIN DABS ABS D+- +- S->D COLD ABORT QUIT ( DEFINITIONS FORTH VOCABULARY IMMEDIATE INTERPRET ?STACK DLITERAL LITERAL [COMPILE] CREATE ID. ERROR (ABORT) -FIND NUMBER (NUMBER) UPPER WORD PAD HOLD BLANKS ERASE FILL QUERY EXPECT ." (.") -TRAILING TYPE COUNT DOES> <BUILDS ( DECIMAL HEX SMUDGE ] [ COMPILE ?LOADING ?CSP ?PAIRS ?EXEC ?COMP ?ERROR !CSP PFA NFA CFA LFA LATEST TRAVERSE -DUP SPACE ROT > < U< = - C, , ALLOT HERE 2+ 1+ HLD R# CSP FLD DPL BASE STATE CURRENT CONTEXT OFFSET SCR OUT IN BLK VOC-LINK DP FENCE WARNING WIDTH TIB +ORIGIN B/SCR B/BUF LIMIT FIRST C/L BL 3 2 1 0 USER VARIABLE CONSTANT ; : C! ! C@ @ T +! DUP SWAP DROP OVER DMINUS MINUS D+ + 0< 0= R R> >R LEAVE RP! SP! SP@ XOR OR AND U/ U* CMOVE CR ?TERMINAL KEY EMIT ENCLOSE (FIND) DIGIT I (DO) (+LOOP) (LOOP) 0BRANCH BRANCH EXECUTE CLIT LIT OK
: star 42 emit ; OK
: stars 0 do star loop ; OK
: margin cr 30 spaces ; OK
: blip margin star ; OK
: bar margin 5 stars ; OK
: f bar blip bar blip blip cr ; OK
f
*****
*
*****
*
*
OK
vlist
F BAR BLIP MARGIN STARS STAR MON VLIST TRIAD INDEX LIST ? . .R D. D.R #S # SIGN #> <# SPACES WHILE ELSE IF REPEAT AGAIN END UNTIL +LOOP LOOP DO THEN ENDIF BEGIN BACK FORGET ' RSW -BCD --> LOAD MESSAGE .LINE (LINE) BLOCK BUFFER DR1 DR0 EMPTY-BUFFERS FLUSH UPDATE +BUF PREV USE M/MOD */ */MOD MOD / /MOD * M/ M* MAX MIN DABS ABS D+- +- S->D COLD ABORT QUIT ( DEFINITIONS FORTH VOCABULARY IMMEDIATE INTERPRET ?STACK DLITERAL LITERAL [COMPILE] CREATE ID. ERROR (ABORT) -FIND NUMBER (NUMBER) UPPER WORD PAD HOLD BLANKS ERASE FILL QUERY EXPECT ." (.") -TRAILING TYPE COUNT DOES> <BUILDS ( DECIMAL HEX SMUDGE ] [ COMPILE ?LOADING ?CSP ?PAIRS ?EXEC ?COMP ?ERROR !CSP PFA NFA CFA LFA LATEST TRAVERSE -DUP SPACE ROT > < U< = - C, , ALLOT HERE 2+ 1+ HLD R# CSP FLD DPL BASE STATE CURRENT CONTEXT OFFSET SCR OUT IN BLK VOC-LINK DP FENCE WARNING WIDTH TIB +ORIGIN B/SCR B/BUF LIMIT FIRST C/L BL 3 2 1 0 USER VARIABLE CONSTANT ; : C! ! C@ @ T +! DUP SWAP DROP OVER DMINUS MINUS D+ + 0< 0= R R> >R LEAVE RP! SP! SP@ XOR OR AND U/ U* CMOVE CR ?TERMINAL KEY EMIT ENCLOSE (FIND) DIGIT I (DO) (+LOOP) (LOOP) 0BRANCH BRANCH EXECUTE CLIT LIT OK
OK
Any suggestions for additional tests are appreciated. I did try to FORGET some of the words in my test program, but that didn't seem to work as I expected.