Giter VIP home page Giter VIP logo

entox-detox's Introduction

Entox-Detox - Yet Another Tandy Model 100 Tokenizer

Command-line tools entox and detox are used to convert between plain TEXT and tokenized BASIC files for Tandy Model 100.

License: BSD

Copyright (C) 2024 tingtron

This product includes software developed by

  • Copyright 2004-2008 by Ken Pettit, Jerome Vernet, James Hurd and John Hogerhuis

Syntax

entox converts plain text BASIC file to tokenized form

usage: entox [-d] [in.do [out.ba]]
             -d  debug
  in.do, out.ba  TEXT/BASIC files or stdin/stdout

detox converts tokenized BASIC file to plain text form

usage: detox [-d] [in.ba [out.do]]
             -d  debug
  in.ba, out.do  BASIC/TEXT files or stdin/stdout

Overview

Many Tandy Model 100 BASIC files found on the Internet are represented in plain text, but with .BA extension. When copying such files to Tandy M100, and opening in BASIC it may cause issues and posible memory corruption and cold boot, loosing storage contents.

Such plain text .BA files could be renamed to .DO and loaded into BASIC safely. However, plain text BASIC files occupy more storage and take extra time loading in BASIC.

So it makes sense to convert plain text BASIC into binary tokenized form. We couldn't find any existing usable BASIC tokenizers usable from Windows command-line. The routines used in VirtualT, which are tightly coupled with UI,

Features

The structure of tokenized BASIC files is a series of lines, without any common header or ending. Each line has the following structure:

Size Description
2 bytes Next Line Address (low-endian integer)
2 bytes Line Number (low-endian integer)
... List of tokens (high ASCII) and plain text (low ASCII)
1 byte 0x00 Line Terminator

When loaded in memory, or for de-tokenization, after the end of the binary program, 2 zero bytes are placed to indicate the end of program.

Next Line Address in real BASIC files represents whatever position in memory the program had. So all the lines will have a common offset of the beginning of the program in memory. For our purposes this common memory offset is subtracted, and each line address indicates the position from the beginning of the file.

References

Here are a few other methods of tokenizing BASIC for Tandy Model 100.

The next couple methods involve serial transfer, which gives the opportunity of "tricking" Tandy to accept an original plain text .BA file and save it as a .DO file.

Emulators may provide a means to load plain text files. But there wasn't any readily available method of saving tokenized files from command line to be easily automated.

entox-detox's People

Contributors

tingtron avatar

Watchers

 avatar

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.