Jump to content


+AtariAge Subscriber
  • Content Count

  • Joined

  • Last visited

Community Reputation

1,736 Excellent

About TheBF

  • Rank

Profile Information

  • Gender
  • Location
    The Great White North
  • Interests
    Music/music production, The Forth programming language and implementations.
  • Currently Playing
  • Playing Next
    Trumpet ;)

Recent Profile Visitors

5,883 profile views
  1. Well... I have code on Git but I am not an expert. The tool I use is a cross-compiler I wrote that runs on DOS. (I have been threatening myself to move it to GForth so it would be more portable.) I think you have given me what I need to make a kernel however I will need to give you the cross-compiler and the source files and a batch file for you to build it as well. I am a bit of a square peg I guess.
  2. This is cool. Is the 9902 connected to the USB port? I have a kernel that runs over 9902. Could I make it work with this board?
  3. Tell me when you need a Forth Monitor for this beast and I will make it for you.
  4. So that's real recursion in XBasic ? Cool!
  5. You could probably write some games with it that would be pretty elegant code. I think everybody would be happy to see one, so throw your hat in the ring. Forth is "simple" as virtual machines go, but few people want to work at that level of simplicity because they have to do everything themselves. Logo is "simple" because it has a ton of stuff under the hood. If you had to make your own Logo it would not be so simple I think. It seems there is a rule of the universe that it is very hard to eliminate complexity. Our normal solution for tools is to try and hide it. Sometimes that's good, sometimes not IMHO.
  6. BTW, I can't get past 19 feet of snake in that game. I would be interested in what the game wizards around here can do.
  7. Thanks for this. It was interesting to read about this historical language. It would fun to have a cross-compiler like that today.
  8. Simple Snake Game Since I did the demo to show how to compile a standalone program in Camel99 I have this to show for it so might as well put it here. E/A Menu option 5, DSKx.SNAKE-BIN SNAKE.ZIP
  9. On our favourite little computer you have to be careful redefining lots of stuff. Each Name you add to the dictionary takes space for the text and the header that makes it into a linked list, plus the EXIT (2 bytes) that is compiled by the ';' It can add up quickly. Just doing this in FbForth, Turbo Forth or Camel99 Forth uses 12 extra bytes. : TEST ;
  10. Create an Executable Program in Camel99 Forth I of course discovered some bugs in my SAVESYS command that involved compensating for the 6 byte header at the top of an EA5 program file. It was subtle. It meant that everything in the saved Forth system worked normally except for that one routine that crossed the gap between the 1st file chunk and the 2nd file chunk. Fortunately with the excellent tools provided by TI99DIR I could clearly see what was missing and add the 6 byte offsets (positive and negative) where they were needed. The spoiler has the finished working code. It worked so well I made a video for my channel.
  11. So... wanna jump into the world of having your own stack? You just need one dedicated register, a tiny chunk of memory somewhere at the top of memory and some simple rules: ALL sub-routines have a little "entry code" (which you already do) All sub-routines exit with 2 instructions. (which you do now as well Code is untested but it gives you the concept. It's really not much more that you do now and waaaay more flexible. You will probably never nest deeper than 3 or 4 levels but its there when you need it. * Example of using a stack for nesting sub-routines **************************************************** * make the stack at the beginning of your program STACK EQU FF00 Put somewhere in HI RAM, it grows down from here. (32 bytes nests 16 BL levels) SP EQU R10 R10 is our stack register so rename it. LI R10,STACK R10 now holds the stack address. * EXAMPLE: MAP3K is now nestable (call it from other sub-routines) BANK DATA 0000 **** NEW ENTRY CODE, 2 instructions **** MAP3K DECT SP make room on the stack MOV R11,*SP PUSH R11 onto the stack * run your code LI R12,>1E00 CRU address of SAMS SBO 0 Turn on SAMS card MOV @BANK,@4006 move the BANK we want into the register for CPU addr >3000 SBZ 0 Turn off SAMS card * new EXIT CODE MOVE *SP+,R11 POP old R11 from the stack RT return safely from your sub-routine :) * CALL MAP3K is same as before but safe to call from any sub. LI R1,45 MOV R1,@BANK BL @MAP3K
  12. SBZ 0 after you write to the register to turn the card off so other cards can play in the sandbox. BIT 1 turns the MAPPER on/off. 2 totally different functions, same CRU address in R12. It only hurts for a while then it gets better.
  13. Yes of course. SBZ 1 turns OFF the mapper. SBO 1 turns ON the mapper. Leave it on after you have done the SAMSINIT.
  • Create New...