PMATE 3.21 Cheat Sheet

18 dec 2025

This document was mostly typed in from the Phoenix Software Associates command summary card. Contents were and are Phoenix Software. It now contains these customizations to the Instant Commands of December 2025 that make it more compatible with the WordStar keyboard and fZ80's keyboard layout. This necessitated changing the Instant Commands as shown in the table below.


The following instant commands are keystrokes which are not entered into the command or text buffers, but which are executed immediately:

FZ80 CURSOR MOTION

^A Move to the beginning of the text buffer;
if already there move to the end.
^S Move left one character.
^D Move right one character.
^E Move up one line.
^X Move down one line.
^U Move up multiple lines.
^J Move down multiple lines.
^O Move left one word.
^P Move right one word.

FZ80 DELETE

^G Delete character at the cursor.
^K Kill the line starting at the cursor.
^W Delete one word beginning at the cursor.

FZ80 TEXT MOVEMENT AND RECOVERY

^T Tag cursor location.
^B Move block between tag and cursor to Special Buffer.
^Z Get contents of Special Buffer to cursor.
^R Pop garbage stack to cursor.
^Y Move cursor to column 0.

FZ80 MODE

^Q Command mode.
^V Overtype mode.
^N Insert mode.

FZ80 OTHER

^L Insert line.
^C Abort any operation, reset to Command Mode.
^_ Edit command.
^F^S Shift default case.
^F^C Change case of character at cursor.
^F^F Redraw display.

ORIGINAL CURSOR MOTION

^A Move to the beginning of the text buffer;
if already there move to the end.
^G Move left one character.
^H Move right one character.
^Y Move up one line.
^B Move down one line.
^U Move up multiple lines.
^J Move down multiple lines.
^O Move left one word.
^P Move right one word.

ORIGINAL DELETE

^D Delete character at the cursor.
^K Kill the line starting at the cursor.
^W Delete one word beginning at the cursor.
^Q Delete one word backwards from the cursor.

ORIGINAL TEXT MOVEMENT AND RECOVERY

^T Tag cursor location.
^E Move block between tag and cursor to Special Buffer.
^Z Get contents of Special Buffer to cursor.
^R Pop garbage stack to cursor.

ORIGINAL MODE

^X Command mode.
^V Overtype mode.
^N Insert mode.

ORIGINAL OTHER

^L Insert line.
^C Abort any operation, reset to Command Mode.
^_ Edit command.
^S Repeat next keystroke four times.
^F^S Shift default case.
^F^C Change case of character at cursor.
^F^F Redraw display.

THESE ARE NOT INSTANT COMMANDS BUT HAVE SPECIAL MEANINGS

ESC Separates commands in command mode. Displays as $. $ in this sheet means ESCape. Two consecutive executes command. Additional escapes re-execute command.
TAB Move to next tab stop.
DEL Delete last character entered.
CARET Shifts next character typed to a control character. Type twice to enter caret.

THE FOLLOWING MOVE THE CURSOR. MAY BE PRECEDED WITH NUMBER n EG. n OR -N OR +N.

L Forward one line.
M Move one character.
W Move one word.
P Move one paragraph.
A Move beginning text in RAM.
UA Move to beginning of file.
Z Move end of text in RAM.
UZ Move to end of file.

DELETE CHARACTERS

D Delete character at cursor.
K Delete lines.

INSERT TEXT

Istring Insert string after cursor.
nI Insert ASCII code n.
Rstring Overwrite string at cursor.
nR Overwrite character at cursor.
n\\ Insert number n at cursor.

SEARCH AND CHANGE

HFstring Fast case-sensitive forward search.
HBstring Fast case-sensitive backwards search.
HMs1$s2$ Forward match s2, which balances s1, set error flag, used for brace,
HNs1$s2$ Backward match s2, which balances s1, set error flag, used for brace, paren matching.

THE FOLLOWING MAY BE PRECEDED WITH NUMBER n, eg -n, +n.

nSstring Search forward in RAM.
USstring Search entire file.
Cs1$s2 Change s1 to s2 in RAM.
UCs1$s2 Change s1 to s2 forward in file.

SEARCH STRING WILDCARDS

^E Any character.
^N Anything but character following.
^S Space or tab.
^W Word terminator (not A..Z0..9)
^L Next character literally.

STRING ARGUMENTS FOR I, C, S COMMANDS

^A@b Get string argument from buffer b.
^Aa Get string argument via calling command.
^A: Get string argument from command line.

ITERATION AND CONTROL

IJlabel Jump if I true to label.
I[...] Execute expression if I true.
I[...][...] Execute if else.
n[...] Iterate n times.
[...I] Iterate until I true.
I^ Proceed to next iteration if I true.

MISCELLANEOUS

E Suppress error messages.
nF Enter format mode, line width n.
F Toggle format mode.
Gstring Get key from keyboard, prompt string.
-Gstring Return instant command as command code+256.
N Begin Insert Mode.
T Tag at cursor.
.b Execute buffer b.
n.b Execute buffer b with argument n.
.bs1$s2 Execute buffer b with (optional) two args.
` Terminate currently executing command.
I% Return early if I true.
:x Label position label x.
? Enter trace mode.
..n Execute buffer n, starting at cursor position.

VARIABLES, NUMBERED 1 TO 100.

nVi Set var i to value n.
VAi Increment var i.
n, Push n on number stack.

Q COMMANDS PERFORM MISCELLANEOUS FUNCTIONS

nQA Set the number of passed string args in a macro call.
QB Ring the bell.
nQC Set control shift character to ASCII n.
nQD Delay for a time proportional to n.
nQE Set typeout mode to n.
nQF Set page separator character to ASCII n.
nQG Turn off garbage stacking if n=0.
nQH Insert n spaces at cursor.
nQI Set input radix to n.
nQJ Shift text display up or down n lines.
nQK Create .BAK files unless n=0.
nQL Set number of lines for ^U and ^J.
nQm Set user variable m (0 to 0) to n. Available to user I/O code.
nQNstring Direct console I/O, send string to console get char from from keyboard if n!=0.
nQO Set output radix to n.
nQP Set set page size to n.
nQQ Shift text display left or right n columns.
nQR Redraw screen, return key struck as @K.
nQS Set upper/lower shift character to ASCII n.
nQT Type ASCII character n.
nQU Set automatic disk buffering if n!=0.
nQV Enable tab fill if n!=0, else space fill.
nQW Turn on command line error display if n=0.
nQX Move cursor to column n.
nQY Allow cursor to 'free space' if n=0.
nQZ Limit cursor to column n.
QMC Copy to permanent macro area.
QMG Get contents of permanent macro area.
nQ! Store n in memory address @9.
nQ- Display number as positive if n=0.
q# Exchange cursor and tag.
nQ/ Set auto-indent level to n. If no n, auto-increment indent; -Q/ decrements.
Q\ Insert pmate's execution path into the buffer.
nQ Save edit buffer, format mode, garbage stacking mode. These will be stored after next error message. 0Q< disables this.
nQ Unget char n.
nQ^A Set random file position (low) to n, used by next XI.
nQ^B Set random file position (high) to n, used by next XI.
nQ^I Execute instant command n.
nQ^Lstring Send non-null string to status line. Suppress normal status if n=0.
nQ^M Suppress signon message.
nQ^P Set peek/poke segment. If no n to DS, -n sets to CS.
nQ^S Fast forward search for ASCII char n, set error flag if not found.
nQ^T Set disk used by PMATE.TMP. If no n use output drive else 0=A, 1=B.

X COMMANDS GENERALLY PERFORM DISK I/O.

XPpath Change current directory to path.
XA Append next page of input.
nXA Append next n pages.
-XA Bring back last page written to output.
-nXA Bring back last n pages.
XW Write next page to output file.
-XW Write back page to (temporary) input file.
-nXW Write back pages to (temporary) input file.
XR Write one page to output, read one page from input file. nXR XR n times.
-XR Write one page back to input file, read one back from output file. -nXR -XR n times.
XE End edit -- write remaining text and input file to output and close.
XJ Do XE then reopen file.
XFfile Define new input and output files.
XK Delete output and scratch edit buffer.
XC Close input and output as-is.
XH Exit pmate.
XIfile Input entire file.
nXI Input n pages from input file.
XOfile Output entire edit buffer to file.
nXOfile Output n lines to output file.
XM Go to monitor.
XDfile Create new copy of PMATE to file.COM with changes and macros.
XSd Log in disk drive d.
XT Type edit buffer to printer.
nXT type n lines beginning at cursor.
XL List directory at cursor.
XLfile List directory matching file.
XXfile Delete file.

B COMMANDS ACT ON BUFFERS

Buffers 0..9, text buffer T, buffer 0 if not named, @s, or @0 to @99. Place buffer name between two characters, eg BG gets buffer 0, BTG gets buffer T, B@23G gets buffer @23.

BK Kill buffer contents.
BG Get buffer contents.
nBC Copy n lines to buffer.
nBD Append n lines to buffer.
nBM Move n lines to buffer.
nBN Append and move N lines to buffer.
BE Edit buffer.
TAB STOP COMMANDS
nYD Delete tab stops at position n.
nYS Set tab stop at position n.
YK Kill all tab stops.
nYE Set tab stop every n positions.
YF Replace tabs with spaces.
YR Replaces spaces with tabs.
nYI Set indent to n.

NUMERIC EXPRESSIIONS

So far called n can be complex, up to 30 levels of parenthesis and the following operations:

+ Addition.
- Subtraction.
* Multiplication.
/ Division.
! Logical OR.
& Logical AND.
' Logical complement.
<</td> Less than.
> Greater than.
= Equal

ARGUMENTS IN ADDITION TO NUMBERS

"a ASCII value of character a.
@i Value of numeric variable i.
@A Numerical argument when macro called.
@B Value representing current buffer (0 for T, 1 for buffer 0, etc)
@C The character number.
@D The number of lines scrolled by ^U and ^U (set by QL).
@E Value of error flag.
@Ffile -1 if file exists else 0.
@G Length of last referenced string.
@Hstring Compare string to text at cursor, 0 if equal, else 1 or -1 greater or lesser.
@I Current input page.
@J The number of lines on screen for text display.
@K ASCII value of key struck after G or QR command.
@L Line number.
@M Amount of memory left.
@N Returns -1 if I/O files open.
@O Current output page.
@P Absolute memory address to which cursor is pointing.
@Q Column of previous tab stop.
@R Remainder of the last division.
@S Popped number off number stack.
@T ASCII value of the character at cursor.
@U -1 if auto-buffering enabled, else 0.
@V Currrent mode.
@W Current right margin.
@X Current column.
@Y Current left margin.
@Z Column of the next tab stop.
@@ The byte pointed to by @9.
# Move cursor to tagged position, get differnce between tagged position and current position.
@/ Current auto=indent level.
@^Ffile Length of file in kilobytes.

----

All works here unless otherwise specified are copyright 2026 by Tom Jennings. Permission is granted for personal use with no remuneration. Corporations or any organization or their agents, employees, consultants or other relationships human or otherwise, expressly prohibited without written permission.