english
version "1.0"
identify "xyz"

#: This module implements an MCS-51 initialization routines.

module mcs51

define mcs51				#: Various data structures for MCS-51
    record
	debug_stream out_stream		#: Debugging stream
	error_stream out_stream		#: Error stream
	options options			#: Options
	out_stream out_stream		#: Output stream
	program program			#: Program
	system system			#: System object
	symbol_table symbol_table	#: Sybmol table
    generate allocate, erase, print

define options				#: Command line options
    record
	assembly_file_name string	#: -a <assembly_file>
	listing_file_name string	#: -l <listing_file>
    generate allocate, erase, print


#: {mcs51} routines:

procedure create@mcs51
    takes
	system system
    returns mcs51

    #: This procedure will create and return an initialized {mcs51}
    #, object allocated using {system}.  All the command line options
    #, are parse by this routine.

    #: Initialize and return:

procedure process@mcs51
    takes
	mcs51 mcs51
    returns unsigned

    #: This procedure will process the resulting MCS-51 assembly program.