Here'sSecond, while SALUT is not a short writeupdirect down port of what I remembered when browsing thruIBM's HLASM Toolkit, its instructions do reassemble the SALEX1toolkits macros for structured programming.SAL file Looking at the mainframe documentation may give some insight. Hope it's what you're looking forAdditionally there's a real nice introduction written in 1999 (*1).
Here a short writeup of what I remembered when browsing thru the SALEX1.SAL file. Hope it's what you're looking for.
Caveat: I never really used SALUT. I had my own system build with macros (no preprocessor needed), modelled after a mainframe programming system COLUMBUS. Though I studied its workings to see if it would be a viable alternative - which it was not. So this is a short read mostly from memory (*1*2)
SALUT - Structured Assembly Language UTility - is a preprocessor based on direct replacement of Pseudo-Statements by labels and 8086 instructions. It will not rearrange or change any other instruction - although it as well beautifies the source (*2*3). SALUT provides only structures for selection and iteration. Pseudo-statement will only be turned into labels and (one or more) jump instructions.
In addition CXZ, NXCZ may be used in some cases (*3*4)
By nature all 8086 conditional jumps are of SHORT type(*4*5), that is an 8 bit offset allows a target distance of +/-127 locations. To allow structures holding statement sections of more than 127 bytes SALUT may insert a combination of conditional and near jump, but it needs to be told so by adding a parameter named 'LONG' (*5*6)
IF AL=0Dh OR AL=0Ah THEN (handle linefeed) ELSE (char out) (*6*7)
The resulting code shows an important weakness: Condition tests are always generated as basic Jxx statements, not obeying the LONG keyword, making the code not compile if the condition creating statements in total pass 127 bytes (*7*8).
Of course they managed to add even more complexity(*8*9): One can add a COMPLEX keyword to SEARCH which then would enter the loop code only after a following SARTSRCH statement, allowing to jump over some code during first iteration (*9*10).
will show all its glory (*10*11). The virtual disk still has 8 KiB unused space, enough even for complex test scenarios. Have fun.
*1 - The paper was presented at a Share meeting ca. 2000, to convince programmers about the advantage of structured programming. A nice remainder Assembly is anything but a single mindset frozen in the 1960s. Of course that can be seen with other 'primitive' languages as well - like some guys still programming K&R C using a C++20 compiler (GCC 13/MSVC 14) ... yes, guilty as charged :))
*2 - No, my memory is as bad as anyone elses if not way worse, but a short DEBUG session with the version at PCJS did help retrieving the most basic parts.
*2*3 - Beside outputting a new Assembler source it produced also a beautified version of the input file. A feature I really liked and used a lot to turn ugly micro sources into ones formatted as Assembly was intended to be :
*3*4 - That's due the fact that only JNCXZ does not exist as 8086 instruction and SALUT does not provide any replacement code when needed.
*4*5 - It wasn't until the 386 that a NEAR (16 bit) relative distance was introduced.
*5*6 - Kind of an odd choice when Intel already defined that addressing as NEAR.
*6*7 - Yes, stupid example. My only excuse it that it's 4 AM.
*7*8 - Personally I wouldn't consider this an issue as condition creating statements need to be short - except IBM does exactly that in it's only example.
*8*9 - That whole SEARCH construct is waste of time- way too complicated and only good to serve an edge case. SALUT would be way more useful by adding more basic SP constructs. Just imagine how much a basic case/switch statement can improve handling and readability over nested IF mining.
*9*10 - Seriously, I have a hard time to express how much this anoyes me by going against everything structured programming is about. SP is meant to make life simple by adding straight structures, easy be followed in top down fashion with no hidden traps and detours. It is IN NO WAY about providing syntactical sugar for byzantine constructs.
*10*11 - I would think that SALUT is written using CP/M compatible FCB access as produced file length always end up in multiples of 128 bytes.