Go to the first, previous, next, last section, table of contents.

# 15 petcat

The petcat program is a text conversion utility, it can convert between ASCII, PETSCII and tokenized BASIC.

## 15.1 petcat command line options

`-help`
  Output help text
`-?`
  Same as above
`-v`
  verbose output
`-c`
  controls (interpret also control codes) (default if textmode)
`-nc`
  no controls (suppress control codes in printout) (default if non-textmode)
`-ic`
  interpret control codes case-insensitive
`-d`
  output raw codes in decimal
`-h`
  write header (default if output is stdout)
`-nh`
  no header (default if output is a file)
`-skip <n>`
  Skip <n> bytes in the beginning of input file. Ignored on P00.
`-text`
  Force text mode
`-<version>`
  use keywords for <version> instead of the v7.0 ones
`-w<version>`
  tokenize using keywords on specified Basic version.
`-k<version>`
  list all keywords for the specified Basic version
`-k`
  list all Basic versions available.
`-l`
  Specify load address for program (in hex, no loading chars!).
`-o <name>`
  Specify the output file name
`-f`
  Force overwritten the output file. The default depends on the BASIC version.

BASIC Versions:

`1`
  PET Basic V1.0
`2`
  Basic v2.0
`superexp`
  Basic v2.0 with Super Expander (VIC20)
`turtle`
  Basic v2.0 with Turtle Basic by Craig Bruce (VIC20)
`mighty`
  Basic v2.0 with Mighty Basic by Craig Bruce (VIC20)
`a`
  Basic v2.0 with AtBasic (C64)
`simon`
  Basic v2.0 with Simons' Basic extension (C64)
`speech`
  Basic v2.0 with Speech Basic v2.7 (C64)
`F`
  Basic v2.0 with Final Cartridge III (C64)
`ultra`
  Basic v2.0 with Ultrabasic-64 (C64)
`graph`
  Basic v2.0 with Graphics basic (C64)
`WSB`
  Basic v2.0 with WS basic (C64)
`WSBF`
  Basic v2.0 with WS basic final (C64)
`Pegasus`
  Basic v2.0 with Pegasus basic 4.0 (C64)
`Xbasic`
  Basic v2.0 with Xbasic (C64)
`Drago`
  Basic v2.0 with Drago basic 2.2 (C64)
`REU`
  Basic v2.0 with REU-basic (C64)
`Lightning`
  Basic v2.0 with Basic Lightning (C64)
`magic`
  Basic v2.0 with Magic Basic (C64)
`easy`
  Basic v2.0 with Easy Basic (VIC20)
`blarg`
  Basic v2.0 with Blarg (C64)
`Game`
  Basic v2.0 with Game Basic (C64)
`BSX`
  Basic v2.0 with Basex (C64)
`superbas`
  Basic v2.0 with Super Basic (C64)
`exp20`
  Basic 2.0 with Expanded Basic (VIC20)
`exp64`
  Basic 2.0 with Expanded Basic (C64)
`sxc`
  Basic 2.0 with Super Expander Chip (C64)
`warsaw`
  Basic 2.0 with Warsaw Basic (C64)
`4v`
  Basic 2.0 with Basic 4.0 extensions (VIC20)
`4 -w4e`
  PET Basic v4.0 program (PET/C64)
`5`
  Basic 2.0 with Basic 5.0 extensions (VIC20)
`3`
  Basic v3.5 program (C16)
`70`
  Basic v7.0 program (C128)
`71`
  Basic v7.1 program (C128)
`10`
  Basic v10.0 program (C64DX)

## 15.2 petcat examples

`petcat -2 -o outputfile.txt -- inputfile.prg`
  Convert inputfile.prg to a text file in outputfile.txt, using BASIC V2 only
`petcat -wsimon -o outputfile.prg -- inputfile.txt`
  Convert inputfile.txt to a PRG file in outputfile.prg, using Simons' BASIC

Go to the first, previous, next, last section, table of contents.