{$DOUBLE}
program foo;
	 3-AUG-1989 - JMB - Add $DOUBLE compiler switch

%include '[22,320]general.typ';
%include 'message.typ';

TYPE
	msg_ptr = ^Msg_rec;
	MSG_rec = RECORD
	    header: Msg_Header_rec;
	    Case integer OF
		0: (body1: STR255);
		1: (Body2: CH50);
		2: (Body3: CH80);
	    END; { record}

	msg50 = RECORD
	    header: Msg_Header_rec;
	    body: CH50;
	    end;

var
	msg: Msg_rec;
	p:Msg_ptr;
	m50: Msg50;
	m80: Msg80;
procedure foo;External;

Procedure foo;

procedure bar(a:msg_ptr);
    BEGIN
	writeln('and the address is...',loophole(word,a):-6)
    end;

begin
	writeln('dumping addresses');
	writeln('msg          = ', loophole(word,ref(msg)):-6);
	writeln('src_rtr      = ', loophole(word,ref(msg.header.src_rtr)):-6);
	writeln('src_task     = ', loophole(word,ref(msg.header.src_task)):-6);
	writeln('src_node     = ', loophole(word,ref(msg.header.src_node)):-6);
	writeln('dest_task    = ', loophole(word,ref(msg.header.dest_task)):-6);
	writeln('dest_node    = ', loophole(word,ref(msg.header.dest_node)):-6);
	writeln('flags        = ', loophole(word,ref(msg.header.flags)):-6);
	writeln('usr_flags    = ', loophole(word,ref(msg.header.usr_Flags)):-6);
	writeln('usr_protocol = ', loophole(word,ref(msg.header.usr_protocol)):-6);
	writeln('usr_spare    = ', loophole(word,ref(msg.header.usr_spare)):-6);
	writeln('text_size    = ', loophole(word,ref(msg.header.text_size)):-6);
	writeln('msg_size     = ', loophole(word,ref(msg.header.msg_size)):-6);
	p := ref(msg);
	bar(p);
	p := ref(m50.header);
	bar(p);
	p := ref(m80.header);
	bar(p);
	writeln('done.')

end;

