Vintage Palmtops Tips & Tricks

15Mar/1420

DH’s hacks for the Portfolio

I wanted to post this months ago, but it seems that long winter breaks have become a tradition on this blog.

In October last year, a reader called DH wrote a comment with his own proposition of a .com-file generator for a bare Portfolio (without any communication interface). His implementation used octal codes instead of hex, but was easier to type in. All you need is to type this at the command prompt (see the original post):

echo /180 ^P /208 /236 /205 ! /168 /223 t ^Q /168 @ u ^U /131 /224 ^O /177 ^D /254 /201 /211 /226 ^A /194 /235 /229 /180 ^B /205 ! 1 /210 /235 /221 /205 [spc] /144 > b8cat.com

where ^P means Ctrl+P, /180 means Alt+1 8 0 when NumLock is on, and [spc] obviously is Space. If you don't make any mistake, you should now have a tool, which will allow you to create executable .com files from octal codes.

DH reverse-engineered DEBUG.COM from MS-DOS 2.0 and put it on Dropbox, so that after re-typing it (remember those listings in computer magazines back in the days?) you'll have this useful tool on your Portfolio.

That's not all. After a while, DH responded again, this time with a hexadecimal-code .com generator:

echo 1 \210 \180 ^P \208 \236 \205 ! \168 @ u ^T \168 [spc] t \242 \168 ^P u ^P \168 ^A u ^X \180 ^B \205 ! 1 \210 \235 \226 ^D ^E ^D ^D $ ^O \177 ^D \211 \226 0 \228 ^A \194 \235 \210 \205 [spc] \144 > b16cat.com

This is a great replacement to h2c.com, described in my post, since it's much easier to type in, it reads hex codes separated by spaces and ignores line breaks (so preparing the input is much easier). Input files must be terminated with "!" (exclamation mark).

Here's MORE.COM transcribed into hex codes:

B4 30 CD 21 86 E0 3D 00 02 73 09 BA FC 01 B4 09 CD 21 CD 20 C6 06 E7 01 19 B4 0F CD 10 88 26 E8 01 BA 17 02 B4 09 CD 21 33 DB B4 45 CD 21 8B E8 B4 3E CD 21 BB 02 00 B4 45 CD 21 FC BA 1A 02 B9 00 10 8B DD B4 3F CD 21 0B C0 75 02 CD 20 8B C8 8B F2 AC
3C 1A 74 F5 3C 0D 75 07 C6 06 EA 01 01 EB 4C 3C 0A 75 06 FE 06 E9 01 EB 42 3C 08 75 0D 80 3E EA 01 01 74 37 FE 0E EA 01 EB 31 3C 09 75 12 8A 26 EA 01 80 C4 07 80 E4 F8 FE C4 88 26 EA 01 EB 1B 3C 07 74 17 FE 06 EA 01 8A 26 EA 01 3A 26 E8 01 76 09 FE
06 E9 01 C6 06 EA 01 01 8A D0 B4 02 CD 21 8A 26 E9 01 3A 26 E7 01 72 20 BA F0 01 B4 09 CD 21 B4 0C B0 01 CD 21 BA 17 02 B4 09 CD 21 C6 06 EA 01 01 C6 06 E9 01 01 4E 41 49 74 03 E9 6E FF E9 54 FF 18 50 01 01 00 00 00 00 00 0D 2D 2D 20 4D 6F 72 65 20
2D 2D 24 4D 4F 52 45 3A 20 49 6E 63 6F 72 72 65 63 74 20 44 4F 53 20 76 65 72 73 69 6F 6E 0D 0A 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 !

(Remember to terminate each line - except the last - with space!)

But that's not all. After a while, DH responded again 🙂 Here's his advice on receiving files via RS-232 without comms software:

To receive a file sent by RS-232 using MORE.COM, on the Portfolio, execute “MORE <COM1 >FileName” (replacing “FileName” with the name under which to save the file). This will stream data from the COM port directly to the file (assuming no ^Z is encountered) WITHOUT locking up the keyboard! This allows you to advance the stream by repeatedly pressing Enter until the program automatically ends, signalling a complete transfer. It also means that you can still use CTRL+C if something goes wrong (something “COPY COM1 FileName” wouldn’t let you do, since it replaces all keyboard input with the COM port instead of simply opening it alongside). My Serial Interface hasn’t come through the post yet, so if someone with their own can test this for me, that would be great thanks!

The last (as for now) contribution by DH is a version of MORE.COM that can be typed in from command prompt without using B16CAT:

\176 ^N \254 \200 \162 4 ^B \162 \92 ^B , ^D \254 \192 \162 5 ^B \162 ] ^B \180 0 \205 ! \134 \224 H = \254 ^A w ^K \186 A ^B \180 ^R \208
\236 \205 ! \205 [SPACE] \198 ^F 0 ^B ^Y \180 ^O \205 ^P \134 \224 \162 1 ^B \144 \144 \144 \144 1 \219 \180 E \205 ! \137 \197 \180 = \254
\196 \205 ! \187 ^B \128 \129 \227 ^O ^A \180 E \205 ! \252 \186 _ ^B \185 ^A ^P I \137 \235 \180 ? \205 ! ! \192 u ^B \205 [SPACE] \137 \193
\137 \214 \172 0 \228 \254 \196 \168 \128 t ^D ^D \128 \235 Z ^L \128 = \154 ^A t \230 = \141 ^A u ^K \144 \144 \144 \198 ^F 3 ^B ^A \235 ]
\144 = \138 ^A u ^F \254 ^F 2 ^B \235 Q = \136 ^A u ^U \144 \138 ^V 3 ^B 0 \246 \254 \198 \129 ^Y0 ^A ^A t = \254 ^N 3 ^B \235 7 = \137 ^A u
^T \138 6 3 ^B \128 \198 ^F \254 \198 \128 \230 \248 \254 \198 \136 6 3 ^B \235 \30 = \135 ^A t ^Y \254 ^F 3 ^B \138 6 3 ^B : 6 1 ^B v ^K
\144 \144 \254 ^F 2 ^B \198 ^F 3 ^B ^A , \128 \136 \194 \180 ^B \205 ! \138 6 2 ^B : 6 0 ^B r $ \186 4 ^B \180 ^R \208 \236 \205 ! \180 ^L
\176 ^A \205 ! \186 \92 ^B \180 ^R \208 \236 \205 ! \198 ^F 3 ^B ^A \198 ^F 2 ^B ^A N A I \144 \144 t ^D \144 \233 A \255 \233 & \255 ^X P ^A
^A \141 \138 – - [SPACE] M o r e [SPACE] – - $ M O R E : [SPACE] I n c o r r e c t [SPACE] D O S [SPACE] V e r s i o n \141 \138 $

and hex codes for a little program that uses Portfolio-specific BIOS commands (int 61h):

B4 16 B9 19 00 B2 3C CD 61 B2 3B CD 61 B2 3C CD 61 B2 3B CD 61 B2 3C CD 61 B2 38 CD 61 B2 29 CD 61 B2 39 CD 61 B2 36 CD 61 CD 20 !

Now, Portfolio hackers, who's gonna pick up the gauntlet and write some more hex-code snippets?

Edited 2014/05/24:
This is DH once again:

This should work and would be some good code to incorporate into a countdown timer program:

B4 16 B9 14 00 B2 39 CD 61 D1 E1 B2 37 CD 61 D1 E9 B2 32 CD 61 D1 E1 B2 34 CD 61 D1 E9 B2 3D CD 61 B2 3B CD 61 B2 39 CD 61 B2 3B CD 61 CD 20 !

Edited 2014/05/26:

Here’s a program that dials a number you type in using the built in DTMF dialer. This program can be entered from the prompt as follows:

echo \161 y ^A % ^O ^O \163 y ^A 1 \192 \162 ~ ^A \176 \29 $ ^O \162 \127 ^A \180 ^F \254 \196 \254 \196 \254 \196 \186 X ^A \205 ! \186 y ^A \205 ! \180 ^F \128 \196 ^D \186 } ^A \205 ! \180 ^F \254 \196 \254 \196 \254 \196 \186 y ^A \205 ! \186 n ^A \205 ! \186 y ^A \205 ! \190 \127 ^A 0 \237 \138 ^N ~ ^A \180 ^W \205 a \205 [SPACE] \144 E n t e r [SPACE] n u m b e r [SPACE] t o [SPACE] d i a l : $ D i a l i n g . . . $ \29 * $ \144 2 ^A \29 $ >DIALER.COM