Remember, you're using the C22 adapter to actually make your connection to the parport. If you look at the CNC4PC manual for the adapter, you'll see that this code uses pins 8 and 9 and the magic of mult to come up with the increment switch settings. Here's a link to the CNC4PC manual for the C22.
Note: You're going to have to translate some pins on the C22 because you re-wired your pendant.
I made some modifications to the file EMC Documentation Wiki: Parallel Port Tester
Zip file attachment, containing the hal and xml, plus a pdf with the explanation.
With this test I added at the end of file hal.
the contents of the file "Adding_to_end_hal_file.txt"
and works perfectly