Class az390
java.lang.Object
az390
- All Implemented Interfaces:
Runnable
Class az390 implements the assembler part of z390
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassComparator for mnemonics to mimic EBCDIC collating sequence The mnemonic portion occupies the first 8 positions of the ReportEntry and contains only uppercase characters and digits. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) bytevariable(package private) bytevariable(package private) bytevariable(package private) bytevariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) booleanvariable(package private) booleanvariable(package private) Threadvariable(package private) booleanvariable(package private) booleanvariable(package private) booleanvariable(package private) Filevariable(package private) BufferedReadervariable(package private) bytevariable(package private) bytevariable(package private) Stringvariable(package private) booleanvariable(package private) Stringvariable(package private) booleanvariable(package private) booleanvariable(package private) intvariable(package private) int[]variable(package private) String[]variable(package private) int[]variable(package private) int[]variable(package private) Stringvariable(package private) intvariable(package private) booleanvariable(package private) Stringvariable(package private) intvariable(package private) Stringvariable(package private) intvariable(package private) Stringvariable(package private) charvariable(package private) byte[]variable(package private) byte[]variable(package private) byte[]variable(package private) byte[]variable(package private) byte[]variable(package private) booleanvariable(package private) Datevariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) charvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) bytevariable(package private) BigDecimalvariable(package private) BigIntegervariable(package private) BigIntegervariable(package private) intvariable(package private) byte[]variable(package private) intvariable(package private) Stringvariable(package private) booleanvariable(package private) intvariable(package private) longvariable(package private) byte[]variable(package private) ByteBuffervariable(package private) byte[]variable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) booleanvariable(package private) Stringvariable(package private) bytevariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) charvariable(package private) charvariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) booleanvariable(package private) intvariable(package private) booleanvariable(package private) booleanvariable(package private) intvariable(package private) booleanvariable(package private) charvariable(package private) int[]variable(package private) char[]variable(package private) Stringvariable(package private) intvariable(package private) int[]variable(package private) charvariable(package private) Stringvariable(package private) booleanvariable(package private) booleanvariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) Patternvariable(package private) Patternvariable(package private) intvariable(package private) Matchervariable(package private) charvariable(package private) Patternvariable(package private) Stringvariable(package private) intvariable(package private) charvariable(package private) booleanvariable(package private) intvariable(package private) String[]variable(package private) String[]variable(package private) String[]variable(package private) String[]variable(package private) bytevariable(package private) bytevariable(package private) Stringvariable(package private) booleanvariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) int[]variable(package private) intvariable(package private) int[]variable(package private) intvariable(package private) int[]variable(package private) int[]variable(package private) bytevariable(package private) booleanvariable(package private) booleanvariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) Matchervariable(package private) Stringvariable(package private) int[]variable(package private) Patternvariable(package private) Stringvariable(package private) int[]variable(package private) bytevariable(package private) booleanvariable(package private) intvariable(package private) int[]variable(package private) Stringvariable(package private) intvariable(package private) String[]variable(package private) int[]variable(package private) int[]variable(package private) intvariable(package private) booleanvariable(package private) booleanvariable(package private) booleanvariable(package private) Stringvariable(package private) Stringvariable(package private) Stringvariable(package private) bytevariable(package private) Stringvariable(package private) intvariable(package private) booleanvariable(package private) Matchervariable(package private) Patternvariable(package private) intvariable(package private) booleanvariable(package private) BigDecimalvariable(package private) byte[]variable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) BigDecimalvariable(package private) BigIntegervariable(package private) BigIntegervariable(package private) BigIntegervariable(package private) BigIntegervariable(package private) BigIntegervariable(package private) MathContextvariable(package private) ByteBuffervariable(package private) byte[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) doublevariable(package private) doublevariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) intvariable(package private) Stringvariable(package private) booleanvariable(package private) booleanvariable(package private) Stringvariable(package private) Stringvariable(package private) Stringvariable(package private) Stringvariable(package private) Stringvariable(package private) Stringvariable(package private) Stringvariable(package private) Stringvariable(package private) Stringvariable(package private) Stringvariable(package private) Stringvariable(package private) SimpleDateFormatvariable(package private) Matchervariable(package private) Patternvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) Stringvariable(package private) intvariable(package private) booleanvariable(package private) byte[]variable(package private) byte[]variable(package private) int[]variable(package private) int[]variable(package private) int[]variable(package private) byte[]variable(package private) int[]variable(package private) int[]variable(package private) int[]variable(package private) int[]variable(package private) booleanvariable(package private) String[]variable(package private) int[]variable(package private) int[]variablevariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) final Lockvariable(package private) final Conditionvariable(package private) booleanvariable(package private) booleanvariable(package private) booleanvariable(package private) booleanvariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) long[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) long[]variable(package private) intvariable(package private) String[]variable(package private) String[]variable(package private) SimpleDateFormatvariable(package private) Stringvariable(package private) Stringvariable(package private) booleanvariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) bytevariable(package private) Stringvariable(package private) RandomAccessFilevariable(package private) Stringvariable(package private) Stringvariable(package private) Stringvariable(package private) booleanvariable(package private) Stringvariable(package private) intvariable(package private) Stringvariable(package private) intvariable(package private) charvariable(package private) intvariable(package private) intvariable(package private) bytevariable(package private) boolean[]variable(package private) boolean[]variable(package private) intvariable(package private) boolean[]variable(package private) Stringvariable(package private) Filevariable(package private) BufferedWritervariable(package private) int[]variable(package private) int[]variable(package private) booleanvariable(package private) booleanvariable(package private) charvariable(package private) int[]variable(package private) byte[]variable(package private) int[]variable(package private) char[]variable(package private) charvariable(package private) int[]variable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) byte[]variable(package private) byte[]variable(package private) bytevariable(package private) String[]variable(package private) String[]variable(package private) int[]variable(package private) bytevariable(package private) byte[]variable(package private) byte[]variable(package private) int[]variable(package private) intvariable(package private) intvariable(package private) bytevariable(package private) bytevariable(package private) int[]variable(package private) intvariable(package private) intvariable(package private) bytevariable(package private) bytevariable(package private) int[]variable(package private) int[]variable(package private) booleanvariable(package private) Stringvariable(package private) int[]variable(package private) String[]variable(package private) bytevariable(package private) bytevariable(package private) int[]variable(package private) bytevariable(package private) int[]variable(package private) int[]variable(package private) int[]variable(package private) byte[]variable(package private) String[]variable(package private) bytevariable(package private) bytevariable(package private) bytevariable(package private) intvariable(package private) intvariable(package private) bytevariablevariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) Stringvariable(package private) tz390variable(package private) int[]variable(package private) int[]variable(package private) int[]variable(package private) intvariable(package private) booleanvariable(package private) String[]variable(package private) int[]variable(package private) int[]variable(package private) int[]variable(package private) intvariable(package private) int[]variable(package private) intvariable(package private) intvariable(package private) int[]variable(package private) Stringvariable(package private) String[]variable(package private) String[]variable(package private) char[]variable(package private) JTextAreavariable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidabort_error(int error, String msg) issue error msg to log with prefix and inc error totalprivate voidadd ENTRYprivate intadd_esd(int sid, byte sect_type) add new esd chained to sid and return index else abortprivate intadd EXTRN using V vs S key indexprivate voidadd_lit_xref(int index) add literal xrefbooleanadd_missing_copy(String name) add missing copy file for ERRSUMprivate booleanadd_missing_macro(String name) add missing macro file for ERRSUMprivate voidadd_rld(int exp_esd) add plus rldintadd symbol table entry name and return index for use in setting remaining fields
Note: If lookahead mode, set sym_def = -1private voidadd_sym_xref(int index) add symbol xrefprivate voidadd use entryprivate voidadd or replace USING for code generationprivate intadd WXTRN using V vs S key indexprivate Stringbytes_to_hex(byte[] bytes, int byte_start, int byte_length, int chunk) Format bytes into hex string If chunk more than 0 insert space after each chuckprivate booleancalculate abs value else abortprivate booleanset dca_ignore_refs for A and V type symbol refs if DS or DSECTprivate booleancalc_exp()parse abs/rel expression starting at exp_text.charAt(exp_index)
return true if ok and set: exp_val = abs or rel offset exp_esd = abs 0 or cst/dst esd exp_index = index to terminator which can be end of string, or () Note: this version applies a default location counter offset of 0private booleancalc_exp(int loc_ctr_offset) parse abs/rel expression starting at exp_text.charAt(exp_index)
return true if ok and set: exp_val = abs or rel offset exp_esd = abs 0 or cst/dst esd exp_index = index to terminator which can be end of string, or ()private booleancalc_lit()Find or add literal and set exp_type, exp_val, and exp_esd. If literal followed by '-' or '+' calculate expression add to lit address and return abs val else error.private voidcalc rel exp for lit or explicit offset for following offset(index,base)private booleancalculate rel value else abortprivate voidcheck if generated object code equals instruction length and check for extra parms beyond end of last instruction parm and issue errorprivate booleanset true if ok to list BAL line on PRN fileprivate voidstart private csect if no csect or dsectprivate voidcheck if timeout expiredvoidclose output obj, prn, err, traprivate voidcompile regular expression parsersprivate voidcalc tz390.fp_exp and big_dec2 such that: big_dec1 = big_dec2 * 2 ** tz390.fp_exp
tz390.fp_exp = log(big_dec1) / log(2)
Since the exponent range of LB exceeds native double, the log of big_dec1 is calculated using equivalent: log(X*10**N) = log(X) + N*log(10)
The exponent must then be offset by the number of bits in the required binary mantissa in order to retain significant bits when big_dec2 is converted to big_int format.private voidcvt_obj_hex_to_bin(String hex_rcd) convert ascii hex object string to binary 80 byte EBCDIC format for mainframe compatiblity.private voiddc_align(int align_len) align to mult of align_len from loc_ctr
If align_len more than 8 use 8private voiddc_fill(int fill_len) increment loc_ctr by bytes if not bit mode else shift bits by bit length if DC and not first field fill with zerosprivate voidremove labeled using if foundprivate voidRemove cur_use_reg entries if found but not labeled usings.private voiddrop duplicate unlabeled dependent USING for same section and offsetprivate voiddrop one or more using registers or labeled usingprivate voidissue error for duplicate symbol definitionvoidput stats and display total errors after mz390 is done and close files.
Note: return az390 return code for use by mz390 when called from mz390 when mfc option on.private voidexp_add()add top of stack value to prev.private voidexp_div()div top of stack value into prev.private voidreplace sym or lit on stack with integer I' attribute valueprivate voidreplace sym or lit on stack with length valueprivate voidexp_mpy()mpy top of stack value to prev.private booleanexp_next_char(char next_char) return true if next exp_text char at exp_index is next_charprivate voidpop current op on stackprivate voidput current op on stack
if unary minus push 0 var first
if unary plus skip the pushprivate voidreplace sym or lit on stack with scale valueprivate voidexp_sub()sub top of stack value from prev.private voidexp_term(int loc_ctr_offset) terminate expression returning value on stack if no errorsprivate intreturn index of bal operation
or return 0 for comments
or return -1 if undefined operation
or return -2 if cancelled OPSYNintReturn defined symbol index else -1 If not lookahead mode: if found, add xref else if vcon mode, add extrnvoidfinish_az390(String[] mac_file_path, int[] mac_file_errors) save xref file names and error counts for cross reference at end of PRNprivate voidflush any bits in dc_bit_buff to align to byte boundary for next field or end of DS.DCprivate voidBFP - Adjust mantiss and base 2 exponent to align for assumed 1 bit. HFP - Adjust mantissa and base 2 exponent to base 16 exponent. DFP - Set base 10 exponent based on explicit decimal point and trailing significant digits including zeros else use preferred exponent of 0.private voidset dc_hex for floating point string fp_text in scientific notation 0.314159E1 etc.
format is based on fp type 0-8 (db,dd,dh,eb,ed,eh,lb,ld,lh)
Notes: This is very tricky code! Use BigDecimal for all types to insure DH and EH exponents beyond range of DB and EB will be correctly handled without error. The fp_context is set to significant decimal digits plus fp_guard_digts to insure sufficient significant bits for proper rounding occurs. The preferred DFP exponent (BigDecimal scale factor) is set based on explicit decimal poiint with significant trailing decimal places including zeros else use 0. First convert string constant to positive big_dec1 value with sufficent sig.private voidgen_ccw0()generate 8 byte aligned CCW0: op8,addr24,flags8,zero8,len16private voidgen_ccw1()generate 8 byte aligned CCW1: op8,flags8,len16,addr32private voidgen F or H bit fieldprivate voidgen F or H byte fieldprivate voidgen del bit length fieldprivate voidgen del byte length fieldprivate voidgen dca exp_val in dc_bit_buff
Note: Shared by gen_dcb_bitsprivate voidgen dca byte fieldprivate voidgen dcb type bit field in dc_bit_buffprivate voidgen dcb byte length fieldprivate voidgen dcc bit fieldprivate voidgen dcc bytesprivate voidgen P bit fieldprivate voidgen P byte fieldprivate voidgen X bit fieldprivate voidgen X byte fieldprivate voidgen_exp_rld(int loc_ctr_offset) generate rlds for expression
Notes: convert to rel csect vs rel module offsets for linker use. Original exp_val saved in rld_exp_val for use in PRN display (i.e.private voidLists all mnemonics in the selected opcode table All mnemonics from the current opcode table are converted into report entries The report entries are sorted The sorted entries are printed (three on a print line) preceded by a header lineprivate voidgen_lit_size(int size) generate literal dc's of specified size
force all length 1 lits to even addr for access by relative halfword offsets in LARL etc.private voidlist literals in alpha order with optional cross referenceprivate voidgenerate ltorg at current location in csectprivate voidwrite END object record with entry if specifiedprivate voidwrite ESD's for CSECTS, EXTRNS, and ENTRIES to the OBJ file in ascii hex and list on PRN if option LISTprivate voidwrite RLD's to the OBJ file in ascii hexprivate voidgenerate object code for bal instructions in CSECT's on final passprivate voidlist symbols in alpah order with optional cross referenceprivate voidget next bal line from bal file or from mz390 parallel thread passprivate Stringget_base_name(String file_name) return base file name from path\file.sfxprivate booleanset dc_bd_val from next floating point sdt in dc_field at dc_index
Notes: Apply any scale factor or exponent to dc_bd_value. Set dc_unsigned true/falseprivate Stringget 1-16 byte hex value for F or H constant from dc_bd_valprivate voidreturn dup factor for dc_field else 1private voidSet L, S, E defaults Check modifiiers based on type if DEL check for B/D/H and set tz390.fp_type if C check for A/E and set dc_type_sfx if AFV check for D and set dc_type_sfx if LQ ignore the Q for 16 byte default If S check for Y and set length 3 Process explicit L length, S scale, and E exponent modifiers in any order Align and save first length if req'dprivate voidset dc_type and dc_type_index and verify valid type else abortprivate voidget_dc_fp_hex(String text, int index) set dc_hex for D, E, or L floating point sdt starting at text indexprivate intget_dc_int(int index) return next number from dc_field at index else return 1 and update dc_indexprivate intreturn integer expression in (...) or decimal number for modifierprivate Stringreturn bddd or bdddhhprivate Stringreturn esd typeprivate Stringreturn bddd or bdddhh from explicit ddd(b) with ddd in exp_valprivate Stringget_exp_abs_bddd(int b, int dddhh) return bddd or bdddhh using exp_val displacementprivate Stringreturn xbddd or xbdddhh from explicit ddd(x,b) with ddd in exp_valprivate Stringreturn xbddd or xbdddhh from explicit ddd(x,b) with ddd in exp_valprivate StringReturn hex bddd based on exp_esd and exp_val set by calc_exp or calc_lit. If get_bdddhh is set, then 20 bit signed offset will be returned as bdddhh. Set cur_reg and cur_reg_loc for use when called from dependent using with domain expression. If exp_use_lab is not null restrict using entries to labelled using.private intreturn explicit or implied length from exp_lenprivate Stringget hex x from next (x) else 0private Stringget hex x from next (x) else 0private voidget_hex_bddd2(boolean add_code) if add_code
then append bddd or bdddhh hex object code from next parm
else just set hex_bddd2private voidgen bdddhh where hhddd is 20 bit signed offset to b.private voidappend hex byte from next parmprivate voidappend signed byte from next parm RPI 1146private voidappend hex halfword from next parmprivate voidget_hex_int(int bits) append hex integer from next parmprivate voidset hex_len, hex_bddd, and hex_bddd_loc from next parmprivate Stringreturn single hex nibble char 0-fprivate voidget_hex_op(int op_offset, int op_len) initialize object code with op code and initialize exp parser with parms if op_offset = 1private voidappend hex reg from next parmprivate voidappend hex reg from next parm - if it is an even registerprivate Stringreturn relative 24 bit halfword offset from psw_loc to symbol in same csect at even address
Note: Error if not same csect or odd addressprivate voidget_hex_relative_offset(int bits) append hex relative offset from current instructionprivate Stringreturn relative 12 bit relative halfword offsetprivate Stringreturn relative 16 bit relative halfword offsetprivate Stringreturn relative signed half word offset from psw_loc to symbol in same csect at even address
Note: Error if not same csect or odd addressprivate voidappend iiiiiiii signed offset (calc for label)private voidgen 32 bit RLD or abs value with loc ctr at start of ins.private voidappend xbddd or xbdddhh hex object code from next parmprivate voidget_hex_vreg(int vreg) append vector hex reg low 4 bits from next parm and set corresponding vreg_rxb high bit for 16-31 vregsprivate voidvector register 1-5 high bits to support registers 16-31 reset for next set of high bitsprivate voidappend xbddd or xbdddhh hex object code from next parmprivate voidappend xbddd hex object code from next parmprivate voidget_hex_zero(int hex_ll) append zero nibblesintget_int_pfx(byte type, byte type_sfx, int len, int scale) return I' integer pfx value for symbol based on length and scale per ref.private voidfind or add literal and set: cur_lit = lit table index exp_val = lit address exp_esd = lit esdprivate Stringget_long_hex(long work_long) Format long into 16 byte hex stringprivate Stringuse tz390.parm_match to find and return next parm in upper case else return null.private voidset stk_values 1 and and 2 from top of stackprivate intget_sym_len(int index) return total length of csect or dsectprivate voidset cur_use_reg and cur_use_off from exp_text at exp_index set by get_use_range
Note: get_rel_exp_bddd is called for dependent using expressions to find reg and locprivate voidset cur_use_base esd,loc, and lenprivate booleancheck if room to add to exp_stack and return true else abortprivate voidinitialize arrays using tz390.opt_max???private voidinit_az390(String[] args, JTextArea log_text, RandomAccessFile systerm, RandomAccessFile stats) initialize log routing set options compile regular expression parsers open bal and obj buffered I/O files Init ascii/ebcdic translation tableprivate voidinit_get_next_parm(String parms) use tz390.parm_match to find and return next parm separated by commas else return null.private voidinit push/pop using and printprivate voidinit sym variables for new or existing lookahead symbol table entryprivate voidlist bal line with first 8 bytes of object code if any and turn off list_bal_line request
Note: See comments processing case 0 for update of mac_call_gen, call reformating, and delay flags mac_call_first and mac_call_last.private voidlist_use()list current use table if LISTUSEprivate voidload_bal()load bal source
Concatentate any continuations indicated by non-blank in position 72.private voidissue error msg to log with prefix and inc error total
Notes: Set bal_abort if not set else exit supress if not gen_obj and not trace print bal line first if list onstatic voidmain is entry when executed from command line Create instance of az390 class and pass parms to az390 like z390 does.private voidmove_use_entry(int index1, int index2) move use entry from index1 to index2private voidSet trace file name; then open obj and prn filesprivate voidmissing descriptionprivate voidset bal_label and bal_opvoidpass_bal_line(String new_bal_line, String new_xref_file_name, char new_xref_file_type, int new_xref_file_num, int new_xref_line_num) pass mz390 bal_line to az390 bal_line with synchronization of threads. ignore BAL after ENDprivate voidproc_exp_op(int loc_ctr_offset) description missingprivate voiddescription missingprivate voiddescription missingprivate voidproc_exp_token(int loc_ctr_offset) parse general expression tokens: push sym or sdt exec or push operations + - * / terminate on end of string or ()private voidpush current location counter on stackprivate voidassemble bal source file into relocatable OBJ file and generate optional PRN file.private voidassemble bal source into obj relocatable object code fileprivate voidallocate or generate object code for bal op Note op_type index values must match op_name array values. Indexes less than 100 and CNOP are machine instr.private voidgenerate one or more 0700 instr.voidprocess_dc(int request_type) processing by request type: parse ds/dc bal statement and allocate or gen data items including alignment bytes where required. find or add literal table entry using ds/dc type single parm following = parm generate literal pool dc using loc_ctr set to referenced instruction. if LTORG, gen lits
if not DC/DS/LTORG set dc_lit and process first field as literal and update exp_indexprivate voidalloc or gen DS/DC D, E, or L type data using prev settings for dc_type, dc_type_sfx, dc_dup and dc_len.private voidalloc or gen DS/DC A/V/Y type parms using prev.private voidalloc or gen DS/DC B type parms using prev.private voidallocate or generate dc Cln'...' data using dc_dup and explicit dc_len if any
Notes: C'..' default EBCDIC unless ASCII option C".." always ASCII regardless of option C!..! always EBCDIC regardless of option ''|""|!! or double ampersand replaced with single '|"|! or ampersand CA'...' always ASCII CE'...' always EBCDICprivate voidalloc or gen DS/DC F type parms using prev.private voidalloc or gen DS/DC H type parms using prev.private voidalloc or gen DS/DC P type parms using prev.private voidalloc or gen DS/DC S type parms using prev.private voidalloc or gen DS/DC X type parms using prev.private voidalloc or gen DS/DC Z type parms using prev.private voidperform END processing at END statement or end of MLC source at end of each passvoiddefine or update symbol definition: Set sym_loc to first pos value Set sym_len to optional 2nd pos value else set sym_len to 1. Set sym_attr to optional 3rd pos value. Set sym_attrp 4th program type Set sym_attra 5th assembler typeprivate voidprocess_esd(byte esd_type) process EXTRN, ENTRY, or WXTRN statementprivate voidreset current location in same csectprivate voidpop print or using level if anyprivate voidprocess print options (unsupported options ignored)private voidpush print or using level if anyprivate voidprocess_sect(byte sect_type, String sect_name) add or update csect, dsect, or loctr indicated by sym_cst, sym_dst, or sym_lct type parm
Steps: Update previous section if any with max length and any loctr pointers If name omitted used private cst/dst Add new section if not found or external reference found as local label Reset location counter to end of current section Update prev section type and sid for use in processing sym_lct sectionsprivate voidset current location first csectprivate voidpush literal on stack else abort and set cur_lit >= 0 and cur_sit = -1 for L' to determine that literal is on the stack
Note: Literal must be first term in exp since it may use calc_exp during DC processing and then resets exp stack with lit addressprivate voidpush_exp_sdt(String sdt) push self defining abs term on stackprivate voidpush symbol on stack else abort
set cur_sid > 0 used by L'private voiddisplay az390 version, timestamp, and copyright if running standaloneprivate voidput_errsum(String msg) put ERRSUM msgs on ERR file and consoleprivate voidWrite message to z390_log_text or console if running standaloneprivate voidput_obj_line(String msg) put object code to obj file in hex or binary formatprivate voidAppend obj_code to list_obj_code for print line (reguired by mult DC calls). Exit if gen_obj_code not on or not CSECT Buffer output of ojbect text code for contiguous data in same ESD. Called from END processing with BAL_EOF to flush buffer. Reset obj_code for use by DC routines Note: this version applies a default location counter offset of 0private voidput_obj_text(int loc_ctr_offset) Append obj_code to list_obj_code for print line (reguired by mult DC calls). Exit if gen_obj_code not on or not CSECT Buffer output of ojbect text code for contiguous data in same ESD. Called from END processing with BAL_EOF to flush buffer. Reset obj_code for use by DC routinesprivate voidput_prn_line(String msg) put line to prt listing file if print_on and not surpressed by nogen.private voidput_stat_line(String msg) routine statistics line to PRN or STATS(file)voiddisplay statistics on STA and totals on STA and TRM including MZ and AZ totals.private voidpop operator from op stack pop sym_val2 off var stack replace original sym_val1 on top of stack with resultprivate voidreduce rld on stackprivate Stringremove_blanks(String text_in) remove blanks allowed within numeric DC fields BDEFHLPXZvoidreport critical errors on ERR file and console for ERRSUM optionprivate voidreset lit_gen flags to force reallocation on each passvoidreset sym lock at next mz390 bal line and at start of lookahead mode.private voidif errors occurred during loading of bal repeat symbol update passes until there are no errors or minimum error or max passes are reached.voidrun()run the assemblerprivate voidsave bal line during loading for log_error useprivate voidset sect_changeprivate voidset DFP preferred base 10 exponent for fp_big_dec1 value if explicit decimal found in fp_text.private voidset xref_file_line passed from mz390 if available for use in error messagesvoidset_sym_lock(String desc) Block mz390 until az390 is waiting for next bal. Set sym_lock Notes: See az390 pass_bal for lock check. See mz390 put_bal_line for lock reset.private voidverify and skip commavoidstart_az390_thread(String[] args, JTextArea z390_log, RandomAccessFile mz390_systerm_file, RandomAccessFile mz390_stats_file) initialize z390 when called from mz390 to receive bal directly and share the symbol table with mz390.private Stringstring_to_hex(String text, boolean ascii) Format text string into hex string If ascii_req true, gen ascii else ebcdic hexprivate voidsub_rld(int exp_esd) sub rldvoidadd or update relative labels and exclude CST, DST, EQU, USING symbolsprivate voidupdate mac_call_gen after prnprivate voidupdate loctr sections with contiguous starting addresses from CSECT/DSECT and issue errors if any start address or length changes and reset length for next pass.private voidupdate length of current section and save current loc_ctr for continueprivate voidupdate each section starting address and max length, and reset current length and current esd_loc
Notes: If any section start address or max length changes issue error to force additional passes. sym_cst CSECT's start at 0 and are contiguous within LOCTR's Each new CSECT is aligned to 8 sym_dst DSECT's always start at 0 Set esd_base to root section for cst, dst, and loctorsprivate voidscan bal source and update symbols
-
Field Details
-
tz390
tz390 tz390variable -
msg_id
String msg_idvariable -
az390_rc
int az390_rcvariable -
az390_errors
int az390_errorsvariable -
mz390_errors
int mz390_errorsvariable -
mz390_started_msg
String mz390_started_msgvariable -
mz390_abort
boolean mz390_abortvariable -
az390_recursive_abort
boolean az390_recursive_abortvariable -
mz390_rc
int mz390_rcvariable -
cur_pass
int cur_passvariable -
cur_date
Date cur_datevariable -
tod_start
long tod_startvariable -
tod_end
long tod_endvariable -
tot_sec
long tot_secvariable -
stats_to_obj
boolean stats_to_objvariable -
tot_obj_bytes
int tot_obj_bytesvariable -
bal_file
File bal_filevariable -
bal_file_buff
BufferedReader bal_file_buffvariable -
obj_file
RandomAccessFile obj_filevariable -
prn_file
File prn_filevariable -
prn_file_buff
BufferedWriter prn_file_buffvariable -
bal_line
String bal_linevariable -
mnote_warning_msg
String mnote_warning_msgvariable -
mcall_bal_index
int mcall_bal_indexvariable -
mcall_lv_index
int mcall_lv_indexvariable -
bal_xref_file_name
String bal_xref_file_namevariable -
bal_xref_file_type
char bal_xref_file_typevariable -
cur_line_type
char cur_line_typevariable -
cur_line_file_num
int cur_line_file_numvariable -
bal_xref_file_path
String bal_xref_file_pathvariable -
bal_xref_file_num
int bal_xref_file_numvariable -
bal_xref_file_line
int bal_xref_file_linevariable -
tot_xref_files
int tot_xref_filesvariable -
xref_file_name
String[] xref_file_namevariable -
xref_file_path
String[] xref_file_pathvariable -
xref_file_errors
int[] xref_file_errorsvariable -
xref_file_type
char[] xref_file_typevariable -
mz390_xref_file
int mz390_xref_filevariable -
mz390_xref_line
int mz390_xref_linevariable -
bal_label
String bal_labelvariable -
opsyn_label
String opsyn_labelvariable -
bal_op
String bal_opvariable -
bal_op_ok
boolean bal_op_okvariable -
bal_label_ok
boolean bal_label_okvariable -
bal_parms
String bal_parmsvariable -
list_use
boolean list_usevariable -
mac_inline_level
int mac_inline_levelvariable -
mac_inline_op_macro
int mac_inline_op_macrovariable -
mac_inline_op_mend
int mac_inline_op_mendvariable -
mac_inline_op_other
int mac_inline_op_othervariable -
bal_abort
boolean bal_abortvariable -
bal_op_index
int bal_op_indexvariable -
end_loc
int end_locvariable -
report_label_changes
boolean report_label_changesvariable -
report_equ_changes
boolean report_equ_changesvariable -
bal_eof
boolean bal_eofvariable -
end_found
boolean end_foundvariable -
end_entry
String end_entryvariable -
end_entry_sid
int end_entry_sidvariable -
end_entry_found
boolean end_entry_foundvariable -
mmddyy
SimpleDateFormat mmddyyvariable -
hhmmss
SimpleDateFormat hhmmssvariable -
log_tod
boolean log_todvariable -
z390_log_text
JTextArea z390_log_textvariable -
az390_thread
Thread az390_threadvariable -
az390_running
boolean az390_runningvariable -
mz390_call
boolean mz390_callvariable -
lookahead_mode
boolean lookahead_modevariable -
sym_lock
boolean sym_lockvariable -
sym_lock_desc
String sym_lock_descvariable -
lock
variable -
lock_condition
variable -
bal_line_full
boolean bal_line_fullvariable -
pass_bal_line
String pass_bal_linevariable -
pass_xref_file_name
String pass_xref_file_namevariable -
pass_xref_file_type
char pass_xref_file_typevariable -
pass_xref_file_num
int pass_xref_file_numvariable -
pass_xref_file_line
int pass_xref_file_linevariable -
xref_file_line
String xref_file_linevariable -
xref_bal_index
int xref_bal_indexvariable -
pass_bal_eof
boolean pass_bal_eofvariable -
az390_waiting
boolean az390_waitingvariable -
az390_private_sect
boolean az390_private_sectvariable -
sort_index_bias
int sort_index_biasvariable -
sort_index_len
int sort_index_lenvariable -
max_exp_stk
int max_exp_stkvariable -
max_exp_rld
int max_exp_rldvariable -
max_hh
int max_hhvariable -
min_hh
int min_hhvariable -
max_text_buff_len
int max_text_buff_lenvariable -
max_fh
long[] max_fhvariable -
min_fh
long[] min_fhvariable -
tod_time_limit
long tod_time_limitvariable -
tot_bal_line
int tot_bal_linevariable -
tot_mac_copy
int tot_mac_copyvariable -
tot_mnote_warning
int tot_mnote_warningvariable -
tot_mnote_errors
int tot_mnote_errorsvariable -
max_mnote_level
int max_mnote_levelvariable -
bal_line_text
String[] bal_line_textvariable -
bal_line_num
int[] bal_line_numvariable -
bal_line_xref_file_num
int[] bal_line_xref_file_numvariable -
bal_line_xref_file_line
int[] bal_line_xref_file_linevariable -
bal_line_gen
boolean bal_line_genvariable -
trace_pfx
String trace_pfxvariable -
parm_name
String parm_namevariable -
parm_value
String parm_valuevariable -
bal_line_index
int bal_line_indexvariable -
exp_pattern
Pattern exp_patternvariable -
exp_match
Matcher exp_matchvariable -
label_pattern
Pattern label_patternvariable -
label_match
Matcher label_matchvariable -
extrn_pattern
Pattern extrn_patternvariable -
extrn_match
Matcher extrn_matchvariable -
dcc_sq_pattern
Pattern dcc_sq_patternvariable -
dcc_dq_pattern
Pattern dcc_dq_patternvariable -
dcc_eq_pattern
Pattern dcc_eq_patternvariable -
dcc_match
Matcher dcc_matchvariable -
loc_ctr
int loc_ctrvariable -
loc_start
int loc_startvariable -
start_loc
int start_locvariable -
loc_len
int loc_lenvariable -
cur_esd_sid
int cur_esd_sidvariable -
tot_esd
int tot_esdvariable -
cur_esd
int cur_esdvariable -
cur_esd_base
int cur_esd_basevariable -
first_cst_esd
int first_cst_esdvariable -
esd_sdt
int esd_sdtvariable -
esd_cpx_rld
int esd_cpx_rldvariable -
esd_sid
int[] esd_sidvariable -
esd_base
int[] esd_basevariable -
esd_loc
int[] esd_locvariable -
tot_loc_stmt
int tot_loc_stmtvariable -
cur_use_start
int cur_use_startvariable -
cur_use_end
int cur_use_endvariable -
explicit_drop_reg
boolean explicit_drop_regvariable -
push_cur_use_start
int[] push_cur_use_startvariable -
push_cur_use_end
int[] push_cur_use_endvariable -
cur_use
int cur_usevariable -
cur_use_depend
boolean cur_use_dependvariable -
use_eof
boolean use_eofvariable -
cur_use_base_esd
int cur_use_base_esdvariable -
cur_use_base_loc
int cur_use_base_locvariable -
cur_use_base_len
int cur_use_base_lenvariable -
cur_use_reg
int cur_use_regvariable -
cur_use_neg_reg
int cur_use_neg_regvariable -
cur_use_off
int cur_use_offvariable -
cur_use_neg_off
int cur_use_neg_offvariable -
cur_use_lab
String cur_use_labvariable -
use_lab
String[] use_labvariable -
use_base_esd
int[] use_base_esdvariable -
use_base_loc
int[] use_base_locvariable -
use_base_len
int[] use_base_lenvariable -
use_reg
int[] use_regvariable -
use_reg_loc
int[] use_reg_locvariable -
use_domain_tot
int use_domain_totvariable -
using_level
int using_levelvariable -
print_level
int print_levelvariable -
using_start
int[] using_startvariable -
using_end
int[] using_endvariable -
print_on
boolean[] print_onvariable -
print_gen
boolean[] print_genvariable -
print_data
boolean[] print_datavariable -
force_list_bal
boolean force_list_balvariable -
list_bal_line
boolean list_bal_linevariable -
mac_call_gen
boolean mac_call_genvariable -
mac_call_first
boolean mac_call_firstvariable -
mac_call_last
boolean mac_call_lastvariable -
sym_sdt
byte sym_sdtvariable -
sym_cst
byte sym_cstvariable -
sym_dst
byte sym_dstvariable -
sym_ent
byte sym_entvariable -
sym_ext
byte sym_extvariable -
sym_rel
byte sym_relvariable -
sym_rld
byte sym_rldvariable -
sym_lct
byte sym_lctvariable -
sym_wxt
byte sym_wxtvariable -
sym_und
byte sym_undvariable -
tot_sym
int tot_symvariable -
tot_sym_find
int tot_sym_findvariable -
tot_sym_comp
int tot_sym_compvariable -
cur_sid
int cur_sidvariable -
prev_sect_sid
int prev_sect_sidvariable -
prev_sect_esd
int prev_sect_esdvariable -
cur_sym_sect
boolean cur_sym_sectvariable -
sect_change
boolean sect_changevariable -
prev_sect_type
byte prev_sect_typevariable -
private_csect
String private_csectvariable -
sym_type_desc
String[] sym_type_descvariable -
sym_name
String[] sym_namevariable -
sym_def
int[] sym_defvariable -
sym_type
byte[] sym_typevariable -
sym_dc_type
byte[] sym_dc_typevariable -
sym_dc_type_sfx
byte[] sym_dc_type_sfxvariable -
sym_attr
byte[] sym_attrvariable -
sym_attr_elt
byte[] sym_attr_eltvariable -
sym_scale
int[] sym_scalevariable -
sym_attrp
int[] sym_attrpvariable -
sym_attra
String[] sym_attravariable -
sym_esd
int[] sym_esdvariable -
sym_loc
int[] sym_locvariable -
sym_max_loc
int[] sym_max_locvariable -
sym_len
int[] sym_lenvariable -
sym_sect_type
int[] sym_sect_typevariable -
sym_sect_prev
int[] sym_sect_prevvariable -
sym_sect_next
int[] sym_sect_nextvariable -
sym_xref
variable -
last_xref_index
int last_xref_indexvariable -
last_xref_line
int last_xref_linevariable -
sym_def_ref
int sym_def_refvariable -
sym_def_lookahead
int sym_def_lookaheadvariable -
vreg_rxb
int vreg_rxbvariable -
max_missing
int max_missingvariable -
tot_missing_copy
int tot_missing_copyvariable -
tot_missing_macro
int tot_missing_macrovariable -
tot_missing_sym
int tot_missing_symvariable -
missing_copy
String[] missing_copyvariable -
missing_macro
String[] missing_macrovariable -
dc_type_table
String dc_type_tablevariable -
dc_type_explicit
String dc_type_explicitvariable -
dc_type_len
int[] dc_type_lenvariable -
dc_type_align
int[] dc_type_alignvariable -
dc_type_delimiter
char[] dc_type_delimitervariable -
sym_attra_type
String[] sym_attra_typevariable -
bal_lab_attr
byte bal_lab_attrvariable -
sym_attr_elt_def
byte sym_attr_elt_defvariable -
bal_lab_attr_elt
byte bal_lab_attr_eltvariable -
tot_lit
int tot_litvariable -
cur_lit
int cur_litvariable -
lit_loc_ref
boolean lit_loc_refvariable -
cur_lit_pool
int cur_lit_poolvariable -
lit_name
String[] lit_namevariable -
lit_pool
int[] lit_poolvariable -
lit_line
int[] lit_linevariable -
lit_line_loc
int[] lit_line_locvariable -
lit_esd
int[] lit_esdvariable -
lit_loc
int[] lit_locvariable -
lit_len
int[] lit_lenvariable -
lit_dup
int[] lit_dupvariable -
lit_scale
int[] lit_scalevariable -
lit_dc_type
byte[] lit_dc_typevariable -
lit_dc_type_sfx
byte[] lit_dc_type_sfxvariable -
lit_gen
byte[] lit_genvariable -
lit_def
int[] lit_defvariable -
lit_xref
variable -
hex_tab
String hex_tabvariable -
hex_op
String hex_opvariable -
hex_ll
String hex_llvariable -
hex_len1
String hex_len1variable -
hex_len2
String hex_len2variable -
hex_bddd
String hex_bdddvariable -
hex_bddd1
String hex_bddd1variable -
get_bdddhh
boolean get_bdddhhvariable -
hex_bddd2
String hex_bddd2variable -
hex_bddd_loc
String hex_bddd_locvariable -
hex_bddd1_loc
String hex_bddd1_locvariable -
hex_bddd2_loc
String hex_bddd2_locvariable -
exp_text
String exp_textvariable -
exp_index
int exp_indexvariable -
check_prev_op
boolean check_prev_opvariable -
exp_val
int exp_valvariable -
exp_esd
int exp_esdvariable -
exp_type
byte exp_typevariable -
exp_attr
byte exp_attrvariable -
exp_state
int exp_statevariable -
exp_level
int exp_levelvariable -
exp_use_lab
String exp_use_labvariable -
exp_term
boolean exp_termvariable -
exp_eot
boolean exp_eotvariable -
exp_term_op
String exp_term_opvariable -
exp_start_op
String exp_start_opvariable -
exp_token
String exp_tokenvariable -
exp_op
String exp_opvariable -
sym_esd1
int sym_esd1variable -
sym_esd2
int sym_esd2variable -
sym_type1
byte sym_type1variable -
sym_type2
byte sym_type2variable -
sym_val1
int sym_val1variable -
sym_val2
int sym_val2variable -
exp_prev_op
String exp_prev_opvariable -
exp_sym_index
int exp_sym_indexvariable -
exp_sym_pushed
boolean exp_sym_pushedvariable -
exp_sym_last
boolean exp_sym_lastvariable -
exp_first_sym_len
boolean exp_first_sym_lenvariable -
exp_equ
boolean exp_equvariable -
exp_lit_mod
boolean exp_lit_modvariable -
exp_len
int exp_lenvariable -
tot_exp_stk_sym
int tot_exp_stk_symvariable -
tot_exp_stk_op
int tot_exp_stk_opvariable -
exp_stk_sym_esd
int[] exp_stk_sym_esdvariable -
exp_stk_sym_val
int[] exp_stk_sym_valvariable -
exp_stk_op
String[] exp_stk_opvariable -
exp_op_class
int[] exp_op_classvariable -
tot_classes
int tot_classesvariable -
exp_action
int[] exp_actionvariable -
exp_rld_mod_val
int exp_rld_mod_valvariable -
exp_rld_mod_set
boolean exp_rld_mod_setvariable -
exp_rld_len
byte exp_rld_lenvariable -
tot_exp_rld_add
int tot_exp_rld_addvariable -
tot_exp_rld_sub
int tot_exp_rld_subvariable -
exp_rld_add_esd
int[] exp_rld_add_esdvariable -
exp_rld_sub_esd
int[] exp_rld_sub_esdvariable -
tot_rld
int tot_rldvariable -
rld_add
char rld_addvariable -
rld_sub
char rld_subvariable -
rld_fld_esd
int[] rld_fld_esdvariable -
rld_fld_loc
int[] rld_fld_locvariable -
rld_fld_len
byte[] rld_fld_lenvariable -
rld_fld_sgn
char[] rld_fld_sgnvariable -
rld_xrf_esd
int[] rld_xrf_esdvariable -
gen_obj_code
boolean gen_obj_codevariable -
obj_code
String obj_codevariable -
list_obj_loc
int list_obj_locvariable -
list_obj_code
String list_obj_codevariable -
cur_text_buff
String cur_text_buffvariable -
cur_text_loc
int cur_text_locvariable -
cur_text_len
int cur_text_lenvariable -
cur_text_esd
int cur_text_esdvariable -
bin_byte
byte[] bin_bytevariable -
obj_bin_id
byte obj_bin_idvariable -
bin_esd_type
byte[] bin_esd_typevariable -
bin_txt_type
byte[] bin_txt_typevariable -
bin_rld_type
byte[] bin_rld_typevariable -
bin_end_type
byte[] bin_end_typevariable -
dc_op
boolean dc_opvariable -
dc_eod
boolean dc_eodvariable -
dc_len_explicit
boolean dc_len_explicitvariable -
dc_scale_explicit
boolean dc_scale_explicitvariable -
dc_exp_explicit
boolean dc_exp_explicitvariable -
dc_bit_len
boolean dc_bit_lenvariable -
dc_unsigned
boolean dc_unsignedvariable -
dc_bit_buff
BigInteger dc_bit_buffvariable -
dc_bit_bytes
byte[] dc_bit_bytesvariable -
dc_bit_value
long dc_bit_valuevariable -
dc_bit_hex
String dc_bit_hexvariable -
dc_bit_tot
int dc_bit_totvariable -
dc_bit_byte_len
int dc_bit_byte_lenvariable -
dc_bit_fill
int dc_bit_fillvariable -
dcb_len
int dcb_lenvariable -
dcb_pad
int dcb_padvariable -
dcb_bin
String dcb_binvariable -
dcc_text
String dcc_textvariable -
dcc_quote
char dcc_quotevariable -
dcc_len
int dcc_lenvariable -
dcp_len
int dcp_lenvariable -
dcp_sign
char dcp_signvariable -
dcx_len
int dcx_lenvariable -
dc_first_field
boolean dc_first_fieldvariable -
dc_lit_ref
boolean dc_lit_refvariable -
dc_lit_gen
boolean dc_lit_genvariable -
dc_lit_index_start
int dc_lit_index_startvariable -
dc_field
String dc_fieldvariable -
dc_type
char dc_typevariable -
dc_attr_elt
byte dc_attr_eltvariable -
dcv_type
boolean dcv_typevariable -
dca_ignore_refs
boolean dca_ignore_refsvariable -
dc_type_sfx
char dc_type_sfxvariable -
fp_text
String fp_textvariable -
fp_log2
double fp_log2variable -
fp_log10
double fp_log10variable -
fp_context
MathContext fp_contextvariable -
fp_big_dec1
BigDecimal fp_big_dec1variable -
fp_big_dec2
BigDecimal fp_big_dec2variable -
fp_big_dec3
BigDecimal fp_big_dec3variable -
fp_bd_two
BigDecimal fp_bd_twovariable -
fp_big_byte
byte[] fp_big_bytevariable -
fp_data_byte
byte[] fp_data_bytevariable -
fp_data_buff
ByteBuffer fp_data_buffvariable -
fp_big_int1
BigInteger fp_big_int1variable -
fp_big_int2
BigInteger fp_big_int2variable -
fp_big_int_one_bits
BigInteger fp_big_int_one_bitsvariable -
fp_big_int_lx_man_bits
BigInteger fp_big_int_lx_man_bitsvariable -
fp_big_int_dh_man_bits
BigInteger fp_big_int_dh_man_bitsvariable -
fp_int1
int fp_int1variable -
fp_round_bit
int fp_round_bitvariable -
fp_int_eb_one_bits
int fp_int_eb_one_bitsvariable -
fp_int_eb_man_bits
int fp_int_eb_man_bitsvariable -
fp_int_eh_man_bits
int fp_int_eh_man_bitsvariable -
fp_long1
long fp_long1variable -
fp_long_db_one_bits
long fp_long_db_one_bitsvariable -
fp_long_db_man_bits
long fp_long_db_man_bitsvariable -
fp_long_dh_man_bits
long fp_long_dh_man_bitsvariable -
dc_index
int dc_indexvariable -
dc_data_start
int dc_data_startvariable -
dc_dup
int dc_dupvariable -
dc_dup_loc
int dc_dup_locvariable -
dc_len
int dc_lenvariable -
dc_scale
int dc_scalevariable -
dc_digits
String dc_digitsvariable -
dc_dec_point
boolean dc_dec_pointvariable -
dc_dec_scale
int dc_dec_scalevariable -
dc_exp
int dc_expvariable -
dc_first_len
int dc_first_lenvariable -
dc_first_dup
int dc_first_dupvariable -
dc_first_loc
int dc_first_locvariable -
dc_first_type
char dc_first_typevariable -
dc_first_type_sfx
char dc_first_type_sfxvariable -
dc_first_scale
int dc_first_scalevariable -
dc_first_attr_elt
byte dc_first_attr_eltvariable -
dc_hex
String dc_hexvariable -
dc_data_byte
byte[] dc_data_bytevariable -
dc_data
ByteBuffer dc_datavariable -
dc_type_index
int dc_type_indexvariable -
dc_bd_val
BigDecimal dc_bd_valvariable -
dc_bi_val
BigInteger dc_bi_valvariable -
dc_byte_val
byte[] dc_byte_valvariable -
dcc_ascii_req
boolean dcc_ascii_reqvariable -
ascii_lf
byte ascii_lfvariable -
ascii_cr
byte ascii_crvariable -
ascii_period
byte ascii_periodvariable -
ascii_space
byte ascii_spacevariable -
ebcdic_period
byte ebcdic_periodvariable -
ebcdic_space
byte ebcdic_spacevariable -
dfhresp_type
String[] dfhresp_typevariable -
dfhresp_lit
String[] dfhresp_litvariable -
dfhvalue_type
String[] dfhvalue_typevariable -
dfhvalue_lit
String[] dfhvalue_litvariable
-
-
Constructor Details
-
az390
public az390()Dummy constructor - no initialization needed
-
-
Method Details
-
main
main is entry when executed from command line Create instance of az390 class and pass parms to az390 like z390 does.- Parameters:
args- argument string - same as z390
-
start_az390_thread
public void start_az390_thread(String[] args, JTextArea z390_log, RandomAccessFile mz390_systerm_file, RandomAccessFile mz390_stats_file) initialize z390 when called from mz390 to receive bal directly and share the symbol table with mz390.- Parameters:
args- argumebnt stringz390_log- log datamz390_systerm_file- file handle for systermmz390_stats_file- file handle for statistics
-
finish_az390
save xref file names and error counts for cross reference at end of PRN- Parameters:
mac_file_path- file path for macrosmac_file_errors- macro error data
-
run
public void run()run the assembler -
process_az390
private void process_az390()assemble bal source file into relocatable OBJ file and generate optional PRN file.
Notes:- az390 may be called from:
- z390 GUI Windows command via main();
- Windows command prompt via main();
- mz390 call via process_az390_call();
- If called from z390 GUI Windows command, the console output will be redirected to to the z390 GUI log.
- If called from mz390 via process_az390_call, az390 process will run on separate thread and the get_bal_line and receive_bal_line methods will synchronize passing bal record from mz390 to az390 process.
- az390 may be called from:
-
init_az390
private void init_az390(String[] args, JTextArea log_text, RandomAccessFile systerm, RandomAccessFile stats) - initialize log routing
- set options
- compile regular expression parsers
- open bal and obj buffered I/O files
- Init ascii/ebcdic translation table
- Parameters:
args- argumebnt stringlog_text- log datasysterm- file handle for systermstats- file handle for statistics
-
init_push_pop
private void init_push_pop()init push/pop using and print -
init_arrays
private void init_arrays()initialize arrays using tz390.opt_max??? -
compile_patterns
private void compile_patterns()compile regular expression parsers -
open_files
private void open_files()Set trace file name; then open obj and prn files -
process_bal
private void process_bal()assemble bal source into obj relocatable object code file -
resolve_symbols
private void resolve_symbols()if errors occurred during loading of bal repeat symbol update passes until there are no errors or minimum error or max passes are reached. -
update_symbols
private void update_symbols()scan bal source and update symbols -
check_timeout
private void check_timeout()check if timeout expired -
update_sects
private void update_sects()update each section starting address and max length, and reset current length and current esd_loc
Notes:- If any section start address or max length changes issue error to force additional passes.
- sym_cst CSECT's start at 0 and are contiguous within LOCTR's
- Each new CSECT is aligned to 8
- sym_dst DSECT's always start at 0
- Set esd_base to root section for cst, dst, and loctors
-
sect_change_error
private void sect_change_error()set sect_change -
update_loctrs
private void update_loctrs()update loctr sections with contiguous starting addresses from CSECT/DSECT and issue errors if any start address or length changes and reset length for next pass. -
reset_lits
private void reset_lits()reset lit_gen flags to force reallocation on each pass -
gen_list_mnemonics
private void gen_list_mnemonics()Lists all mnemonics in the selected opcode table- All mnemonics from the current opcode table are converted into report entries
- The report entries are sorted
- The sorted entries are printed (three on a print line) preceded by a header line
-
gen_obj_esds
private void gen_obj_esds()write ESD's for CSECTS, EXTRNS, and ENTRIES to the OBJ file in ascii hex and list on PRN if option LIST -
get_esd_type
return esd type- Returns:
- type of ESD
-
gen_obj_text
private void gen_obj_text()generate object code for bal instructions in CSECT's on final pass -
process_bal_op
private void process_bal_op()allocate or generate object code for bal op- Note op_type index values must match op_name array values.
- Indexes less than 100 and CNOP are machine instr. types RPI 743
- Indexes more than 100 are assembler instr.
-
list_bal_line
private void list_bal_line()list bal line with first 8 bytes of object code if any and turn off list_bal_line request
Note: See comments processing case 0 for update of mac_call_gen, call reformating, and delay flags mac_call_first and mac_call_last. -
check_list_bal_line
private boolean check_list_bal_line()set true if ok to list BAL line on PRN file- Returns:
- true if BAL line to be printed; false to suppress
-
update_list_bal_line
private void update_list_bal_line()update mac_call_gen after prn -
add_rld
private void add_rld(int exp_esd) add plus rld- Parameters:
exp_esd- ???
-
sub_rld
private void sub_rld(int exp_esd) sub rld- Parameters:
exp_esd- ???
-
reduce_exp_rld
private void reduce_exp_rld()reduce rld on stack -
gen_exp_rld
private void gen_exp_rld(int loc_ctr_offset) generate rlds for expression
Notes:- convert to rel csect vs rel module offsets for linker use.
- Original exp_val saved in rld_exp_val for use in PRN display (i.e. show addresses relative to module versus CSECT).
- Parameters:
loc_ctr_offset- offset from location counter for (relocatable) expression position // #659
-
gen_obj_rlds
private void gen_obj_rlds()write RLD's to the OBJ file in ascii hex -
gen_obj_end
private void gen_obj_end()write END object record with entry if specified -
gen_sym_list
private void gen_sym_list()list symbols in alpah order with optional cross reference -
gen_lit_xref_list
private void gen_lit_xref_list()list literals in alpha order with optional cross reference -
load_bal
private void load_bal()load bal source
Concatentate any continuations indicated by non-blank in position 72. Each continuation must start at position 16. -
pass_bal_line
public void pass_bal_line(String new_bal_line, String new_xref_file_name, char new_xref_file_type, int new_xref_file_num, int new_xref_line_num) - pass mz390 bal_line to az390 bal_line with synchronization of threads.
- ignore BAL after END
- Parameters:
new_bal_line- source linenew_xref_file_name- file name for cross refnew_xref_file_type- file type for cross refnew_xref_file_num- file nr for cross refnew_xref_line_num- file line for cross ref
-
set_sym_lock
- Block mz390 until az390 is waiting for next bal.
- Set sym_lock
- See az390 pass_bal for lock check.
- See mz390 put_bal_line for lock reset.
- Parameters:
desc- description
-
reset_sym_lock
public void reset_sym_lock()reset sym lock at next mz390 bal line and at start of lookahead mode. -
get_bal_line
private void get_bal_line()get next bal line from bal file or from mz390 parallel thread pass -
save_bal_line
private void save_bal_line()save bal line during loading for log_error use -
parse_bal_line
private void parse_bal_line()set bal_label and bal_op -
get_base_name
return base file name from path\file.sfx- Parameters:
file_name- file name- Returns:
- base name of the file (without extension)
-
find_bal_op
private int find_bal_op()return index of bal operation
or return 0 for comments
or return -1 if undefined operation
or return -2 if cancelled OPSYN- Returns:
- index of bal operation, or -1=undefine, -2=cancelled OPSYN, 0=comment
-
process_esd
private void process_esd(byte esd_type) process EXTRN, ENTRY, or WXTRN statement- Parameters:
esd_type- ???
-
add_extrn
add EXTRN using V vs S key index- Parameters:
token- input token- Returns:
- index of token
-
add_wxtrn
add WXTRN using V vs S key index- Parameters:
token- input token- Returns:
- index of token
-
add_entry
add ENTRY- Parameters:
token- input token
-
process_sect
add or update csect, dsect, or loctr indicated by sym_cst, sym_dst, or sym_lct type parm
Steps:- Update previous section if any with max length and any loctr pointers
- If name omitted used private cst/dst
- Add new section if not found or external reference found as local label
- Reset location counter to end of current section
- Update prev section type and sid for use in processing sym_lct sections
- Parameters:
sect_type- section type: CSECT / DSECT / RSECTsect_name- section name
-
find_sym
- Return defined symbol index else -1
- If not lookahead mode:
- if found, add xref
- else if vcon mode, add extrn
- Parameters:
name- input symbol: label or variable name- Returns:
- index of symbol, or -1 if not defined
-
update_label
public void update_label()add or update relative labels and exclude CST, DST, EQU, USING symbols -
init_sym_entry
private void init_sym_entry()init sym variables for new or existing lookahead symbol table entry -
get_sym_len
private int get_sym_len(int index) return total length of csect or dsect- Parameters:
index- value- Returns:
- length in bytes
-
update_sect
private void update_sect()update length of current section and save current loc_ctr for continue -
process_dc
public void process_dc(int request_type) processing by request type:- parse ds/dc bal statement and allocate or gen data items including alignment bytes where required.
- find or add literal table entry using ds/dc type single parm following = parm
- generate literal pool dc using loc_ctr set to referenced instruction.
if not DC/DS/LTORG set dc_lit and process first field as literal and update exp_index- Parameters:
request_type- request type code: 1=parse, 2=find, 3=generate
-
calc_abs_exp
private boolean calc_abs_exp()calculate abs value else abort- Returns:
- true if absolute expression, false otherwise
-
calc_rel_exp
private boolean calc_rel_exp()calculate rel value else abort- Returns:
- true if relative expression, false otherwise
-
calc_dca_exp
private boolean calc_dca_exp()set dca_ignore_refs for A and V type symbol refs if DS or DSECT- Returns:
- true if valid DC A() expression, false otherwise
-
calc_exp
private boolean calc_exp()parse abs/rel expression starting at exp_text.charAt(exp_index)
return true if ok and set:- exp_val = abs or rel offset
- exp_esd = abs 0 or cst/dst esd
- exp_index = index to terminator which can be end of string, or ()
- Returns:
- true if valid absolute or relative expression, false otherwise
-
calc_exp
private boolean calc_exp(int loc_ctr_offset) parse abs/rel expression starting at exp_text.charAt(exp_index)
return true if ok and set:- exp_val = abs or rel offset
- exp_esd = abs 0 or cst/dst esd
- exp_index = index to terminator which can be end of string, or ()
- Parameters:
loc_ctr_offset- offset from location counter for (relocatable) expression position // #659- Returns:
- true if valid absolute or relative expression, false otherwise
-
proc_exp_token
private void proc_exp_token(int loc_ctr_offset) parse general expression tokens:- push sym or sdt
- exec or push operations + - * /
- terminate on end of string or ()
- Parameters:
loc_ctr_offset- offset from location counter for (relocatable) expression position // #659
-
proc_loc_ctr
private void proc_loc_ctr()push current location counter on stack -
proc_exp_sym
private void proc_exp_sym()description missing -
proc_exp_sdt
private void proc_exp_sdt()description missing -
proc_exp_op
private void proc_exp_op(int loc_ctr_offset) description missing- Parameters:
loc_ctr_offset- offset from location counter for (relocatable) expression position // #659
-
exp_add
private void exp_add()add top of stack value to prev. value and pop the top stack value off -
exp_sub
private void exp_sub()sub top of stack value from prev. value and pop the top stack value off -
exp_mpy
private void exp_mpy()mpy top of stack value to prev. value * and pop the top stack value off -
exp_div
private void exp_div()div top of stack value into prev. value and pop the top stack value off -
exp_integer_op
private void exp_integer_op()replace sym or lit on stack with integer I' attribute value -
exp_len_op
private void exp_len_op()replace sym or lit on stack with length value -
exp_scale_op
private void exp_scale_op()replace sym or lit on stack with scale value -
get_stk_sym
private void get_stk_sym()set stk_values 1 and and 2 from top of stack -
put_stk_sym
private void put_stk_sym()- pop operator from op stack
- pop sym_val2 off var stack
- replace original sym_val1 on top of stack with result
-
exp_push_op
private void exp_push_op()put current op on stack
if unary minus push 0 var first
if unary plus skip the push -
exp_pop_op
private void exp_pop_op()pop current op on stack -
exp_term
private void exp_term(int loc_ctr_offset) terminate expression returning value on stack if no errors- Parameters:
loc_ctr_offset- offset from location counter for (relocatable) expression position // #659
-
push_exp_sym
private void push_exp_sym()push symbol on stack else abort
set cur_sid > 0 used by L' -
push_exp_lit
private void push_exp_lit()push literal on stack else abort and set cur_lit >= 0 and cur_sit = -1 for L' to determine that literal is on the stack
Note: Literal must be first term in exp since it may use calc_exp during DC processing and then resets exp stack with lit address -
inc_tot_exp_stk_sym
private boolean inc_tot_exp_stk_sym()check if room to add to exp_stack and return true else abort- Returns:
- true if stack has room, abort otherwise
-
push_exp_sdt
push self defining abs term on stack- Parameters:
sdt- self-defining term
-
exit_az390
public void exit_az390()put stats and display total errors after mz390 is done and close files.
Note: return az390 return code for use by mz390 when called from mz390 when mfc option on. -
put_stats
public void put_stats()display statistics on STA and totals on STA and TRM including MZ and AZ totals. -
put_stat_line
routine statistics line to PRN or STATS(file)- Parameters:
msg- message
-
close_files
public void close_files()close output obj, prn, err, tra -
log_error
issue error msg to log with prefix and inc error total
Notes:- Set bal_abort if not set else exit
- supress if not gen_obj and not trace
- print bal line first if list on
- Parameters:
error- error numbermsg- message text
-
set_file_line_xref
private void set_file_line_xref()set xref_file_line passed from mz390 if available for use in error messages -
abort_error
issue error msg to log with prefix and inc error total- Parameters:
error- error numbermsg- error message
-
put_copyright
private void put_copyright()display az390 version, timestamp, and copyright if running standalone -
put_log
Write message to z390_log_text or console if running standalone- Parameters:
msg- message
-
put_prn_line
put line to prt listing file if print_on and not surpressed by nogen. if print data, print all data.- Parameters:
msg- message
-
check_end_parms
private void check_end_parms()check if generated object code equals instruction length and check for extra parms beyond end of last instruction parm and issue error -
put_obj_line
put object code to obj file in hex or binary format- Parameters:
msg- message
-
cvt_obj_hex_to_bin
convert ascii hex object string to binary 80 byte EBCDIC format for mainframe compatiblity. See DFSMS Program Management Manual reference.- Parameters:
hex_rcd- ???
-
get_long_hex
Format long into 16 byte hex string- Parameters:
work_long- long- Returns:
- hex string equivalent of input
-
string_to_hex
Format text string into hex string If ascii_req true, gen ascii else ebcdic hex- Parameters:
text- textascii- character set indicator- Returns:
- formatted text
-
bytes_to_hex
Format bytes into hex string If chunk more than 0 insert space after each chuck- Parameters:
bytes- byte arraybyte_start- start addressbyte_length- length in byteschunk- chunk indicator- Returns:
- hex string for selected bytes
-
put_obj_text
private void put_obj_text()- Append obj_code to list_obj_code for print line (reguired by mult DC calls).
- Exit if gen_obj_code not on or not CSECT
- Buffer output of ojbect text code for contiguous data in same ESD.
- Called from END processing with BAL_EOF to flush buffer.
- Reset obj_code for use by DC routines
-
put_obj_text
private void put_obj_text(int loc_ctr_offset) - Append obj_code to list_obj_code for print line (reguired by mult DC calls).
- Exit if gen_obj_code not on or not CSECT
- Buffer output of ojbect text code for contiguous data in same ESD.
- Called from END processing with BAL_EOF to flush buffer.
- Reset obj_code for use by DC routines
- Parameters:
loc_ctr_offset- offset from location counter for (relocatable) expression position // #659
-
check_private_csect
private void check_private_csect()start private csect if no csect or dsect -
add_using
private void add_using()add or replace USING for code generation -
get_use_range
private void get_use_range()set cur_use_base esd,loc, and len -
get_use_domain
private void get_use_domain()set cur_use_reg and cur_use_off from exp_text at exp_index set by get_use_range
Note: get_rel_exp_bddd is called for dependent using expressions to find reg and loc -
drop_dependent_using
private void drop_dependent_using()drop duplicate unlabeled dependent USING for same section and offset -
drop_using
private void drop_using()drop one or more using registers or labeled using -
drop_cur_use_label
private void drop_cur_use_label()remove labeled using if found -
drop_cur_use_reg
private void drop_cur_use_reg()Remove cur_use_reg entries if found but not labeled usings. -
move_use_entry
private void move_use_entry(int index1, int index2) move use entry from index1 to index2- Parameters:
index1- origin indexindex2- target index
-
add_use_entry
private void add_use_entry()add use entry -
list_use
private void list_use()list current use table if LISTUSE -
get_hex_op
private void get_hex_op(int op_offset, int op_len) initialize object code with op code and initialize exp parser with parms if op_offset = 1- Parameters:
op_offset- ???op_len- instruction length in bytes?
-
or_last_op
private void or_last_op()missing description -
get_hex_nib
return single hex nibble char 0-f- Returns:
- 1-character string
-
get_hex_vreg
private void get_hex_vreg(int vreg) append vector hex reg low 4 bits from next parm and set corresponding vreg_rxb high bit for 16-31 vregs- Parameters:
vreg- vector register number
-
get_hex_reg
private void get_hex_reg()append hex reg from next parm -
get_hex_reg_even
private void get_hex_reg_even()append hex reg from next parm - if it is an even register -
get_hex_vreg_rxb
private void get_hex_vreg_rxb()vector register 1-5 high bits to support registers 16-31 reset for next set of high bits -
get_hex_zero
private void get_hex_zero(int hex_ll) append zero nibbles- Parameters:
hex_ll- nr of nibbles to append
-
skip_comma
private void skip_comma()verify and skip comma -
get_hex_byte
private void get_hex_byte()append hex byte from next parm -
get_hex_halfword
private void get_hex_halfword()append hex halfword from next parm -
get_hex_int
private void get_hex_int(int bits) append hex integer from next parm- Parameters:
bits- length in bits
-
get_hex_relative_offset
private void get_hex_relative_offset(int bits) append hex relative offset from current instruction- Parameters:
bits- length in bits
-
get_hex_byte_signed
private void get_hex_byte_signed()append signed byte from next parm RPI 1146 -
get_hex_llbddd
private void get_hex_llbddd()set hex_len, hex_bddd, and hex_bddd_loc from next parm -
get_exp_ll
private int get_exp_ll()return explicit or implied length from exp_len- Returns:
- length in bytes
-
get_hex_v2xbddd
private void get_hex_v2xbddd()append xbddd or xbdddhh hex object code from next parm -
get_hex_xbddd
private void get_hex_xbddd()append xbddd or xbdddhh hex object code from next parm -
get_exp_v2x
get hex x from next (x) else 0- Returns:
- ???
-
get_exp_x
get hex x from next (x) else 0- Returns:
- ???
-
get_hex_xbdddhh2
private void get_hex_xbdddhh2()append xbddd hex object code from next parm -
get_hex_bddd2
private void get_hex_bddd2(boolean add_code) if add_code
then append bddd or bdddhh hex object code from next parm
else just set hex_bddd2- Parameters:
add_code- flag to set or add base-displacement code
-
exp_next_char
private boolean exp_next_char(char next_char) return true if next exp_text char at exp_index is next_char- Parameters:
next_char- next character- Returns:
- true if equal, false otherwise
-
get_hex_bdddhh2
private void get_hex_bdddhh2()gen bdddhh where hhddd is 20 bit signed offset to b. RPI 387 -
get_hex_rld_long
private void get_hex_rld_long()gen 32 bit RLD or abs value with loc ctr at start of ins. -
get_hex_relative_offset_long
private void get_hex_relative_offset_long()append iiiiiiii signed offset (calc for label) -
get_hex_relative_offset_12
return relative 12 bit relative halfword offset- Returns:
- ???
-
get_hex_relative_offset_16
return relative 16 bit relative halfword offset- Returns:
- ???
-
get_hex_relative_offset_32
return relative signed half word offset from psw_loc to symbol in same csect at even address
Note: Error if not same csect or odd address- Returns:
- ???
-
get_hex_rel_offset_24
return relative 24 bit halfword offset from psw_loc to symbol in same csect at even address
Note: Error if not same csect or odd address- Returns:
- ???
-
get_exp_bddd
- Return hex bddd based on exp_esd and exp_val set by calc_exp or calc_lit.
- If get_bdddhh is set, then 20 bit signed offset will be returned as bdddhh.
- Set cur_reg and cur_reg_loc for use when called from dependent using with domain expression.
- If exp_use_lab is not null restrict using entries to labelled using.
- Returns:
- ???
-
get_exp_abs_bddd
return bddd or bdddhh from explicit ddd(b) with ddd in exp_val- Returns:
- ???
-
get_exp_abs_v2xbddd
return xbddd or xbdddhh from explicit ddd(x,b) with ddd in exp_val- Returns:
- ???
-
get_exp_abs_xbddd
return xbddd or xbdddhh from explicit ddd(x,b) with ddd in exp_val- Returns:
- ???
-
get_exp_abs_bddd
return bddd or bdddhh using exp_val displacement- Parameters:
b- base register numberdddhh- displacement in bytes- Returns:
- ???
-
get_dc_field_dup
private void get_dc_field_dup()return dup factor for dc_field else 1 -
get_dc_field_type
private void get_dc_field_type()set dc_type and dc_type_index and verify valid type else abort -
get_dc_field_modifiers
private void get_dc_field_modifiers()- Set L, S, E defaults
- Check modifiiers based on type
- if DEL check for B/D/H and set tz390.fp_type
- if C check for A/E and set dc_type_sfx
- if AFV check for D and set dc_type_sfx
- if LQ ignore the Q for 16 byte default
- If S check for Y and set length 3
- Process explicit L length, S scale, and E exponent modifiers in any order
- Align and save first length if req'd
-
dc_align
private void dc_align(int align_len) align to mult of align_len from loc_ctr
If align_len more than 8 use 8- Parameters:
align_len- alignment unit in bytes
-
flush_dc_bits
private void flush_dc_bits()flush any bits in dc_bit_buff to align to byte boundary for next field or end of DS.DC -
dc_fill
private void dc_fill(int fill_len) - increment loc_ctr by bytes if not bit mode else shift bits by bit length
- if DC and not first field fill with zeros
- Parameters:
fill_len- length
-
process_dca_data
private void process_dca_data()alloc or gen DS/DC A/V/Y type parms using prev. settings for dc_dup and dc_len. Also save first field dc_type, dc_len -
gen_dca_bits
private void gen_dca_bits()gen dca exp_val in dc_bit_buff
Note: Shared by gen_dcb_bits -
gen_dca_bytes
private void gen_dca_bytes()gen dca byte field -
process_dcb_data
private void process_dcb_data()alloc or gen DS/DC B type parms using prev. settings for dc_dup and dc_len. Also save first field dc_len
Note: binary values are right aligned in explicit length fields. -
gen_dcb_bits
private void gen_dcb_bits()gen dcb type bit field in dc_bit_buff -
gen_dcb_bytes
private void gen_dcb_bytes()gen dcb byte length field -
process_dcc_data
private void process_dcc_data()allocate or generate dc Cln'...' data using dc_dup and explicit dc_len if any
Notes:- C'..' default EBCDIC unless ASCII option
- C".." always ASCII regardless of option
- C!..! always EBCDIC regardless of option
- ''|""|!! or double ampersand replaced with single '|"|! or ampersand
- CA'...' always ASCII
- CE'...' always EBCDIC
-
gen_dcc_bits
private void gen_dcc_bits()gen dcc bit field -
gen_dcc_bytes
private void gen_dcc_bytes()gen dcc bytes -
process_dc_fp_data
private void process_dc_fp_data()alloc or gen DS/DC D, E, or L type data using prev settings for dc_type, dc_type_sfx, dc_dup and dc_len. Also save first field dc_type, dc_len -
gen_dc_fp_bits
private void gen_dc_fp_bits()gen del bit length field -
gen_dc_fp_bytes
private void gen_dc_fp_bytes()gen del byte length field -
get_dc_bd_val
private boolean get_dc_bd_val()set dc_bd_val from next floating point sdt in dc_field at dc_index
Notes:- Apply any scale factor or exponent to dc_bd_value.
- Set dc_unsigned true/false
- Returns:
- true if unsigned, false if signed
-
remove_blanks
remove blanks allowed within numeric DC fields BDEFHLPXZ- Parameters:
text_in- input text- Returns:
- text with extraneous blanks removed
-
get_dc_fh_hex_val
get 1-16 byte hex value for F or H constant from dc_bd_val- Returns:
- hex string
-
get_dc_fp_hex
set dc_hex for D, E, or L floating point sdt starting at text index- Parameters:
text- input stringindex- position
-
process_dcf_data
private void process_dcf_data()alloc or gen DS/DC F type parms using prev. settings for dc_dup and dc_len. Also save first field dc_type, dc_len -
gen_dc_fh_bits
private void gen_dc_fh_bits()gen F or H bit field -
gen_dc_fh_bytes
private void gen_dc_fh_bytes()gen F or H byte field -
process_dch_data
private void process_dch_data()alloc or gen DS/DC H type parms using prev. settings for dc_dup and dc_len. Also save first field dc_type, dc_len -
process_dcp_data
private void process_dcp_data()alloc or gen DS/DC P type parms using prev. settings for dc_dup and dc_len. Also save first field dc_type, dc_len -
gen_dcp_bits
private void gen_dcp_bits()gen P bit field -
gen_dcp_bytes
private void gen_dcp_bytes()gen P byte field -
process_dcz_data
private void process_dcz_data()alloc or gen DS/DC Z type parms using prev. settings for dc_dup and dc_len. Also save first field dc_type, dc_len -
process_dcs_data
private void process_dcs_data()alloc or gen DS/DC S type parms using prev. settings for dc_dup and dc_len. Also save first field dc_type, dc_len -
process_dcx_data
private void process_dcx_data()alloc or gen DS/DC X type parms using prev. settings for dc_dup and dc_len. Also save first field dc_len
Notes:- hex values are right aligned in explicit length fields.
- Spaces are ignored in data
-
gen_dcx_bits
private void gen_dcx_bits()gen X bit field -
gen_dcx_bytes
private void gen_dcx_bytes()gen X byte field -
get_dc_mod_int
private int get_dc_mod_int()return integer expression in (...) or decimal number for modifier- Returns:
- number value
-
get_dc_int
private int get_dc_int(int index) return next number from dc_field at index else return 1 and update dc_index- Parameters:
index- index value- Returns:
- number value
-
process_cnop
private void process_cnop()generate one or more 0700 instr. to align to specified boundary -
process_end
private void process_end()perform END processing at END statement or end of MLC source at end of each pass -
process_equ
public void process_equ()define or update symbol definition:- Set sym_loc to first pos value
- Set sym_len to optional 2nd pos value else set sym_len to 1.
- Set sym_attr to optional 3rd pos value.
- Set sym_attrp 4th program type
- Set sym_attra 5th assembler type
-
process_org
private void process_org()reset current location in same csect -
process_start
private void process_start()set current location first csect -
process_push
private void process_push()push print or using level if any -
process_pop
private void process_pop()pop print or using level if any -
process_print
private void process_print()process print options (unsupported options ignored) -
init_get_next_parm
use tz390.parm_match to find and return next parm separated by commas else return null.- Parameters:
parms- parameter string
-
get_next_parm
use tz390.parm_match to find and return next parm in upper case else return null.- Returns:
- single parameter in uppercase
-
duplicate_symbol_error
private void duplicate_symbol_error()issue error for duplicate symbol definition -
calc_lit_or_exp
private void calc_lit_or_exp()calc rel exp for lit or explicit offset for following offset(index,base) -
calc_lit
private boolean calc_lit()- Find or add literal and set exp_type, exp_val, and exp_esd.
- If literal followed by '-' or '+' calculate expression add to lit address and return abs val else error.
- Returns:
- ???
-
get_default_bddd
return bddd or bdddhh- Returns:
- base-displacement type as "bddd" or "bdddhh"
-
get_lit_addr
private void get_lit_addr()find or add literal and set:- cur_lit = lit table index
- exp_val = lit address
- exp_esd = lit esd
-
gen_ltorg
private void gen_ltorg()generate ltorg at current location in csect -
gen_lit_size
private void gen_lit_size(int size) generate literal dc's of specified size
force all length 1 lits to even addr for access by relative halfword offsets in LARL etc. per issue #327
see regression test rt\test\TESTLITS.MLC which fails on previous releases- Parameters:
size- size of DC to generate
-
add_lit_xref
private void add_lit_xref(int index) add literal xref- Parameters:
index- target index
-
add_esd
private int add_esd(int sid, byte sect_type) add new esd chained to sid and return index else abort- Parameters:
sid- section idsect_type- type of section- Returns:
- index value
-
add_sym
add symbol table entry name and return index for use in setting remaining fields
Note: If lookahead mode, set sym_def = -1- Parameters:
name- name of synbol to add- Returns:
- index of new entry
-
add_sym_xref
private void add_sym_xref(int index) add symbol xref- Parameters:
index- index value
-
gen_ccw0
private void gen_ccw0()generate 8 byte aligned CCW0: op8,addr24,flags8,zero8,len16 -
gen_ccw1
private void gen_ccw1()generate 8 byte aligned CCW1: op8,flags8,len16,addr32 -
fp_get_hex
private void fp_get_hex()set dc_hex for floating point string fp_text in scientific notation 0.314159E1 etc.
format is based on fp type 0-8 (db,dd,dh,eb,ed,eh,lb,ld,lh)
Notes:- This is very tricky code!
- Use BigDecimal for all types to insure DH and EH exponents beyond range of DB and EB will be correctly handled without error.
- The fp_context is set to significant decimal digits plus fp_guard_digts to insure sufficient significant bits for proper rounding occurs.
- The preferred DFP exponent (BigDecimal scale factor) is set based on explicit decimal poiint with significant trailing decimal places including zeros else use 0.
Exit with artbitrary format if zero. -
cvt_fp_exp_to_base_2
private void cvt_fp_exp_to_base_2()calc tz390.fp_exp and big_dec2 such that: big_dec1 = big_dec2 * 2 ** tz390.fp_exp
tz390.fp_exp = log(big_dec1) / log(2)
Since the exponent range of LB exceeds native double, the log of big_dec1 is calculated using equivalent: log(X*10**N) = log(X) + N*log(10)
The exponent must then be offset by the number of bits in the required binary mantissa in order to retain significant bits when big_dec2 is converted to big_int format. The exponent is also reduced by 1 for assumed bit in binary formats plus 1 additional to insure rounding for irrational values is done by shifting right. -
fp_cvt_bd_to_hex
private void fp_cvt_bd_to_hex()- BFP - Adjust mantiss and base 2 exponent to align for assumed 1 bit.
- HFP - Adjust mantissa and base 2 exponent to base 16 exponent.
- DFP - Set base 10 exponent based on explicit decimal point and trailing significant digits including zeros else use preferred exponent of 0.
-
set_dfp_preferred_exp
private void set_dfp_preferred_exp()set DFP preferred base 10 exponent for fp_big_dec1 value if explicit decimal found in fp_text. -
add_missing_copy
add missing copy file for ERRSUM- Parameters:
name- name of missing COPY file- Returns:
- true if successful, false otherwise
-
add_missing_macro
add missing macro file for ERRSUM- Parameters:
name- name of missing macro- Returns:
- true if successful, false otherwise
-
report_critical_errors
public void report_critical_errors()report critical errors on ERR file and console for ERRSUM option -
put_errsum
put ERRSUM msgs on ERR file and console- Parameters:
msg- message text
-
get_int_pfx
public int get_int_pfx(byte type, byte type_sfx, int len, int scale) return I' integer pfx value for symbol based on length and scale per ref.- Parameters:
type- field type (DC type character)type_sfx- field subtype (DC based)len- length in bytesscale- scaling factor- Returns:
- Integer result value
-