%'********************************************************************* %' %' TITLE: NJOBCF.MAC %' %' DATE: 26 September 1984 %' %' ABSTRACT: This module contains the following macro definitions: %' %' JOB( dir_sz, pool_min, pool_max, max_obj, max_tasks, %' max_job_priority, e_h_start_addr, e_h_mode, %' job_flags, init_task_priority, init_task_entry, %' data_seg_addr, init_task_stack, stack_size, %' task_flags) %' %' %'********************************************************************* $genonly $NOLIST %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' UTILITY MACROS %' %' Define the utility macros used by system configuration macros %' in this module: %' %' TRIM -- cleans up blanks from the input parameter. %' ARG -- gets the next comma delimited parameter trimmed of %' spaces. %' POINTER -- gets an argument in the form of an address. %' HEX_IT -- adds a leading 0 and an ending H to the input %' parameter if not already present. %' ABS -- returns the absolute value of a hex number. %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' TRIM(a) -- returns the input parameter trimmed of leading and %' trailing blanks. %' %*DEFINE(trim(a)) LOCAL x y (%MATCH( x y)(%a)%x) %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' ARG -- gets the next comma-delimited arg from variable named %' tail, stripped, and trimmed. %' %*DEFINE(arg) LOCAL a (%MATCH(a,tail)(%tail)%TRIM(%a)) %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' HEX_IT(hex_what) %' -- forces argument to hex, adds leading zero and trailing %' "H" if necessary. HEX_IT does not clean up (trim) the %' input parameter. %' %*DEFINE(hex_it(hex_what)) LOCAL last_char (%' %DEFINE(last_char)(%SUBSTR(%hex_what,%len(%hex_what),1))%' %if( %NES(%SUBSTR(%hex_what,1,1),%(0)) )then(%(0))FI%' %hex_what%' %if( %NES(%last_char,%(h)) AND%' %' '%NES(%last_char,%(H)) )then(%(H))FI%' )%' %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' POINTER -- gets an argument that must be an address. %' %*DEFINE(POINTER)(%MATCH(base_part:offset_part)(%arg)%' %hex_it(%offset_part),%hex_it(%base_part)) %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' END UTILITY MACROS %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' Define the User_job descriptor structures. %' User_Job structure is used only by the JOB macro. %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; USER_JOB struc dw ? ; dir_size dd ? ; pool_min dd ? ; pool_max dw ? ; max_objects dw ? ; max_tasks db ? ; max_job_priority db ? ; exception_handler_mode dd ? ; exception_handler_entry dw ? ; ditto dw ? ; job_flags dw ? ; task_priority dp ? ; task_entry dw ? ; data_seg dd ? ; stack_ptr dw ? ; ditto dd ? ; stack_size dw ? ; task_flags USER_JOB ends %' USER_JOB2 struc dw ? ; dir_size dd ? ; pool_min dd ? ; pool_max dw ? ; max_objects dw ? ; max_tasks db ? ; max_job_priority db ? ; exception_handler_mode dd ? ; exception_handler_entry dw ? ; ditto dw ? ; job_flags db ? ; task_priority db ? ; filler dp ? ; task_entry dw ? ; data_seg dd ? ; stack_ptr dw ? ; ditto dd ? ; stack_size dw ? ; task_flags USER_JOB2 ends %' USER_JOB1 struc dw ? ; dir_size dd ? ; pool_min dd ? ; pool_max dw ? ; max_objects dw ? ; max_tasks db ? ; max_job_priority db ? ; exception_handler_mode dp ? ; exception_handler_entry dw ? ; job_flags dw ? ; task_priority dp ? ; task_entry USER_JOB1 ends %' USER_JOB3 struc dd ? ; stack_ptr dw ? ; ditto dd ? ; stack_size dw ? ; task_flags USER_JOB3 ends %' %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' JOB: MACRO %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' Set number of JOBs initially to zero. %SET(n_jobs,0)%' %' %*DEFINE(JOB(arglist))(%DEFINE(tail)(%arglist)%' %' %' Increment number of JOBs each time this macro is invoked. %SET(n_jobs,%n_jobs+1)%' %' %' Output job number and info. ;*** JOB #%n_jobs ***; %' User_Job< %arg, ; dir_sz & %arg, ; pool_min & %arg, ; pool_max & %arg, ; max_obj & %arg, ; max_tasks & %arg, ; max_job_priority & %arg, ; e_h_mode & %arg, ; e_h_entry & %arg, ; job_flags & %arg, ; task_priority & %arg, ; task_entry & %arg, ; d_seg & %pointer, ; stk_ptr & %arg, ; stk_size & %arg ; task_flags & > $eject )%' end of the JOB macro %' %*DEFINE(JOB1(arglist))(%DEFINE(tail)(%arglist)%' %' %' Increment number of JOBs each time this macro is invoked. %SET(n_jobs,%n_jobs+1)%' %' %' Output job number and info. ;*** JOB #%n_jobs ***; %' User_Job1< %arg, ; dir_sz & %arg, ; pool_min & %arg, ; pool_max & %arg, ; max_obj & %arg, ; max_tasks & %arg, ; max_job_priority & %arg, ; e_h_mode & %arg, ; e_h_entry & %arg, ; job_flags & %arg, ; task_priority & %arg ; task_entry & > $eject )%' end of the JOB1 macro %' %' %*DEFINE(JOB2(arglist))(%DEFINE(tail)(%arglist)%' %' %' Output job number and info. %' User_Job3 < %pointer, ; stk_ptr & %arg, ; stk_size & %arg ; task_flags & > $eject )%' end of the JOB2 macro %' %' $LIST