Jump to content
IGNORED

Camel99 Forth Information goes here


TheBF
 Share

Recommended Posts

1 hour ago, TheBF said:

DUH! 

 I think it's just  X  8 MOD   is the same as  7 AND. 

OK That will remove 3 more instructions.

 

I am pretty sure the fbForth DOT word for Bitmap graphics does something like this, but I should probably revisit the code to make sure. As I recall, it was pretty painful working with that code and it will surely take me a little time to reorient myself to it. :ponder:

 

...lee

  • Like 2
Link to comment
Share on other sites

I was reading the site and saw @RXB 's post about how GCHAR in BASIC is being a pain the *ss in getting sped up.

 

 Out of curiosity I took this program in TI-BASIC

10 CALL GCHAR(24,1,X)
20 GOTO 10

And looked at the Classic99 Heatmap to see how much code was running. OMG.

That's a lot of stuff.

image.png.835f22ef58154c0a1711ddce0668c026.png

BASIC code heat map

 

My only point of reference of course is my system which I know does a lot less stuff than BASIC has to accomplish.

(parsing multiple reads in one call, floating point conversions, re0interpreting each time) 

 

The equivalent Camel99 Forth code is below.

It also calls the ROM "BREAK" routine with the ?TERMINAL key-word to be closer to the BASIC code. 

All that to say I am amazed that this so much harder for BASIC do faster than the stock code.

But I know Jack Squat about the innards of the GPL interpreter. 

 

VARIABLE X
: GCHAR ( x y -- char) >VPOS  VC@  ;
: RUN   
    BEGIN  
       0 23 GCHAR X !  
       ?TERMINAL 
    UNTIL ;

 

image.png.6e47a3c6646f1f6021d303e5b7a947f1.png

Forth code heat map

 

  • Like 1
Link to comment
Share on other sites

Here is something I have just started using that is almost as convenient as a cartridge.

 

I compiled my Super-Cart development system version (tools, assembler, vocabularies, elapse and ANS-Files) as UTIL1,UTIL2 

If you put these two files on DSK1 you can start Forth with four keystrokes under Editor/Assembler in Classic99 or on real hardware with Supe-Cart installed.

 

From the title screen press 2,2,5,<enter>

 

 

 

CAMEL99-UTIL1.ZIP

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...