Z - A NEW PROGRAMMING LANGUAGE Z is a new concept in programming languages designed to appeal to hackers, combining the best points of C with the sheer delights of spaghetti programming encouraged by FORTRAN and other forms of pidgeon BASIC. (I know you can wite structured FORTRAN, but who in their right mind would want to ?). It is well known that hackers like to write mangled code suitable only to be read by other real programmers or to be served with pesto sauce. Z appreciates this. Also, hackers like to be able to get access to those fiddly corners of memory the OS tries to hide from you. This again is allowed for. Of course, none of this is made simple. The real success in designing Z was the invention of the COMEFROM command. Analagous to the GOTO we know and love, the COMEFROM allows new heights of tangled code. Other noteable structuring commands are listed below, along with Z's unique logical tests for loops : DO...WHILE YOUFEELLIKEIT DO...WHILE NECESSARY DO...UNTIL LUNCHTIME DO...UNTIL FINISHED DO...BECAUSE ISAYSO DO...NOT DO...BEDOBEDOBEDO (The Sinatra Loop) DO...UNTO OTHERS (The Christian Construct) Memory access is by means of the POKE and PROD commands. eg POKE(hole in OS), PROD(That bit of memory there until it wakes up) and so forth. There is no limit on addresses or values. WORD and PARAGRAPH boundaries may be freely ignored at the OS's peril. There are several pseudo-variables to help with self- modifying code. They include : You_are_here The current address You_were_here The last address operated at You_will_be_here The next address (Only on Clairvoyant OS) Sensitive_code_area Where you most want to hit Target_zero Bottom of OS SEP Somebody Else's Program (heh heh !) Dont_poke_here_under_any_circumstances_whatsoever Well, what are you waiting for...? Variables won't and constants aren't, but that's all part of the fun. Variable types include the following : REAL The value is stored somewhere IMAGINARY You have to keep track of the value yourself INTEGER ie A rounded FLOAT or REAL FLOAT The value changes CHAR Burnable memoy area STRING A knot in a piece ofstring is an excellent aide-memoire we find DOUBLE Doubles the memory space taken up by program There is, of course, no type checking at any point. The address of any variable can be accessed by the WHERETHEHELLDIDIPUTIT? command. The contents of an address are got by using the WHATTHEF***ISTHATDOINGTHERE? function. The single most useful C command I think is the #DEFINE. I have carried this over into Z. #DEFINE can be used on anything. Notable past triumphs include These, however, all show a lack of imagination. #DEFINE ME=GOD is more like it I feel. Subroutines and functions all help to make those programs structured and readable. Z tries to prevent this by limiting all such subroutine names to one letter and three numbers. The letter must come first. Z is not usually case sensitive, although on an off day this could be an explanation of why your program isn't working. Subroutines must all be placed at the end of the program file, in reverse alpha, forward numerical order.This implifies stack operations and saves us at least 1 nanosecond per call (And two weeks debugging of the compiler). eg z001 is the first routine, then z002 ... a998,a999. You get used to it. Mathematical operations are limited to +-/* and all the usual bit-wise logical operators. Z also includes illogical operators : SNOR Go to sleep if X nor Y ANDY Returns true if X is true, there's a blue moon, and a Z in the month SNOT 'TIS ! EXOR It used to be OR... All calculations are in reverse polac notation a variant on reverse polish. The stack is five reals deep (that's ten integers, three and a half chars or 1.4142 floats). No warning of stack overflow is given. Stack overflow is directed to sensitive areas of the OS so you'll know when it happens. Stack operators include : SWAP Swaps any two numbers on the stack (no paramters) TOPSTACK Takes head off stack DUP Duplicates the third item on the stack (You always want this command don't you ?) PUSH Moves the stack a bit POP Fills the stack with fizzy drink More news on the compiler/bugger if and when I write it.