6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue May 14, 2024 2:59 pm

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Feb 22, 2017 9:43 pm 
Offline

Joined: Thu Sep 15, 2016 1:52 pm
Posts: 60
Location: UK
The reason I ask is that this word definition doesn't behave the way it should.
Code:
: EGGSIZE
        DUP  18 < IF  ." reject "      ELSE
        DUP  21 < IF  ." small "       ELSE
        DUP  24 < IF  ." medium "      ELSE
        DUP  27 < IF  ." large "       ELSE
        DUP  30 < IF  ." extra large " ELSE
                      ." error "
        THEN THEN THEN THEN THEN DROP ;

When I execute this word in gforth I get the following results:
Code:
17 eggsize reject  ok
18 eggsize small  ok
19 eggsize small  ok
20 eggsize small  ok
21 eggsize medium  ok
22 eggsize medium  ok
23 eggsize medium  ok
24 eggsize large  ok
25 eggsize large  ok
26 eggsize large  ok
27 eggsize extra large  ok
28 eggsize extra large  ok
29 eggsize extra large  ok
30 eggsize error  ok

In Tali Forth I get this result:
Code:
17 eggsize reject medium  ok
18 eggsize small  ok
19 eggsize small  ok
20 eggsize small  ok
21 eggsize small  ok
22 eggsize small  ok
23 eggsize small  ok
24 eggsize small  ok
25 eggsize small  ok
26 eggsize small  ok
27 eggsize small  ok
28 eggsize small  ok
29 eggsize small  ok
30 eggsize small  ok
31 eggsize small  ok

It seems to me that nested if statements are not that well supported.
So is Tali Forth still maintained?

I should mention that I used py65mon to run Tali Forth.


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 22, 2017 10:11 pm 
Offline

Joined: Thu Sep 15, 2016 1:52 pm
Posts: 60
Location: UK
A reboot of the emulator and Tali Forth gave me this result:
Code:
17 eggsize reject  ok
18 eggsize  small  ok
19 eggsize small  ok
20 eggsize small  ok
21 eggsize medium  ok
22 eggsize medium  ok
23 eggsize medium  ok
24 eggsize large  ok
25 eggsize large  ok
26 eggsize large  ok
27 eggsize extra large ok
28 eggsize extra large ok
29 eggsize extra large ok
30 eggsize error  ok
31 eggsize error  ok

What's going on?


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 23, 2017 2:22 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8182
Location: Midwestern USA
jgroth wrote:
A reboot of the emulator and Tali Forth gave me this result:
Code:
17 eggsize reject  ok
18 eggsize  small  ok
19 eggsize small  ok
20 eggsize small  ok
21 eggsize medium  ok
22 eggsize medium  ok
23 eggsize medium  ok
24 eggsize large  ok
25 eggsize large  ok
26 eggsize large  ok
27 eggsize extra large ok
28 eggsize extra large ok
29 eggsize extra large ok
30 eggsize error  ok
31 eggsize error  ok

What's going on?

What happens when you try other Forths in your simulator (which is not, by the way, an emulator)?

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 23, 2017 6:07 am 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
Tali is alive, but she's been benched while I'm getting her big sister Liara for the 65816 (https://github.com/scotws/LiaraForth) up and running. Unfortunately, it might be a bit before I can take a look - I only have the emulator as well at the moment. With a bit of luck, I can at least confirm the problem later today, and then see what is going on.

Because you're using Tali (very honored, by the way), the near-term plan is to get Liara to about where Tali was in terms of functionality, and then go back and do a very major rewrite of Tali with what I've learned from Liara (split headers and code, etc). I'm aiming to have them echo each other so that in future, features can be added in parallel, with the same routine names etc. Though to be honest the idea of going back to the 65c02 after coding for the 65816 fills me with a certain sense of dread ...

Please let me know if you find out anything more about the bug!


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 23, 2017 6:48 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8182
Location: Midwestern USA
scotws wrote:
Though to be honest the idea of going back to the 65c02 after coding for the 65816 fills me with a certain sense of dread ...

Funny how that works, eh? :D

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 23, 2017 8:48 am 
Offline

Joined: Thu Sep 15, 2016 1:52 pm
Posts: 60
Location: UK
scotws wrote:
Please let me know if you find out anything more about the bug!

Will try to reproduce the bug tonight.


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 23, 2017 1:03 pm 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
Sorry, I just tried to reproduce the error on py65mon from a cold start, immediately defining the new word, and it worked as it should. Do you remember what you were doing before the error occurred? Tali is not the most stable girl, a result of her creator trying to bee Too Clever By Half with some of the internal routines ... EVALUATE is especially horrible in retrospect, and that's where IF comes from during boot.


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 23, 2017 5:32 pm 
Offline

Joined: Thu Sep 15, 2016 1:52 pm
Posts: 60
Location: UK
scotws wrote:
Sorry, I just tried to reproduce the error on py65mon from a cold start, immediately defining the new word, and it worked as it should. Do you remember what you were doing before the error occurred? Tali is not the most stable girl, a result of her creator trying to bee Too Clever By Half with some of the internal routines ... EVALUATE is especially horrible in retrospect, and that's where IF comes from during boot.

I think I entered the word several times because I managed to sausage finger the first and second (perhaps even a third) attempt entering it. When I eventually typed it in correctly it behaved as I described. But after a cold boot and entering the word correctly the first time everything worked fine. Don't take this as gospel though, because my memory is a bit hazy on the details.


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 23, 2017 5:53 pm 
Offline

Joined: Thu Sep 15, 2016 1:52 pm
Posts: 60
Location: UK
Found the entire history how I managed produce the bug (if there is one, it might my lack of knowledge how Forth works).
Code:
: eggsize  compiled
dup 18 < if ." reject" else  compiled
dup 21 < if ." small" else  compiled
dup 24 < if ." medium" else  compiled
dup 27 < if ." large" else UP >>>Error<<<
Unknown word
  ok
: eggsize :EGGSIZE >>>Error<<<
Unknown word
  ok
: eggsize  compiled
DUP  18 < IF  ." reject "      ELSE  compiled
DUP  21 < IF  ." small "       ELSE  compiled
DUP  24 < IF  ." medium "      ELSE  compiled
DUP  27 < IF  ." large "       ELSE  compiled
DUP  30 < IF  ." extra large " ELSE  compiled
." error "  compiled
THEN THEN THEN THEN THEN DROP ;  ok
18 eggsize small  ok
10 eggsize reject  ok
100 eggsize error  ok
30 eggsize error  ok
words  EGGSIZE EGGSIZE ACTION-OF IS REPEAT WHILE UNTIL ELSE IF WORDS DROP 2DROP ! @ ? 2R> 2R@ 2>R >R R> R@ OVER 2OVER DUP ?DUP 2DUP SWAP 2SWAP NIP TUCK ROT -ROT PICK DEPTH 1- 1+ FALSE TRUE BRANCH (BRANCH) 0BRANCH (0BRANCH) BEGIN AGAIN THEN DO ?DO (DO) (?DO) I J EXIT UNLOOP LOOP +LOOP (+LOOP) LEAVE RECURSE ABS DABS + - * / */ */MOD UM* M* UM/MOD UD/MOD SM/REM FM/MOD MOD /MOD M+ AND OR XOR INVERT NEGATE DNEGATE MAX MIN LSHIFT RSHIFT S>D D>S D+ D- <# # #S HOLD SIGN #> U. U.R UD. . .R D. D.R 2 1 0 < = > 0= 0< COUNT >IN TYPE EMIT CHAR [CHAR] TOUPPER KEY BASE HERE PAD UNUSED MARKER ERASE FILL CELL+ CELLS CHAR+ CHARS C, C! C@ CMOVE CMOVE> MOVE ALIGN ALIGNED ALLOT , DEFER@ DEFER! DEFER ' ['] >BODY >NAME EXECUTE EVALUATE STATE COMPILE, : ; ] [ POSTPONE IMMEDIATE COMPILE-ONLY NATIVE-COMPILE CREATE DOES> (DOES>) VARIABLE 2VARIABLE TO VALUE CONSTANT +! SOURCE DECIMAL HEX BINARY DIGIT>NUMBER NUMBER >NUMBER BL CR SPACE SPACES AT-XY PAGE BOLD REGULAR BELL ." S" .( ( \ /STRING -TRAILING FIND ACCEPT PARSE PARSE-NAME WORD .S SEE DUMP (ABORT") ABORT" QUIT ABORT LITERAL (LITERAL) COLD BYE ok
: eggsize  compiled
dup 18 < if ." reject " else  compiled
dup 21 < if ." small " else  compiled
dup 27 < if ." medium " else  compiled
;  ok           
marker -egg  ok
: eggsize   compiled
dup 18 < if ." reject " else  compiled
dup 21 < if ." small " else  compiled
dup 24 < if ." medium " else  compiled
dup 27 < if ." large " else  compiled
dup 30 < if ." extra large " else  compiled
." error "  compiled
then then then then then drop ;  ok
28 eggsize small  ok
24 eggsize small  ok
10 eggsize reject medium  ok
18 eggsize small  ok
  ok
  ok
17 eggsize reject medium  ok
18 eggsize small  ok
10 eggsize reject medium  ok
  ok
  ok
  ok
18 eggsize small  ok
19 eggsize small  ok
17 eggsize  reject medium  ok
  ok
  ok
17 eggsize reject medium  ok
18 eggsize small  ok
19 eggsize small  ok
20 eggsize small  ok
21 eggsize small  ok
22 eggsize small  ok
23 eggsize small  ok
24 eggsize small  ok
25 eggsize small  ok
26 eggsize small  ok
27 eggsize small  ok
28 eggsize small  ok
29 eggsize small  ok
30 eggsize small  ok
31 eggsize small  ok
bye
        PC  AC XR YR SP NV-BDIZC
65C02: c243 35 2b 02 fb 00110101

Py65 Monitor

        PC  AC XR YR SP NV-BDIZC
65C02: c243 35 2b 02 fb 00110101
.q

✔  ~/C64/PLUTO/TaliForth [master|✔ ]
21:53 $ py65mon --mpu 65C02 -r ophis.bin
Reset with new MPU 65C02

        PC  AC XR YR SP NV-BDIZC
65C02: 0000 00 00 00 ff 00110000
Wrote +16384 bytes from $c000 to $ffff

        PC  AC XR YR SP NV-BDIZC
65C02: 0000 00 00 00 ff 00110000

Booting Kernel for the Uberquirrel Mark Zero
Scot W. Stevenson <scot.stevenson@gmail.com>
Kernel Version Alpha 004 (11. Feb 2015)

Tali Forth for the 65c02
Version BETA (31. Dec 2016)
Tali Forth comes with absolutely NO WARRANTY
Type 'bye' to exit

: EGGSIZE  compiled
        DUP  18 < IF  ." reject "      ELSE  compiled
        DUP  21 < IF  ." small "       ELSE  compiled
        DUP  24 < IF  ." medium "      ELSE  compiled
        DUP  27 < IF  ." large "       ELSE  compiled
        DUP  30 < IF  ." extra large " ELSE  compiled
                      ." error "  compiled
        THEN then then then then drop ;  ok
words  EGGSIZE ACTION-OF IS REPEAT WHILE UNTIL ELSE IF WORDS DROP 2DROP ! @ ? 2R> 2R@ 2>R >R R> R@ OVER 2OVER DUP ?DUP 2DUP SWAP 2SWAP NIP TUCK ROT -ROT PICK DEPTH 1- 1+ FALSE TRUE BRANCH (BRANCH) 0BRANCH (0BRANCH) BEGIN AGAIN THEN DO ?DO (DO) (?DO) I J EXIT UNLOOP LOOP +LOOP (+LOOP) LEAVE RECURSE ABS DABS + - * / */ */MOD UM* M* UM/MOD UD/MOD SM/REM FM/MOD MOD /MOD M+ AND OR XOR INVERT NEGATE DNEGATE MAX MIN LSHIFT RSHIFT S>D D>S D+ D- <# # #S HOLD SIGN #> U. U.R UD. . .R D. D.R 2 1 0 < = > 0= 0< COUNT >IN TYPE EMIT CHAR [CHAR] TOUPPER KEY BASE HERE PAD UNUSED MARKER ERASE FILL CELL+ CELLS CHAR+ CHARS C, C! C@ CMOVE CMOVE> MOVE ALIGN ALIGNED ALLOT , DEFER@ DEFER! DEFER ' ['] >BODY >NAME EXECUTE EVALUATE STATE COMPILE, : ; ] [ POSTPONE IMMEDIATE COMPILE-ONLY NATIVE-COMPILE CREATE DOES> (DOES>) VARIABLE 2VARIABLE TO VALUE CONSTANT +! SOURCE DECIMAL HEX BINARY DIGIT>NUMBER NUMBER >NUMBER BL CR SPACE SPACES AT-XY PAGE BOLD REGULAR BELL ." S" .( ( \ /STRING -TRAILING FIND ACCEPT PARSE PARSE-NAME WORD .S SEE DUMP (ABORT") ABORT" QUIT ABORT LITERAL (LITERAL) COLD BYE ok
marker -del  ok
-del  ok
words  EGGSIZE ACTION-OF IS REPEAT WHILE UNTIL ELSE IF WORDS DROP 2DROP ! @ ? 2R> 2R@ 2>R >R R> R@ OVER 2OVER DUP ?DUP 2DUP SWAP 2SWAP NIP TUCK ROT -ROT PICK DEPTH 1- 1+ FALSE TRUE BRANCH (BRANCH) 0BRANCH (0BRANCH) BEGIN AGAIN THEN DO ?DO (DO) (?DO) I J EXIT UNLOOP LOOP +LOOP (+LOOP) LEAVE RECURSE ABS DABS + - * / */ */MOD UM* M* UM/MOD UD/MOD SM/REM FM/MOD MOD /MOD M+ AND OR XOR INVERT NEGATE DNEGATE MAX MIN LSHIFT RSHIFT S>D D>S D+ D- <# # #S HOLD SIGN #> U. U.R UD. . .R D. D.R 2 1 0 < = > 0= 0< COUNT >IN TYPE EMIT CHAR [CHAR] TOUPPER KEY BASE HERE PAD UNUSED MARKER ERASE FILL CELL+ CELLS CHAR+ CHARS C, C! C@ CMOVE CMOVE> MOVE ALIGN ALIGNED ALLOT , DEFER@ DEFER! DEFER ' ['] >BODY >NAME EXECUTE EVALUATE STATE COMPILE, : ; ] [ POSTPONE IMMEDIATE COMPILE-ONLY NATIVE-COMPILE CREATE DOES> (DOES>) VARIABLE 2VARIABLE TO VALUE CONSTANT +! SOURCE DECIMAL HEX BINARY DIGIT>NUMBER NUMBER >NUMBER BL CR SPACE SPACES AT-XY PAGE BOLD REGULAR BELL ." S" .( ( \ /STRING -TRAILING FIND ACCEPT PARSE PARSE-NAME WORD .S SEE DUMP (ABORT") ABORT" QUIT ABORT LITERAL (LITERAL) COLD BYE ok
17 eggsize reject  ok
18 eggsize small  ok
19 eggsize small  ok
20 eggsize small  ok
21 eggsize medium  ok
22 eggsize medium  ok
23 eggsize  medium  ok
24 eggsize large  ok
25 eggsize large  ok
26 eggsize reject  ok
27 eggszie  EGGSZIE >>>Error<<<
Unknown word
27 eggsize extra large  ok
26 eggsize large  ok
25 eggsize  large  ok
26 eggsize large  ok
27 eggsize extra large  ok
28 eggsize extra large  ok
29 eggsize  extra large  ok
30 eggsize error  ok
  ok
bye YE >>>Error<<<
Unknown word
bye
        PC  AC XR YR SP NV-BDIZC
65C02: c243 35 7f 02 fb 00110101

Py65 Monitor

        PC  AC XR YR SP NV-BDIZC
65C02: c243 35 7f 02 fb 00110101
.q

✔  ~/C64/PLUTO/TaliForth [master|✔ ]
22:00 $ py65mon --mpu 65C02 -r ophis.bin
Reset with new MPU 65C02

        PC  AC XR YR SP NV-BDIZC
65C02: 0000 00 00 00 ff 00110000
Wrote +16384 bytes from $c000 to $ffff

        PC  AC XR YR SP NV-BDIZC
65C02: 0000 00 00 00 ff 00110000

Booting Kernel for the Uberquirrel Mark Zero
Scot W. Stevenson <scot.stevenson@gmail.com>
Kernel Version Alpha 004 (11. Feb 2015)

Tali Forth for the 65c02
Version BETA (31. Dec 2016)
Tali Forth comes with absolutely NO WARRANTY
Type 'bye' to exit

: eggszize  compiled
DUP  18 < IF  ." reject "      ELSE  compiled
        DUP  21 < IF  ." small "       ELSE  compiled
        DUP  24 < IF  ." medium "      ELSE  compiled
        DUP  27 < IF  ." large "       ELSE  compiled
        DUP  30 < IF  ." extra large " ELSE  compiled
                      ." error "  compiled
        THEN THEN THEN THen then drop ;  ok
  ok
17 eggsize reject  ok
18 eggsize small  ok
30 eggsize error  ok
bye
        PC  AC XR YR SP NV-BDIZC
65C02: c243 35 7f 02 fb 00110101

Py65 Monitor

        PC  AC XR YR SP NV-BDIZC
65C02: c243 35 7f 02 fb 00110101
.q

✔  ~/C64/PLUTO/TaliForth [master|✔ ]
22:02 $ py65mon --mpu 65C02 -r ophis.bin
Reset with new MPU 65C02

        PC  AC XR YR SP NV-BDIZC
65C02: 0000 00 00 00 ff 00110000
Wrote +16384 bytes from $c000 to $ffff

        PC  AC XR YR SP NV-BDIZC
65C02: 0000 00 00 00 ff 00110000

Booting Kernel for the Uberquirrel Mark Zero
Scot W. Stevenson <scot.stevenson@gmail.com>
Kernel Version Alpha 004 (11. Feb 2015)

Tali Forth for the 65c02
Version BETA (31. Dec 2016)
Tali Forth comes with absolutely NO WARRANTY
Type 'bye' to exit

marker -forget MRKER >>>Error<<<
Unknown word
marker -hello  ok
words  -HELLO ACTION-OF IS REPEAT WHILE UNTIL ELSE IF WORDS DROP 2DROP ! @ ? 2R> 2R@ 2>R >R R> R@ OVER 2OVER DUP ?DUP 2DUP SWAP 2SWAP NIP TUCK ROT -ROT PICK DEPTH 1- 1+ FALSE TRUE BRANCH (BRANCH) 0BRANCH (0BRANCH) BEGIN AGAIN THEN DO ?DO (DO) (?DO) I J EXIT UNLOOP LOOP +LOOP (+LOOP) LEAVE RECURSE ABS DABS + - * / */ */MOD UM* M* UM/MOD UD/MOD SM/REM FM/MOD MOD /MOD M+ AND OR XOR INVERT NEGATE DNEGATE MAX MIN LSHIFT RSHIFT S>D D>S D+ D- <# # #S HOLD SIGN #> U. U.R UD. . .R D. D.R 2 1 0 < = > 0= 0< COUNT >IN TYPE EMIT CHAR [CHAR] TOUPPER KEY BASE HERE PAD UNUSED MARKER ERASE FILL CELL+ CELLS CHAR+ CHARS C, C! C@ CMOVE CMOVE> MOVE ALIGN ALIGNED ALLOT , DEFER@ DEFER! DEFER ' ['] >BODY >NAME EXECUTE EVALUATE STATE COMPILE, : ; ] [ POSTPONE IMMEDIATE COMPILE-ONLY NATIVE-COMPILE CREATE DOES> (DOES>) VARIABLE 2VARIABLE TO VALUE CONSTANT +! SOURCE DECIMAL HEX BINARY DIGIT>NUMBER NUMBER >NUMBER BL CR SPACE SPACES AT-XY PAGE BOLD REGULAR BELL ." S" .( ( \ /STRING -TRAILING FIND ACCEPT PARSE PARSE-NAME WORD .S SEE DUMP (ABORT") ABORT" QUIT ABORT LITERAL (LITERAL) COLD BYE ok
  ok
: eggsize  compiled
dup 18 < if ." reject " else  compiled
dup 21 < if ." small " else  compiled
dup 24 < if ." medium " else  compiled
dup 27 < if ." large " else  compiled
dup 30 < if ." extra large" else  compiled
." error "  compiled
then then then then then drop ;  ok
  ok
17 eggsize reject  ok
18 eggsize  small  ok
19 eggsize small  ok
20 eggsize small  ok
21 eggsize medium  ok
22 eggsize medium  ok
23 eggsize medium  ok
24 eggsize large  ok
25 eggsize large  ok
26 eggsize large  ok
27 eggsize extra large ok
28 eggsize extra large ok
29 eggsize extra large ok
30 eggsize error  ok
31 eggsize error  ok

Maybe someone with better trained Forth eyes than mine can spot what is happening.


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 23, 2017 8:16 pm 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
Huh. I don't see anything obvious. Given that Tali in the current form tends is not the most robust when it comes to errors - Liara does this better already - I'm guessing something got mixed up internally at some point (duh, I know). I'll make a mental note that this happened, and if somebody has the same problem before I can get to rewriting Tali, we can see about tracking it down. Again, thanks for the info!


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 23, 2017 8:54 pm 
Offline

Joined: Thu Sep 15, 2016 1:52 pm
Posts: 60
Location: UK
Cool.
The reason I'm so interested in Tali Forth is that I'm building a 65C02 SBC and I want Tali Forth to be the OS so to speak, if that makes any sense. So the SBC will have a VT100 terminal serial interface, so no graphics, just plain 80x24 text display (the project is called Micromite and the url is http://www.siliconchip.com.au/Issue/2014/July/Micromite%2C+Pt.3%3A+Build+An+ASCII+Video+Display+Terminal) and an IDE interface.
The inspiration for this project is an 80s computer called Jupiter ACE and I wanted to build something similar to that. Tali Forth is the first Forth I've come across that is 6502 based and platform independent and easily ported to an SBC.
Hence my interest in Tali Forth.
Tali needs some extras though like IO words so you can read, write files and directories. Store and load word definitions (not sure how to do that though, but this is early days in the project).


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 25, 2017 12:17 am 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
Have you tried typing (pasting) that initial transcript back in to see if you duplicated the bug? It's a great transcript, but it doesn't show the entire history of the session that actually had the bug.

I think it would be helpful to see if it replicates from the cold start of the image.

(I assume the "compiled" message are from Tali Forth...)

jgroth wrote:
Cool.
The reason I'm so interested in Tali Forth is that I'm building a 65C02 SBC and I want Tali Forth to be the OS so to speak, if that makes any sense. So the SBC will have a VT100 terminal serial interface, so no graphics, just plain 80x24 text display (the project is called Micromite and the url is http://www.siliconchip.com.au/Issue/2014/July/Micromite%2C+Pt.3%3A+Build+An+ASCII+Video+Display+Terminal) and an IDE interface.
The inspiration for this project is an 80s computer called Jupiter ACE and I wanted to build something similar to that. Tali Forth is the first Forth I've come across that is 6502 based and platform independent and easily ported to an SBC.
Hence my interest in Tali Forth.
Tali needs some extras though like IO words so you can read, write files and directories. Store and load word definitions (not sure how to do that though, but this is early days in the project).


What were you planning to use for the IDE interface? If it's a raw block device, then implementing file support will be more difficult, as you have to implement a filesystem. But I'm pretty sure I've seen interfaces that let you interact with a DOS formatted flash cards using a high level serial protocol (SPI I think?). That, obviously, would be much easier. If you simply have the IDE drive as a block device, then initially you could just use the basic BLOCK I/O provided in early Forths.

I'm surprised you didn't find the original 6502 Fig Forth, but there's likely not a simple binary that "just works" in something like py65, and the raw assembly may not work with a modern assembler. It would be close, as it's pretty basic 6502 assembly. But out of the box, drag and drop, no. Plus it would have to be ported to something like py65 anyway (which isn't difficult, I ported mine readily -- not to py65, but my own).


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 25, 2017 1:36 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8433
Location: Southern California
whartung wrote:
I'm surprised you didn't find the original 6502 Fig Forth

It's at http://6502.org/source/forth65.zip .

It might be a good starting point for 6502 IDC Forth, but you'll want to improve it. Note that it has the UM/MOD division bug, and, and the UM* multiplication bug (the link here gives not only my fix, but others' efficiency improvements), and the D< comparison bug. Fixes are given at the links.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 25, 2017 6:19 am 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
Also, though I'm obviously biased, remember that DO/LOOP is still the old, pre-ANSI version (they give different results), and is 6502, not 65C02.


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 25, 2017 6:42 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1929
Location: Sacramento, CA, USA
scotws wrote:
Also, though I'm obviously biased, remember that DO/LOOP is still the old, pre-ANSI version (they give different results), and is 6502, not 65C02.


Have you taken a peek at eForth's FOR AFT and NEXT Scot?

Mike B.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: