So close I can taste it…. the finish line that is.

Today’s exercise was List Ops. Make your own higher order list functions like map, and reduce as well as more common ones like concatenate. You were supposed to roll your own. Did I see people using higher order functions through LINQ or just using the the existing functions in community solutions? Yes, yes I did. I would have been surprised if I didn’t.

Today I got PRINT and INPUT working with files. I also added functions for EOF, FILEEXISTS, and FREEFILE. I think I am going to call this interpreter good for a long while. The secret goal I had for it was to get an interpreter running then having it compile to IL (Intermediate Language). Obviously I never got anywhere near that far. I did however get the majority of the BNF put in.

Some of the BNF I excluded on purpose: POKE/PEEK (direct memory access makes no sense for current day computers),  STOP (I have END which is similar and is only different if I add CONTINUE too), SYS/WAIT (I wouldn’t mind sleep but that isn’t what WAIT does it waits on a bit flag at a memory location, and SYS calls a machine language function which again doesn’t make sense now).

I wanted to add User Defined Functions/Subroutines. Never got that far even though I prepared for it in the Symbol table within the first few days. I would also someday like to come back and add INKEY$, MOD/%, SLEEP, and of course a bunch of Graphics Routines. I am happy I can get a fair chunk of Vintage Basic games to work with some tweaks.

I got Amazing.bas to run the other day, it doesn’t seem to always make solvable mazes which left me nonplussed. I have an unreasonable grudge against that program from the SmileBasic days . I wanted to rewrite it and get it working there and failed.

See it works, the bottom one is broken, no exit and you can’t get to the right half.

It is possible my interpreter is doing something wrong that breaks it occasionally.