[A86] Re: bin2var help


[Prev][Next][Index][Thread]

[A86] Re: bin2var help




Richard Stallman would be happy with that name.  The only distribution I
know of that calls it that is Debian, but since Debian is cool, it must be
correct.  The problem is that you need the right header on the program.
Bin2Var adds no headers to anything.  You need a single null byte at the
beginning for a text program, and "8Eh 28h" for a compiled assembly program.
Yes, it probably could add headers, but then you'd need options for all the
different header types.  The "unix way" is to have lots of small programs
that do one thing, and do it well.

To make an assembly program, add the header for a compiled assembly program
(yes, I know that is in octal, but POSIX printf doesn't support the "\x"
escape sequence):

$ printf "\216\050" > tmp
$ cat tmp hello.bin > tmp
$ bin2var tmp hello.86p
$ rm -f tmp

You would do something similar for a plain text program:

$ printf "\000" > tmp
$ cat tmp text.txt > tmp
$ bin2var tmp text.86p
$ rm -f tmp

If you would like more info on the file formats, then check out the
following page:

http://gladstone.uoregon.edu/~tsinger/link/TI-86/

Btw, who uses Emacs?  Everyone knows that vi is the ultimate editor!

(Actually, I hate vi.  There is still no perfect editor for unix, and joe is
as close as they come.)

> I run GNU/Linux (what you probably call Linux (incorrectly) ), have
> installed z88dk, and was able to compile a program. I used "bin2var a.bas
> hello.86p" and it worked. But the program is a bunch of nonsense.
>
> I also tried to convert a text file to an 86p file. When viewed with a
> text viewer (cat, less, emacs, DOS edit) it looks fine, but in the
> TI-Graphlink program editor, it comes out scrambled.






Follow-Ups: References: