Plan 9 from Bell Labs’s /usr/web/sources/contrib/maht/inferno/appl/cmd/asm/asm.m

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


# asm.b


Asm : module {

	init: fn(nil: ref Draw->Context, nil: list of string);

	Dtype : adt {
		pick {
			Byte =>
				b : int;
			Word =>
				w : int;
			Float =>
				r : real;
			Big =>
				b : big;
			Pointer =>
				p : int;
			Unicode =>
				c : string;
			Memory =>
				m : int;
			MemoryP =>
				mp : int;
		}
	};

	Header : adt {
		magic : con Dis->XMAGIC;
		runtime_flag : con 0;
		stack_extent, code_size, data_size, type_size, link_size, entry_pc, entry_type : int;	
	};

	Cell : adt {
		pick {
			op =>
				opcode : ref Dis->Inst;
			addr =>
				cell : int;
		}
	};

	Label : adt {
		name : string;
		cell : int;
	};

	Obj : adt {
		header : ref Header;
		code : list of ref Dis->Inst;
		types : list of ref Dis->Type;
		data : list of ref Dis->Data;
		name : string;
		link : list of ref Dis->Link;
		imports : list of ref Dis->Import;
		except : list of ref Dis->Except;
		handler : list of ref Dis->Handler;

		labels : list of ref Label;

		label_cell: fn(o : self ref Obj, name : string) : int;
	};

	parse: fn(fd : ref Sys->FD) : ref Obj;
};

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.