- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ALLOC Taken from the Conroy dynamic storage handlers entrys: ALLOC CFREE FREE FREESP MALLOC MFREE $$ALOC $$FREE $$MAVL $$MLIM $$MTOP - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BUF A scratch buffer used by printf entrys: $BUF$ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CSAV Register save and restore (from Conroy C) entrys: $$CRET $$CSAV - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CSI Handles file name parsing using CSI routines entrys: CSIBLK CS.DIF CS.DVF CS.EQU CS.INP CS.MOR CS.NMF CS.OUT CS.WLD C.CMLD C.DEVD C.DIRD C.DSDS C.FILD C.MKW1 C.MKW2 C.SIZE C.STAT C.SWAD C.TYPR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DELIMS Default delimeters for the FIELDS routine entrys: BSLASH COLON COMMA DQUOTE LBRACE RBRACE SLASH SPACE SQUOTE TAB UPARRO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DIR Rsx directive handler entrys: $$DIR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FIELDS Break a string into fields entrys: FIELDS | fields - returns fields delimitted by lots of things | | input string and address of pointer array, returns n pointers and value n | | fields are separated by: | whitespace | comma | slash | back slash | colon | fields can be quoted as follows: | {...} | ^x...x | "..." | '...' | | the separators can be equated to garbage (-1 is ok) to cancel their | meanings. | | fields(string,vector) | char *string | int *vector returns number of fields | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FOPEN Open a file entrys: FOPEN | | fopen(fdb,filename,option) | char *fdb,*filename,*option | fdb is a pointer to a real rsx file descripter block (fcs style) | filename is an asciz string file name | option is an char string of "r" for read | w write | u update - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FRERRO Free dynamic storage error routine entrys: FRERRO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GET Get a record from a file entrys: GET | | get(fdb,string,maxchars) | char *fdb,*string; int maxchars | uses get$ macro to read a line from file fdb, into the string | no more than maxchars are actually transfered. string is null terminated | (this ain't no good for binary files of course) | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INR input record i/o fdb lun 1 - a static fdb entrys: INR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LTOA Long to Ascii entrys: $$LTOA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MULL Multiply routines entrys: MUL$L MUL$LI - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OUTR Output fdb, lun 2 - a static fdb entrys: OUTR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SPRINT printf routine entrys: SPRINT | | sprint(buffer,string,p1,p2... | char *buffer,*string | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - STR string routines entrys: EQ POS SEG VAL | | String routines - these are taken from basic-11 string functions. | These are of course C callable too. | | FUNCTION eq[a,b,n] | | compares string at a to string at b, compares n chars, | returns 0 if not equal, 1 if equal | | FUNCTION pos[in,of,st] | | finds position in 'in' of 'of' starting the search at the 'st'-th | character position in 'in'. returns 0 if not found else position. | e.g. pos["in-here","he",#1] returns 4 | | FUNCTION val[s,base] | | returns the binary value of the ascii string in s. Base may be 2-10. | may have a '-' sign for two's compliment of resultant value. | | FUNCTION SEG[s,in,from,too] | | extracts segment in 'in' positions 'from' to 'to'. Result into s | returns length of s | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - STRLEN string length used by system entrys: STRLEN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SYSTEM spawning routine entrys: SYSTEM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TIME returns a string with time and date entrys: TIME | | return time as a string | looks like: dd/mm/yy hh:mm:ss | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TYPE$ types via lun 5 onto terminal entrys: $TYPE$ | | push #address of asciz string | jsr pc,$type$ | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;+ ; Doubly linked list routines ; ; FUNCTION ilist[lhead] ; Initialize a list head. List heads are 6 byte ; arrays where the 1st word is initialized to ; the address of the listhead itself, the 2nd ; and 3rd words are the links. If there was any ; data in this node then it would have been at ; word 4. Word one points to this location. All ; nodes look like: ; ; word 0 right link ; word 1 left link ; pointers->word 2-n data ; ; A listhead looks like: ; .word address-of-list ; .word pointer-to-right-link ; .word pointer-to-left-link ; address: (no data so nothing allocated here) ; ; Then the listhead array is used by referencing ; the contents of the first element which points ; to the first node. This is all only necessary ; to simplify matters since list operations ; assume a circular list where all nodes have ; two pointers. ; ; ; FUNCTION delete[ptr] ; Deletes the node ptr from the list it is in. ; Returns ptr which is now a doubly linked list ; of one element. ; FUNCTION insert[x,newx] ; Inserts the node newx after the node x in the ; list x is in. returns pointer newx. ; FUNCTION prev[ptr] ; Returns a pointer to the previous node in the ; list. ; FUNCTION next[ptr] ; Returns a pointer to the next node in the ; list. ; FUNCTION release[ptr] ; This releases storage for the node pointed to ; by ptr. ; FUNCTION new[size] ; Allocates a node for a structure of size ; "size". Also allocates storage for the link ; fields (which precede the storage of "size" ; bytes. The pointer returned points to the ; start of the data (not the links which are a ; -2 and -4 from the data). Note that release ; must be used to return storage allocated by ; new since each of these routines know about ; the extra 4 bytes of linkage. New also ; initializes the link fields such that the node ; is a complete list of one item. ;-