Giter Club home page Giter Club logo

Comments (3)

SamCoVT avatar SamCoVT commented on July 3, 2024

After reading some of the documentation on the ANS file words, it looks like modifying REFILL is optional, and I can just read one line at a time into my own buffer and evaluate it there. Lines up to 128 characters need to be supported, but I could make a separate buffer of that size. I was hoping to use my 512 byte sector buffer (currently reading off a compact flash card), but without refill I wouldn't be able to handle lines that cross a sector boundary. The ANS standard says that refill, if you do optionally modify it, is supposed to read a single line into the input buffer anyway.

It's interesting reading about the file words in the standard, as they obviously seem to assume you will be using operating system facilities to do things and definitely seem biased towards the C standard library. In our case, there is no OS to go ask to do things, so we have to write it ourselves.

I think I'll go down this path (read lines into my own buffer) for a while and see where it takes me.

FYI, I was able to get blocks working fine, reading out of a block file on a FAT32 formatted compact flash (1K blocks line up very nicely with 512 byte sectors). The vectored words worked great for that. Blocks are great for simple software and simple storage (like my I2C EEPROM), but I'd like to be able to run the text files from my PC directly without having to format them into blocks. I might also take a peek at the code for \ and make it so it works in blocks as well (eg. if BLK is non-zero, stop at a multiple of 64 from the beginning), as much of my reformatting for blocks involves changing all comments over to parenthesis.

If I do end up writing some of the ANS words (it looks like I need to do at least read-line now), would you consider a collection of "Tali extensions" that folks could add to their user_words.fs or paste into the simulator or over to their hardware? Perhaps an "examples" folder? I've already implemented most of the double words that Tali didn't already have, as I needed 32-bit support for FAT32, and I could see a set of file words that could be added. My current setup uses compact flash, but if you replace the code to read and write sectors, it could just as easily use fat32 on an SD card.

from taliforth2.

scotws avatar scotws commented on July 3, 2024

@SamCoVT Sorry for the late answer - sounds like a great idea, as do Extensions in a separate folder. I think we're running out of space to include all the cool stuff we could do ...

I'm going to be AFK till pretty much till end of January - real life has been very annoying these past months. Please do feel free to add PRs. I'll get back to everything ASAP!

from taliforth2.

SamCoVT avatar SamCoVT commented on July 3, 2024

I've been able to get very basic support for FAT32 working. This works well with no changes needed to the base Tali2, so I'm closing this issue.

from taliforth2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.