Hi Geir,
Your first and second examples, X=0?2, X>Y?2, would be fairly simple to write. Study the mainframe code at:
1619 NOSKP
162E SKP
to see how HP does it. There are three cases: 1) keyboard execution (YES or NO displayed), 2) SST (F51) and 3) running (f13).
The problem with this type function is that there are so many of them, one could quickly fill up a FAT with short routines.
fs?2 01
dse2 00
These are another problem entirely. It is impossible to merge the postfix with the prefix so these would be two lines each, eg. skip two or three lines. One could write a function like DSE00?2 as a single line yet it would work only with register 00. So if one needed something like ISG2 37 it would require four bytes of ram, which is probably not an improvement!
Sometimes it is necessary to use unmerged functions, last year Angel Martin asked me to write a subroutine for his complex rom functions ZSTO, ZRCL and Z<>. These functions can now take an argument which follows on the next line, eg. ZSTO 27 using two lines. His functions also work from the keyboard, which was a surprize to me. The trick he showed me is to use a programmable entry (non-null first word) with a mainframe prompt.
Best
Edited: 2 May 2006, 4:32 a.m.