I've implemented a large portion of the user commands. Still missing is program listing, tracing and printing the summation data. Following is the new readme file doc/printing.txt:
Printing with WP 34S
The Windows emulator and the image calc_ir.bin contain printing commands.
To set up printing on the emulator you will need to install the HP 82240B
emulator by Christoph Giesselink: http://hp.giesselink.com/hp82240b.htm.
The default UDP setup works fine. You need to open the graphic display to
see all output.
To print on the device you have to modify it:
- Add a crystal.
- Add an IR transmitter.
The necessary schematics will be provided.
Setting the operation mode
PMODE n (in MODE) sets the printing mode:
0 - Default mode, use the printer character set where possible.
All characters have the same width of 5 columns + 2 columns spacing.
1 - Use the variable pitch display character set instead. This results in
some jitter on the printout but packs more characters on a single line.
2 - Use the small display font which packs even more info on a single line.
3 - Send the output to the serial channel. This does not do any character
set translation and works only for plain ASCII. The line setup is the
same as for serial communications: 9600 baud, 8 bits, no parity.
PDLAY n (in MODE) sets the LF delay in tenths of seconds.
SF T / CF T enable / disable tracing.
All following commands are in P.FCN but will eventually be relocated to a
new printing catalogue.
PRTPGM prints the current program. (To be implemented.)
PRT[alpha] prints the contents of the alpha register.
PRT[alpha]+ prints alpha but does not send a line feed. This is useful
for chaining output or labeling numeric data.
PRTR n prints any register (including stack or local registers) without
labeling the output. The data is printed to the right. You can add a label
with the alpha print commands above. PRT X can be reached from the keyboard
with f+EXIT (the yellow arrow).
PRTSTK prints the stack registers with a label to the left.
PRTREG takes a descriptor of the form rrr.nn in X (see R-SORT for an
example) and prints the registers with a label to the left. To print local
registers start with 112. nn=00 is treated as 'all available' registers.
PRT[SIGMA] prints the summation registers. (To be implemented.)
Formatting and special commands
PRTADV sends a line feed and causes the printer to spit out any pending
PRTT n positions the print head to a chosen column (0 to 165). This can
be used for formatting, especially when using PMODE 1 or 2. A simple
plot function is possible, too.
PRTC n sends a single character to the printer. The command uses the
current PMODE setting. The printer buffer is limited to 200 bytes. If
you print many characters in mode 1 or 2 with this command a buffer
overrun may occur because of the overhead of adding the necessary two
byte ESC code to each character pattern. If that occurs print multiple
characters at once with the commands PRT[alpha]+ or PRT[alpha] instead
which buffer the characters in larger graphic blocks.
PRTB n sends a single byte without any translation. You can use this to
send control codes to the printer. The column counter is not updated
which means PRTAB and right justified number printing won't work if you
send commands which affect the print position. Use at your own risk!
The above commands allow indirection which limits the argument that can
be passed to values from 0 to 127. Larger values can be sent by putting
them in a register and using indirection.