Menu

Tree [e6e098] master /
 History

HTTPS access


File Date Author Commit
 idetok 2014-10-20 AJ Milne AJ Milne [d7b184] Added freqout support to pbp, support for freqo...
 pbp 2014-11-17 AJ Milne AJ Milne [e6e098] Added keywords for shiftin, shiftout modes.
 scripts 2014-10-21 AJ Milne AJ Milne [53f03d] Adding some support scripts.
 tprogs 2014-11-17 AJ Milne AJ Milne [e6e098] Added keywords for shiftin, shiftout modes.
 Makefile 2014-11-01 AJ Milne AJ Milne [59f676] Adding serout support.
 README.txt 2014-10-19 AJ Milne AJ Milne [a6d7e6] Separated tree construction routines from main ...
 TODO.txt 2014-10-22 AJ Milne AJ Milne [a6412e] Implemented button, rctime.
 addresstoken.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 addresstoken.h 2014-10-30 AJ Milne AJ Milne [770727] Added lookdown implementation; reclassified all...
 bitstream.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 bitstream.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 configfile.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 configfile.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 efmtflagtoken.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 encaddresstoken.cpp 2014-11-01 AJ Milne AJ Milne [59f676] Adding serout support.
 encaddresstoken.h 2014-11-01 AJ Milne AJ Milne [59f676] Adding serout support.
 flattoken.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 flattoken.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 freezecfg.pl 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 ft_tokens.cfg 2014-10-20 AJ Milne AJ Milne [d7b184] Added freqout support to pbp, support for freqo...
 ft_tokens_cfg.cpp 2014-10-20 AJ Milne AJ Milne [d7b184] Added freqout support to pbp, support for freqo...
 gen_header.h.template 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 gen_headers.sh 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 gosubtoken.cpp 2014-10-19 AJ Milne AJ Milne [7295d8] Implemented on ... gosub.
 gosubtoken.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 inttoken.cpp 2014-10-23 AJ Milne AJ Milne [65def9] Added string parsing shortcut for serout contexts.
 inttoken.h 2014-10-23 AJ Milne AJ Milne [65def9] Added string parsing shortcut for serout contexts.
 jumptoken.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 jumptoken.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 labeltoken.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 labeltoken.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 listdelimtoken.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 listdelimtoken.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 ltest.tok 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 mkfiles.pl 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 packet_stream.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 packet_stream.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 pbtoken.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 pbtoken.h 2014-10-23 AJ Milne AJ Milne [65def9] Added string parsing shortcut for serout contexts.
 pbtstream.cpp 2014-11-01 AJ Milne AJ Milne [59f676] Adding serout support.
 pbtstream.h 2014-10-23 AJ Milne AJ Milne [65def9] Added string parsing shortcut for serout contexts.
 pbttc_main.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 pbttc_main.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 pf_tokens.cfg 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 pf_tokens_cfg.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 postfixtoken.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 postfixtoken.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 pushinttoken.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 pushinttoken.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 pushvartoken.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 pushvartoken.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 saddresstoken.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 saddresstoken.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 strfuncs.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 strfuncs.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 stringtoken.cpp 2014-10-23 AJ Milne AJ Milne [d052cb] Fixed issue w/ single-char strings.
 stringtoken.h 2014-10-23 AJ Milne AJ Milne [65def9] Added string parsing shortcut for serout contexts.
 subexpendtoken.cpp 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 subexpendtoken.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit
 tdis.sh 2014-10-19 AJ Milne AJ Milne [b2da7d] Minor path fixes.
 test.cpp 2014-10-18 AJ Milne AJ Milne [8e0ecc] Missing files.
 test.h 2014-10-18 AJ Milne AJ Milne [8e0ecc] Missing files.
 twrt.sh 2014-10-19 AJ Milne AJ Milne [b2da7d] Minor path fixes.
 vartoken.cpp 2014-10-21 AJ Milne AJ Milne [567171] Fixed issue w/ nib var encoding in pbbt, issue ...
 vartoken.h 2014-10-17 AJ Milne AJ Milne [a7c545] Initial commit

Read Me

README.txt for pbtc
----

2014 October 10


pbtc -- A PBASIC tokenization toolchain
---


Summary
---

pbtc is the 'PBasic Tokenization Toolchain', a fully open-source toolchain for
programming and debugging the BASIC Stamp 2 family of microcontrollers from
Parallax, Inc.

pbtc consists of two layers of tools:

1) pbttc -- an 'assembler/disassembler', which can transform 'PBT'
  format mnemonics into valid .tok object streams, and vice versa.

2) pbp -- a compiler transforming a PBASIC-like syntax into PBT
   streams, which can then be assembled and uploaded to the microcontroller.

pbtc is only (as of this writing) designed for use in *nix environments; it
should build and work easily on Linux, *BSD (including Mac OS/X), and other 
flavours of Unix. For use on a Windows system, it is _likely it will build
in cygwin, but this hasn't been tested, as yet.

pbtc does not use nor require an external tokenizer library; all encoding/
decoding is done by its own, open-source assembler component.

pbtc is currently pre-alpha; while it is capable of producing useable code, it
is by no means, as of this writing, a) user-friendly b) sufficiently
documented, nor c) by any means housebroken. 

pbtc should be widely-cross platform; if your platform/architecture has
ports of the prequisites listed below, you can probably use it to program
Stamps from your system.

pbtc is by no means a product of Parallax, and comes with no warranty
whatsoever.


Building -- prerequisites
---

To build pbtc, you will require:

. a g++/gcc compiler for your platform

. make or a compatible port (gmake, etc.)

. a development version of libpcre (the Perl-compatible regular expression
  library), with the C++ headers.

. flex and bison (required only for the pbp tool)


Building pbttc -- steps
---

Apologies, but there's no configuration script yet. And it uses
makedepend for header dependencies, so yours may be in an unfriendly state
when you get it out of git. Working on it.

Anyway. Best first to do:

  make depend

... then

  make

... and optionally

  make install

... but the last just puts the binaries in your home ~/bin 
directory, if you happen to have one.

... see the README in the pbp subdirectory for building
the pbp tool.


Using the assembler/disassembler
---

pbttc (in the root directory of the project) is the assembler/disassembler
binary. To use it:

  pbttc d <filename.tok> 
    ... to disassemble to a 'semi-portable' format, with jump targets
    abstracted to labels, and labels inserted. This format can be
    reassembled directly; see below.

  pbbtc d <filename.tok> -n
    ... to disassemble to a 'literal' format, with the jump targets
    and addresses still literal, in the code. This format cannot be
    read by the assembler directly; it's mainly useful for diagnostics
    purposes.

  pbttc a <filename.pbt>
    ... assembles a token stream in the top ('semi-portable') format
    and dumps out the non-portable/literal format, and finally ...

  pbttc a <filename.pbt> <filename.tok>
    ... assembles a token stream to a valid .tok file.

Using the BASIC-to-pbt compiler
---

See the README.txt in the pbp directory, for use of this tool.


Using the interactive Perl-based detokenizer
---

See the idetok directory for details on this tool. (However, it's of use only
if you're involved in extending the library of known tokens.)