Vintage Palmtops Tips & Tricks

17Jun/1120

Atari Portfolio and no file transfer device

Sounds familiar? Unfortunately, I won't tell you how to copy files using psychokinetic abilities. Instead I'll write about a brilliant idea by Viktor T. Toth, who found out how to write programs on Portfolio without any external compiler. If you're an assembler coder, you'll probably find it useful to write your own small applications. If not, I'll try to put some listings on my blog, including a serial transmission program (that is, the program that is not built-in, so you must copy it somehow to your Portfolio; if you don't have a parallel interface or a card, you're in deep ass).

The idea behind Viktor's solution was that you're - in limited fashion - able to machine-code from within DOS. The only obstacle is that not all ASCII codes may be entered using keypresses (e.g. 03 - Ctrl+C ). His workaround consists of two short programs that don't contain any "illegal" codes, so you can type them from DOS prompt. When you have successfully finished the second one, you'll be able to "compile" text files with hex-coded programs. Now you only need to write your program on a regular PC, compile it to a .com file, view that file with a hex editor and re-type the codes on your Portfolio.

The original step-by-step instructions are here, but I'll write a short tutorial, just in case 😉

First, you need to create CAT.COM. This tiny program allows you to enter any character (except Ctrl+C and Ctrl+S) and redirect it to a file. When in the DOS prompt, press Atari+LOCK to turn on NUM LOCK and type:

echo \180^G\128\196^A\205!\136\194\180^B\205!\235\241>cat.com

NOTE: \xxx means "hold Alt and type three digits from the numeric (red) keyboard". You should see a semigraphic character when you release Alt. ^x means Ctrl+X. ! is simply an exclamation mark (Shift+1).

If you made no mistakes, the file should be 17 bytes long and run without hanging the computer. And now, here comes the hard part. With CAT.COM you'll write the next program, H2C.COM, but this time the characters won't show up. Type:

cat>h2c.com

Now, make sure that NUM LOCK is on (the cursor changes to underline) and then hit the following keys:

\180 ^H \205 ! < x t (
< : | ^B ^D ^I \177 ^D
\210 \224 $ \240 P \180 ^H \205
! < x t \233 < : |
^B ^D ^I $ ^O [ ^H \216
\136 \194 \180 ^B \205 ! \235 \208
\205 spc ^C

If you're lucky, you'll get a 50-byte-long file.

Now it's time to test the compiler. The example code on Viktor's page is long and complicated. Instead, open the built-in editor and type this:

b4 09 ba 0b 01 cd 21 b4 4c cd 21 x

without spaces and newlines! Save the file as HELLO.HEX and execute:

h2c<hello.hex>hello.com

Yet you have to merge the text to your code. You may use either the text editor or CAT.COM, but remember to redirect CAT.COM's output to append the text to the end of HELLO.COM:

CAT.COM>>HELLO.COM

Type:

Hello world!$

(the string must be terminated with $). Hit Ctrl+C (or save the file and hit Esc, when using editor).

If everything went right, typing HELLO should result in the good old hello message.

 

[Edit: 2013/10/13]

Read the comments to this post to find another solution to this problem by DH.