On October 23rd, 2022, Alfred Arnold updated his Macro Assembler AS to include support for the PALM instruction set (as of 1.42 Bld 231, with some subsequent fixes/updates around February 2023). This was based on Christian Corti’s prior discovery of the “Chapter 2” document that described the instruction set. For a copy of the document, refer to here.
This assembler is available for download at the following link:
The Macro Assembler AS (rwth-aachen.de)
The following outlines how I write PALM assembly on a modern PC and then transfer it over to the physical IBM 5110 system.
TABLE OF CONTENTS
PART 1: Producing the PALM binary.
PART 2: Connecting to the IBM 5110 via SerialIO to the Keyboard
PART 3: “Uploading” Binaries by Invoking the IBM 5110 DCP
ADDENDUM: 5110VEMU KEYBOARD SHORTCUTS
ADDENDUM: KBD5110 SERIAL-CODES
ADDENDUM: Additional notes about GENASM PALM

PART 1: Producing the PALM binary
Additional PALM examples will be forthcoming. It is confirmed that C. Corti’s original “ball bounce” example (see here or here) get assembled correctly, but one modification is needed to support his original usage of $-style numeric values. See below as an example:
include "ebcdic_5110.inc" ; or use ebcdic.inc
intsyntax +$hex,-x'hex' ; support $-style hex (not IBM 0x style)
codepage cp037 ; activate a string mapping of chars

The execution of ASW and the results should look like this:

The ASM input is assembled into a .p that has some “meta-data” header/footer content. This can be stripped off using the p2bin.exe tool.
I prepare a batch file to perform both steps like this:

asw -i ..\include sample7_outc.asm
p2bin sample7_outc.p
emu5110_release_x64 a -1 command_input_ASM_GO2000.txt sample7_outc.bin
That is, I assemble and convert to .bin, and run in the emulator first to check things out before uploading to the actual IBM 5110. I’m not sure if ASW executable returns any specific errorlevel code if the assembly fails to build, but that would make the script even better.
PART 2: Connecting to the IBM 5110 via SerialIO to the Keyboard
Refer to the github code located here. This contains code for an Arduino Nano (5110KBD.c) or an ESP32 (main_ESP32_IBM5110_serial_translator.c). The github docs also include wiring notes (which you can wire up to the keyboard socket itself, or wire up to the A1 board — or both at the same time). Additional details can be found at the VCF discussion here.
BELOW: Only one connection is necessary. Using the upper A1 approach lets you keep using the original IBM 5110 keyboard.

NOTE ON IBM 5100: The main portion of this code is compatible with an IBM 5100, in terms of what pins are used to connect to the keyboard and the associated protocol. The difference is that the IBM 5100 will use different “scan codes” (for the keyboard). There is a hard-coded table within the code that is the only thing that needs to be updated to make this work for an IBM 5100.
NOTE ON BAUD RATE: There was nothing really sacred about the 38400 baud rate, that is just what I arbitrary chose when initially writing the code. All I can say is that “it works” with the IBM 5110 and is not “too fast” (faster speeds may end up dropping characters). I calculated out that at this speed, we’re essentially emulating a typing speed of about 300 WPM (but 100% accuracy) so it is far faster than normal typing (and with no wear and tear on the keyboard itself).
In ZOC (or any equivalent or suitable terminal program), these are the settings I used for the serial connection.

And in case it matters, there is one other setting that may be important the “Text Sending” settings. A small delay between characters may be necessary.

PART 3: “Uploading” Binaries by Invoking the IBM 5110 DCP
NOTE ON IBM 5100: This same approach will also work on the IBM 5100, which also has a built in DCP. Some specifics may be slightly different (e.g. the IBM 5100 DCP doesn’t automatically go to the next line at the end and user must press EXECUTE).
If using KBD5110 standard serial connection, after the IBM 5110 has booted up and you’re at a BASIC prompt, then enter the DCP with the following parsed commands:
ZOC TERMINAL PARSED AS (on IBM 5110)...
CTRL-L HOLD
CTRL-G CMD-MINUS
CTRL-T CMD-MULTIPLY (STAR)
or (these below could be part of the text file in next section)
^HO^ HOLD
^CM^ ENTER DCP
(can return to BASIC, but only allows A and D commands)
^CS^ ENTER DIAG DCP (cannot return to BASIC, allows A, C, D, Bx commands)
i.e. from ZOC terminal you would type " ^HO^^CM^^CS^ "
After you enter DIAG DCP at least once, then you just need the first two commands to re-enter DIAG DCP after that.
Then to “upload the binary” I do a few steps. First, open the .bin binary in HxD (or some hex editor). I like HxD because I can highlight just the hex values and CTRL-C will copy just those (even though “Decoded text” is als highlighted).

Then paste the hex into a notepad or text file, as shown below. The commands at the top (A2000 = ALTER address 2000) and at the end (starting with ^EX^) are necessary. After pasting the HxD hex, it is also necessary to remove spaces. You can do this with Search and Replace (search for SPACE and replace with BLANK). It should end up looking something like this (the hex sequence will end up on one line:
A2000^E0^^D0^
DE010200D901404059E18106CE17F007D7015C5CD8015C40D901405C0B04D501025D860E5758F600C60BA003A53FF00BD50102DF860A5758F600C60BA003A53FF00BD501032186085758F600C60BA003A53FF00BD50102A3860C5758F600C60BA003A53FF00BD501032586085758F600C60BA003A53FF00BD501021D5858D50102255858D501026359515858D501029F5858D50102A55858D50102E15958D50102E55858D501031957515758D501032757515858D501035959515758D50103675758D501039B5758A53F5958A53F5958D50103A75858D501045B5758D50104675858D501049959515758D50104A75758D50104D957515758D50104E757515858D50105215958D50105255858D501055F5858D50105655858D50105A359515858D50105DD5858D50105E55858DD010039D5010069DC58CDC5F005A700077D087DA900098D00B40000^EX^
^E1^^CA^
Copy the above (CTRL-A to highlight all, CTRL-C to copy to clipboard). Then PASTE (CTRL-V) all that content after ALT-TAB over to ZOC (or whichever terminal program is being used). You should see the hex-sequence getting “typed” into the DCP machine code monitor.
When it is done, then use “BR 2000“<ENTER> to execute the program.
TBD
ADDENDUM: 5110VEMU KEYBOARD SHORTCUTS
A typical “IBM PC” keyboard doesn’t naturally/natively support all the same keys that were on the original IBM 5100/5110. In addition, the IBM 5100-series also support “overstruck” keys. One prime example is how to type “!” requires an “overstruck” of two keys.
MODERN_KEY IBM 5110
! (will become ! on screen via two-keys)
` HOLD key (pause), this is the apostrophe near ~ TILDE
CTRL-TAB CMD-MINUS
SHIFT-TAB CMD-PLUS
~ CMD-MULTIPLY
CTRL-BACKSPACE CMD-LEFT ARROW (destructive backspace)
(up, down, left right) cursor movements
ESC ATTN
TAB CMD-ATTN
* KEYPAD-MULTIPLY
- KEYPAD-MINUS
/ SLASH (on bottom next to $, not keypad)
\ BACKSLASH (shifted version on bottom)
+ KEYPAD-PLUS
$ DOLLAR SIGN
| SHIFT+M (vertical bar)
< > ; : @ & ? ' " ( ) (as expected, SHIFT signal, ? = SHIFT+Q)
, . # = [ ] (as expected, . = bottom, not keypad)
A-Z, 0-9 (as expected)
ENTER EXECUTE
BACKSPACE LEFT-ARROW (non-destructive)
EMULATOR KEYS (no IBM 5110 translation)...
{ move down 512 bytes in memory monitor
} move up 512 bytes in memory monitor
F4 toggle TRACE mode (disassemble on-the-fly)
F5 toggle STEP mode
F6 STEP one instruction
F7 STEP 100 instructions
F8 STEP 1000 instructions
F9 STEP 10000 instructions
F10 STEP 100000 instructions
(don't press F11, WinTerminal will go full screen and mess things up)
F12 show LEVEL 0 instruction count (main executive)
ADDENDUM: KBD5110 SERIAL-CODES
When communicating to the IBM 5110 keyboard over the “standard” KBD5110 project serial connection, the following special codes are supported to special keys of the system:
ASCII IBM 5110 Key
CTRL-A UP ARROW
CTRL-Z DOWN ARROW
CTRL-P RIGHT ARROW
CTRL-O LEFT ARROW
CTRL-L HOLD
CTRL-M EXECUTE
CTRL-R CMD-ATTN
CTRL-T CMD-MULTIPLY (STAR)
CTRL-G CMD-MINUS
CTRL-B CMD-PLUS
ESCAPE ATTN
ENTER (not translated, use ^EX^ for EXECUTE)
NOTE: To enter lower case mode on the IBM 5110 -- press HOLD, then SHIFT-DOWN. This will be ^HO^^SD^ (SHIFT-UP to go back to uppercase during HOLD)
PARSED KEYS
-----------
^LE^ LEFT ARROW
^RI^ RIGHT ARROW
^UP^ UP ARROW
^DO^ DOWN ARROW
^SU^ SHIFT-UP ARROW
^SD^ SHIFT-DOWN ARROW
^HO^ HOLD
^EX^ EXECUTE
^AT^ ATTN
^CA^ CMD-ATTN
^CP^ CMD-PLUS
^CM^ CMD-MINUS
^CS^ CMD-MULITPLY (STAR)
^Dx^ DELAY (x = 1 to 9, delay x * 100 milliseconds)
^E0^ TURN OFF INVOKING EXECUTE KEY
(used when scripting text files that contain CRLF at end of line)
^E1^ TURN ON INVOKING EXECUTE KEY
ADDENDUM: Additional notes about GENASM PALM
From a February 1977 “IBM Internal Use Only” document by H.J. Myers:
"GENASM PALM
IT TAKES ABOUT 45 MINUTES ON A 5100 TO COMPLETELY PROCESS ALL OF 'PALM' TO PRODUCE THE PALM ASSEMBLER WHICH IS IN '6 PALM' ".
“6 PALM” refers to hand-written notes in the document, which indicate that the 6th index into the Assembler Generator tape is a file called “PALM.”
Sample of a PALM microcode program…
