The counters variants are evaluated at parse time so sequences like the following where data is to be sent to port B instead of port C (when counter 2 is 256) are fine:
<set c1=c2*255><op c1> / <set c1=c2*123><op c1> / <set c1=c2*255><op c1>
Using an input signal allows the output bits to follow a key press with code like this:<o 0 "+left shift"> <o 255 "-left shift">
Using a revert output parameter like this <ro 250,255> obviates the need for a -buttonname code to reset output lines.If your machine happens to have a standard printer port (by that I mean one that lives at port 0x378 all the time and doesn't jump around like some add on devices do) then there's a rather nice test that can be done using inpout32.dll (once you've run it's setup program, InstallDriver.exe in the DMDX program folder, as administrator anyway, I keep forgetting about that) that uses the fact that reading port 0x378 returns whatever was most recently written to port 0x378 (not always a given) so we can test how well DMDX is synchronizing itself with the raster, how well the millisecond callback is operating not to mention the actual mechanics of outputting data by sending what looks like a key press 1000 ms after a clock on and seeing whether the RT is in fact 1000 ms:
<vm desktop> <id keyboard> <msfd 1000>
<ro 100,255>
<id pio12> <invertoutput>
0 "using inpout32.dll 378 378 this test should
see", @1 "1000 ms RTs" <op 255>;
+1 "clock on" * / <op 4>;
+1 "clock on" *
/ <op 4>;
+1 "clock on" * / <op 4>;
+1 "clock on" * / <op 4>;
0
"done";
Here's a partial truth
table to various port combinations
possible with PIO12:
Port C
Bit.........Bit
7 6 5 4 3 2 1 0
---------------
0 0 0 0 0 0 0 0
<ox 0> <o 0>
0 0 0 0 0 0 0 1
<ox 1> <o 1>
0 0 0 0 0 0 1 0
<ox 2> <o 2>
0 0 0 0 0 0 1 1
<ox 3> <o 3>
0 0 0 0 1 0 0 0
<ox 8> <o 8>
0 0 0 0 1 0 0 1
<ox 9> <o 9>
0 0 0 0 1 0 1 0
<ox a> <o 10>
0 0 0 0 1 0 1 1
<ox b> <o 11>
0 0 0 0 1 1 0 0
<ox c> <o 12>
0 0 0 0 1 1 0 1
<ox d> <o 13>
0 0 0 0 1 1 1 0
<ox e> <o 14>
0 0 0 0 1 1 1 1
<ox f> <o 15>
0 0 0 1 0 0 0 1
<ox 11> <o 17>
1 0 0 0 0 0 0 0
<ox 80> <o 128>
1 1 1 1 1 1 1 1
<ox ff> <o 255>
Possible with PIO12output16:
Port C
Port B
Bit.........Bit Bit.........Bit
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
--------------- ---------------
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
<ox 1> <o 1>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
<ox 100> <o 256>
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1
<ox 101> <o 257>
1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
<ox 8080> <o 32896>
Possible with PIO12output24:
Port C
Port B Port A
Bit.........Bit Bit.........Bit Bit.........Bit
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
--------------- --------------- ---------------
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <ox 1>
<o 1>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
0
<ox 100> <o 256>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1
<ox 10000> <o 65536>
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 <ox
10101> <o 65793>
1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 <ox
808080> <o 8421504>
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 <ox aaaaaa> <o 11184810>