;*********************************** ; JOBNAM.M68 - "Just like JOBALC" ; Usage: JOBNAM ; by Dave Heyliger ;*********************************** SEARCH SYS ; search the normals SEARCH SYSSYM SEARCH TRM OBJNAM JOBNAM.LIT ; define final product PHDR -1,0,PH$REE!PH$REU ; "good programming" .OFINI ; define a variable called NAME .OFDEF NAME,8. ; NAME will be a variable 8 bytes maximum .OFSIZ IMPSIZ ; IMPSIZ will hold total variable size(s) GETIMP IMPSIZ,A3 ; A3 will point to all our variables JOBIDX A6 ; classic "get my status pointer" line LEA A1,JOBNAM(A6) ; A1 points to RAD50 JOB name in memory LEA A2,NAME(A3) ; A2 points to NAME variable we defined PUSH A2 ; save pointer to NAME on stack UNPACK ; create ASCII JOB name in NAME UNPACK ; JOB names are up to 6 characters long CLRB @A2 ; end NAME variable with "0" (null) POP A2 ; re-point A2 to start of NAME TYPE ; just like JOBALC TTYL @A2 ; display JOB name to screen CRLF ; move cursor to new line EXIT ; and return to the dot END ; end of source code file ;******************************************** ; JOBLST.M68 - lists all JOBs to the screen ; Usage: JOBLST ; by Dave Heyliger ;******************************************** SEARCH SYS ;Grab all MACRO definitions SEARCH SYSSYM SEARCH TRM OBJNAM JOBLST.LIT ;Define the final product PHDR -1,0,PH$REE!PH$REU ;Program is Re-entrant & Re-useable VMAJOR=1. ;Major version number of the program VMINOR=0. ;Minor version number of the program VEDIT=100. ;the edit number of the program .OFINI ;OFfset INItialization: .OFDEF BUFFER,8. ;OFfset DEFinition - "BUFFER" .OFSIZ IMPSIZ ;IMPSIZ is the final size of bytes (8) GETIMP IMPSIZ,A5 ;A5 points to BUFFER MOV JOBTBL,A0 ;A0 points to list of JCB addresses LOOP: MOV (A0)+,A4 ;A4 points to a single JCB MOV A4,D0 ;set the status register with this MOV BMI EXIT ; if -1 (or negative) return to the dot BEQ LOOP ; if 0 then get another address LEA A1,JOBNAM(A4) ; else point A1 to JOB name RAD50 LEA A2,BUFFER(A5) ; and point A2 to BUFFER UNPACK ; create ASCII JOB name UNPACK ; ...for up to 6 digits CLRB @A2 ; end all strings with a null (0) LEA A2,BUFFER(A5) ; Repoint A2 to BUFFER TTYL @A2 ; type out the JOB name CRLF ; add the RETURN BR LOOP ; and then get another JOB EXIT: TYPE CRLF ; end of JOB list EXIT ;return to AMOS END ; end of source code .