english
version "1.0"
identify "xyz"

#: This module implements the 8051 micrcontroller instruction codes.

module code


#: {code} routines:

procedure acall@code
    takes
	code_address code_address
    returns code

    #: This procedure will return a {acall} {code} object containing
    #, {code_address}.


procedure add_a_rn@code
    takes
	rn rn
    returns code

    #: This procedure will return an {add_a_rn} {code} object containing
    #, {rn}.


procedure add_a_direct@code
    takes
	direct direct
    returns code

    #: This procedure will return an {add_a_direct} {code} object containing
    #, {direct}.


procedure add_a_ri@code
    takes
	ri ri
    returns code

    #: This code procedure will return an {add_a_ri} {code} object containing
    #, {ri}.


procedure add_a_data@code
    takes
	immediate immediate
    returns code

    #: This procedure will return an {add_a_data} {code} object containing
    #, {immediate}.


procedure addc_a_rn@code
    takes
	rn rn
    returns code

    #: This procedure will return an [addc_a_rn} {code} object containing
    #, {rn}.


procedure addc_a_direct@code
    takes
	direct direct
    returns code

    #: This procedure will return an {add_a_direct} {code} object containing
    #, {direct}.


procedure addc_a_ri@code
    takes
	ri ri
    returns code

    #: This procedure will return a {addc_a_ri} {code} object containing
    #, {ri}.


procedure addc_a_data@code
    takes
	immediate immediate
    returns code

    #: This procedure will return a {addc_a_data} {code} object containing
    #, {immediate}.


procedure ajmp@code
    takes
	code_address code_address
    returns code

    #: This procedure will return an {ajmp} {code} object containing
    #, {code_address}.


procedure anl_a_rn@code
    takes
	rn rn
    returns code

    #: This procedure will return an {anl_a_rn} {code} object containing
    #, {rn}.


procedure anl_a_direct@code
    takes
	direct direct
    returns code

    #: This procedure will return a {anl_a_direct} {code} object containing
    #, {direct}.


procedure anl_a_ri@code
    takes
	ri ri
    returns code

    #: This procedure will return an {anl_a_ri} {code} object containing
    #, {ri}.


procedure anl_a_data@code
    takes
	immediate immediate
    returns code

    #: This procedure will return an {anl_a_data} {code} object containing
    #, {immediate}.


procedure anl_direct_a@code
    takes
	direct direct
    returns code

    #: This procedure will return a {anl_direct_a} {code} object containing
    #, {direct}.


procedure anl_direct_data@code
    takes
	direct_immediate direct_immediate
    returns code

    #: This procedure will return an {anl_direct_data} {code} object containing
    #, {direct_immediate}.


procedure anl_c_bit@code
    takes
	bit_address bit_address
    returns code

    #: This procedure will return an {anl_c_bit} {code} object containing
    #, {bit_address}.


procedure anl_c_nbit@code
    takes
	bit_address bit_address
    returns code

    #: This procedure will return an {anl_c_nbit} {code} object containing
    #, {bit_address}.


procedure cjne_a_direct_rel@code
    takes
	direct_relative direct_relative
    returns code

    #: This procedure will return a {cjne_a_direct_rel} {code} object
    #, containing {direct_relative}.


procedure cjne_a_data_rel@code
    takes
	immediate_relative immediate_relative
    returns code

    #: This procedure will return a {cjne_a_data_rel} {code} object containing
    #, {immediate_relative}.


procedure cjne_rn_data_rel@code
    takes
	rn_immediate_relative rn_immediate_relative
    returns code

    #: This procedure will return a {cjne_rn_data_rel} {code} object containing
    #, {rn_immediate_relative}.


procedure cjne_ri_data_rel@code
    takes
	ri_immediate_relative ri_immediate_relative
    returns code

    #: This procedure will return a {cjne_ri_data_rel} {code} object containing
    #, {ri_immediate_relative}.


procedure clr_a@code
    takes_nothing
    returns code

    #: This procedure will return a {clr_a} {code} object
    #,.


procedure clr_c@code
    takes_nothing
    returns code

    #: This procedure will return a {clr_c} {code} object
    #,.


procedure clr_bit@code
    takes
	bit_address bit_address
    returns code

    #: This procedure will return a {clr_bit} {code} object containing
    #, {bit_address}.


procedure cpl_a@code
    takes_nothing
    returns code

    #: This procedure will return a {cpl_a} {code} object
    #,.


procedure cpl_c@code
    takes_nothing
    returns code

    #: This procedure will return a {cpl_c} {code} object
    #,.


procedure cpl_bit@code
    takes
	bit_address bit_address
    returns code

    #: This procedure will return a {cpl_bit} {code} object
    #, {bit_address}.


procedure da@code
    takes_nothing
    returns code

    #: This procedure will return a {da} {code} object
    #,.


procedure dec_a@code
    takes_nothing
    returns code

    #: This procedure will return a {dec_a} {code} object
    #,.


procedure dec_rn@code
    takes
	rn rn
    returns code

    #: This procedure will return a {dec_rn} {code} object containing
    #, {rn}.


procedure dec_direct@code
    takes
	direct direct
    returns code

    #: This procedure will return a {dec_direct} {code} object containing
    #, {direct}.


procedure dec_ri@code
    takes
	ri ri
    returns code

    #: This procedure will return a {dec_ri} {code} object containing
    #, {ri}.


procedure div@code
    takes_nothing
    returns code

    #: This procedure will return a {div} {code} object
    #,.


procedure djnz_rn_rel@code
    takes
	rn_relative rn_relative
    returns code

    #: This procedure will return a {djnz_rn_rel} {code} object containing
    #, {rn_relative}.


procedure djnz_direct_rel@code
    takes
	direct_relative direct_relative
    returns code

    #: This procedure will return a {djnz_direct_rel} {code} object containing
    #, {direct_relative}.


procedure inc_a@code
    takes_nothing
    returns code

    #: This procedure will return an {inc_a} {code} object
    #,.


procedure inc_rn@code
    takes
	rn rn
    returns code

    #: This procedure will return an {inc_rn} {code} object containing
    #, {rn}.


procedure inc_direct@code
    takes
	direct direct
    returns code

    #: This procedure will return an {inc_direct} {code} object containing
    #, {direct}.


procedure inc_ri@code
    takes
	ri ri
    returns code

    #: This procedure will return an {inc_ri} {code} object containing
    #, {ri}.


procedure inc_dptr@code
    takes_nothing
    returns code

    #: This procedure will return an {inc_dptr} {code} object
    #,.


procedure jb_bit_rel@code
    takes
	bit_relative bit_relative
    returns code

    #: This procedure will return a {jb_bit_rel} {code} object containing
    #, {bit_relative}.


procedure jbc_bit_rel@code
    takes
	bit_relative bit_relative
    returns code

    #: This procedure will return a {jbc_bit_rel} {code} object containing
    #, {bit_relative}.


procedure jc_rel@code
    takes
	relative relative
    returns code

    #: This procedure will return a {jc_rel} {code} object containing
    #, {relative}.


procedure jmp_a_dptr@code
    takes_nothing
    returns code

    #: This procedure will return a {jmp_a_dptr} {code} object
    #,.


procedure jnb_bit_rel@code
    takes
	bit_relative bit_relative
    returns code

    #: This procedure will return a {jnb_bit_rel} {code} object containing
    #, {bit_relative}.


procedure jnc_rel@code
    takes
	relative relative
    returns code

    #: This procedure will return a {jnc_rel} {code} object containing
    #, {relative}.


procedure jnz_rel@code
    takes
	relative relative
    returns code

    #: This procedure will return a {jnz_rel} {code} object containing
    #, {relative}.


procedure jz_rel@code
    takes
	relative relative
    returns code

    #: This procedure will return a {jz_rel} {code} object containing
    #, {relative}.


procedure lcall@code
    takes
	code_address code_address
    returns code

    #: This procedure will return an {lcall} {code} object containing
    #, {code_address}.


procedure ljmp@code
    takes
	code_address code_address
    returns code

    #: This procedure will return an {ljmp} {code} object containing
    #, {code_address}.


procedure mov_a_rn@code
    takes
	rn rn
    returns code

    #: This procedure will return a {mov_a_rn} {code} object containing
    #, {rn}.


procedure mov_a_direct@code
    takes
	direct direct
    returns code

    #: This procedure will return a {mov_a_direct} {code} object containing
    #, {direct}.


procedure mov_a_ri@code
    takes
	ri ri
    returns code

    #: This procedure will return a {mov_a_ri} {code} object containing
    #, {ri}.


procedure mov_a_data@code
    takes
	immediate immediate
    returns code

    #: This procedure will return a {mov_a_data} {code} object containing
    #, {immediate}.


procedure mov_rn_a@code
    takes
	rn rn
    returns code

    #: This procedure will return a {mov_rn_a} {code} object containing
    #, {rn}.


procedure mov_rn_direct@code
    takes
	rn_direct rn_direct
    returns code

    #: This procedure will return a {mov_rn_direct} {code} object containing
    #, {rn_direct}.


procedure mov_rn_data@code
    takes
	rn_immediate rn_immediate
    returns code

    #: This procedure will return a {mov_rn_data} {code} object containing
    #, {rn_immediate}.


procedure mov_direct_a@code
    takes
	direct direct
    returns code

    #: This procedure will return a {mov_direct_a} {code} object containing
    #, {direct}.


procedure mov_direct_rn@code
    takes
	direct_rn direct_rn
    returns code

    #: This procedure will return a {mov_direct_rn} {code} object containing
    #, {direct_rn}.


procedure mov_direct_direct@code
    takes
	direct_direct direct_direct
    returns code

    #: This procedure will return a {mov_direct_direct} {code} object
    #, containing {direct_direct}.


procedure mov_direct_ri@code
    takes
	direct_ri direct_ri
    returns code

    #: This procedure will return a {mov_direct_ri} {code} object containing
    #, {direct_ri}.


procedure mov_direct_data@code
    takes
	direct_immediate direct_immediate
    returns code

    #: This procedure will return a {mov_direct_data} {code} object containing
    #, {direct_immediate}.


procedure mov_ri_a@code
    takes
	ri ri
    returns code

    #: This procedure will return a {mov_ri_a} {code} object containing
    #, {ri}.


procedure mov_ri_direct@code
    takes
	ri_direct ri_direct
    returns code

    #: This procedure will return a {mov_ri_direct} {code} object containing
    #, {ri_direct}.


procedure mov_ri_data@code
    takes
	ri_immediate ri_immediate
    returns code

    #: This procedure will return a {mov_ri_data} {code} object containing
    #, {ri_immediate}.


procedure mov_c_bit@code
    takes
	bit_address bit_address
    returns code

    #: This procedure will return a {mov_c_bit} {code} object containing
    #, {bit_address}.


procedure mov_bit_c@code
    takes
	bit_address bit_address
    returns code

    #: This procedure will return a {mov_bit_c} {code} object containing
    #, {bit_address}.


procedure mov_dptr_data16@code
    takes
	immediate16 immediate16
    returns code

    #: This procedure will return a {mov_dptr_data16} {code} object containing
    #, {immediate16}.


procedure movc_a_dptr@code
    takes_nothing
    returns code

    #: This procedure will return a {movc_a_dptr} {code} object
    #,.


procedure movc_a_pc@code
    takes_nothing
    returns code

    #: This procedure will return a {movc_a_pc} {code} object
    #,.


procedure movx_a_ri@code
    takes
	ri ri
    returns code

    #: This procedure will return a {movx_a_ri} {code} object containing
    #, {ri}.


procedure movx_a_dptr@code
    takes_nothing
    returns code

    #: This procedure will return a {movx_a_dptr} {code} object
    #,.


procedure movx_ri_a@code
    takes
	ri ri
    returns code

    #: This procedure will return a {movx_ri_a} {code} object containing
    #, {ri}.


procedure movx_dptr_a@code
    takes_nothing
    returns code

    #: This procedure will return a {movx_dptr_a} {code} object
    #,.


procedure mul_ab@code
    takes_nothing
    returns code

    #: This procedure will return a {mul_ab} {code} object
    #,.


procedure nop@code
    takes_nothing
    returns code

    #: This procedure will return a {nop} {code} object
    #,.


procedure orl_a_rn@code
    takes
	rn rn
    returns code

    #: This procedure will return an {orl_a_rn} {code} object containing
    #, {rn}.


procedure orl_a_direct@code
    takes
	direct direct
    returns code

    #: This procedure will return an {orl_a_direct} {code} object containing
    #, {direct}.


procedure orl_a_ri@code
    takes
	ri ri
    returns code

    #: This procedure will return an {orl_a_ri} {code} object containing
    #, {ri}.


procedure orl_a_data@code
    takes
	immediate immediate
    returns code

    #: This procedure will return an {orl_a_data} {code} object containing
    #, {immediate}.


procedure orl_direct_a@code
    takes
	direct direct
    returns code

    #: This procedure will return an {orl_direct_a} {code} object containing
    #, {direct}.


procedure orl_direct_data@code
    takes
	direct_immediate direct_immediate
    returns code

    #: This procedure will return an {orl_direct_data} {code} object containing
    #, {direct_immediate}.


procedure orl_c_bit@code
    takes
	bit_address bit_address
    returns code

    #: This procedure will return a {orl_c_bit} {code} object containing
    #, {bit_address}.


procedure orl_c_nbit@code
    takes
	bit_address bit_address
    returns code

    #: This procedure will return a {orl_c_nbit} {code} object containing
    #, {bit_address}.


procedure pop_direct@code
    takes
	direct direct
    returns code

    #: This procedure will return a {pop_direct} {code} object containing
    #, {direct}.


procedure push_direct@code
    takes
	direct direct
    returns code

    #: This procedure will return a {push_direct} {code} object containing
    #, {direct}.


procedure ret@code
    takes_nothing
    returns code

    #: This procedure will return a {ret} {code} object
    #,.


procedure reti@code
    takes_nothing
    returns code

    #: This procedure will return a {reti} {code} object
    #,.


procedure rl_a@code
    takes_nothing
    returns code

    #: This procedure will return a {rl_a} {code} object
    #,.


procedure rlc_a@code
    takes_nothing
    returns code

    #: This procedure will return a {rlc_a} {code} object
    #,.


procedure rr_a@code
    takes_nothing
    returns code

    #: This procedure will return a {rr_a} {code} object
    #,.


procedure rrc_a@code
    takes_nothing
    returns code

    #: This procedure will return a {rrc_a} {code} object
    #,.


procedure setb_c@code
    takes_nothing
    returns code

    #: This procedure will return a {setb_c} {code} object
    #,.


procedure setb_bit@code
    takes
	bit_address bit_address
    returns code

    #: This procedure will return a {SETB bit} {code} object containing
    #, {bit_address}.


procedure sjmp_rel@code
    takes
	relative relative
    returns code

    #: This procedure will return a {sjmp_rel} {code} object containing
    #, {relative}.


procedure sbbc_a_rn@code
    takes
	rn rn
    returns code

    #: This procedure will return a {sbbc_a_rn} {code} object containing
    #, {rn}.


procedure sbbc_a_direct@code
    takes
	direct direct
    returns code

    #: This procedure will return a {sbbc_a_direct} {code} object containing
    #, {direct}.


procedure sbbc_a_ri@code
    takes
	ri ri
    returns code

    #: This procedure will return a {sbbc_a_ri} {code} object containing
    #, {ri}.


procedure sbbc_a_data@code
    takes
	immediate immediate
    returns code

    #: This procedure will return a {sbbc_a_data} {code} object containing
    #, {immediate}.


procedure swap_a@code
    takes_nothing
    returns code

    #: This procedure will return a {swap_a} {code} object
    #,.


procedure xch_a_rn@code
    takes
	rn rn
    returns code

    #: This procedure will return a {xch_a_rn} {code} object containing
    #, {rn}.


procedure xch_a_direct@code
    takes
	direct direct
    returns code

    #: This procedure will return a {xch_a_direct} {code} object containing
    #, {direct}.


procedure xch_a_ri@code
    takes
	ri ri
    returns code

    #: This procedure will return a {xch_a_ri} {code} object containing
    #, {ri}.


procedure xchd_a_ri@code
    takes
	ri ri
    returns code

    #: This procedure will return a {xchd_a_ri} {code} object containing
    #, {ri}.


procedure xrl_a_rn@code
    takes
	rn rn
    returns code

    #: This procedure will return a {xrl_a_rn} {code} object containing
    #, {rn}.


procedure xrl_a_direct@code
    takes
	direct direct
    returns code

    #: This procedure will return a {xrl_a_direct} {code} object containing
    #, {direct}.


procedure xrl_a_ri@code
    takes
	ri ri
    returns code

    #: This procedure will return a {xrl_a_ri} {code} object containing
    #, {x}.


procedure xrl_a_data@code
    takes
	immediate immediate
    returns code

    #: This procedure will return a {xrl_a_data} {code} object containing
    #, {immediate}.


procedure xrl_direct_a@code
    takes
	direct direct
    returns code

    #: This procedure will return a {xrl_direct_a} {code} object containing
    #, {direct}.


procedure xrl_direct_data@code
    takes
	direct_immediate direct_immediate
    returns code

    #: This procedure will return a {xrl_direct_data} {code} object containing
    #, {direct_immediate}.

procedure create@bit_relative
    takes
	bit_address bit_address
	relative relative
    returns bit_relative

    #: This procedure will create and return a new {bit_relative} object
    #, and containing {bit_address} and {relative}.


procedure create@code_address
    takes
	address unsigned
	instruction instruction
    returns code_address

    #: This procedure will create and return a new {code_address} object
    #, and containing {address} and {instruction}.
    #, {instruction} can be ??@{instruction}.


procedure create@direct
    takes
	address unsigned
    returns direct

    #: This procedure will create and return a new {direct} object
    #, and containing {address}.


procedure create@direct_direct
    takes
	source direct
	destination direct
    returns direct_direct

    #: This procedure will create and return a new {direct_direct} object
    #, and containing {source} and {destination}.


procedure create@direct_immediate
    takes
	direct direct
	immediate immediate
    returns direct_immediate

    #: This procedure will create and return a new {direct_immediate} object
    #, and containing {direct} and {immediate}.


procedure create@direct_relative
    takes
	direct direct
	relative relative
    returns direct_relative

    #: This procedure will create and return a new {direct_relative} object
    #, and containing {direct} and {relative}.


procedure create@direct_ri
    takes
	direct direct
	ri ri
    returns direct_ri

    #: This procedure will create and return a new {direct_ri} object
    #, and containing {direct} and {ri}.


procedure create@direct_rn
    takes
	direct direct
	rn rn
    returns direct_rn

    #: This procedure will create and return a new {direct_rn} object
    #, and containing {direct} and {rn}.


procedure create@immediate
    takes
	value unsigned
    returns immediate

    #: This procedure will create and return a new {immediate} object
    #, and containing {value}.


procedure create@immediate16
    takes
	value unsigned
    returns immediate16

    #: This procedure will create and return a new {immediate16} object
    #, and containing {value}.


procedure create@immediate_relative
    takes
	immediate immediate
	relative relative
    returns immediate_relative

    #: This procedure will create and return a new {immediate_relative} object
    #, and containing {immediate} and {z}.


procedure create@instruction
    takes
	address unsigned
	code code
	next instruction
    returns instruction

    #: This procedure will create and return a new {instruction} object
    #, and containing {address}, {code}, and {next}.
    #, {next} can be ??@{instruction}.


procedure create@relative
    takes
	address unsigned
	instruction instruction
	offset unsigned
    returns relative

    #: This procedure will create and return a new {relative} object
    #, and containing {address}, {instruction,
    #, and {offset}.


procedure create@ri
    takes
	number unsigned
    returns ri

    #: This procedure will create and return a new {ri} object
    #, and containing {number}.


procedure create@ri_immediate_relative
    takes
	ri ri
	immediate unsigned
	relative relative
    returns ri_immediate_relative

    #: This procedure will create and return a new {ri_immediate_relative}
    #, object and containing {ri} and {z}.


procedure create@ri_direct
    takes
	ri ri
	direct direct
    returns ri_direct

    #: This procedure will create and return a new {ri_direct} object
    #, and containing {ri} and {direct}.


procedure create@ri_immediate
    takes
	ri ri
	immediate immediate
    returns ri_immediate

    #: This procedure will create and return a new {ri_immediate} object
    #, and containing {ri} and {immediate}.


procedure create@rn
    takes
	number unsigned
    returns rn

    #: This procedure will create and return a new {rn} object
    #, and containing {number}.


procedure create@rn_immediate_relative
    takes
	rn rn
	immediate immediate
	relative relative
    returns rn_immediate_relative

    #: This procedure will create and return a new {rn_immediate_relative}
    #, object and containing {rn}, {immediate}, and
    #, {relative}.


procedure create@rn_direct
    takes
	rn rn
	direct direct
    returns rn_direct

    #: This procedure will create and return a new {rn_direct} object
    #, and containing {rn} and {direct}.


procedure create@rn_immediate
    takes
	rn rn
	immediate immediate
    returns rn_immediate

    #: This procedure will create and return a new {rn_immediate} object
    #, and containing {rn} and {immediate}.


procedure create@rn_relative
    takes
	rn rn
	relative relative
    returns rn_relative

    #: This procedure will create and return a new {rn_relative} object
    #, and containing {rn} and {relative}.