🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #5944

drawing activation records

#5944
From: Tim Budd
Date: Mon, 27 Feb 1989 18:26
36 lines
1704 bytes
I frequently need to draw Activation Records.  I can speak both LaTex and
Troff, but I haven't found a good way to do this in either language.

I need to draw a stack of boxed activation records, with pointers and
offsets off to the left side (frame pointer, top of stack) and commentary 
off to the right.  
The inside the ar can be centered text to describe various fields.
Pointers that go to other fields ofthe AR can also be described pictorially.
Prefereable, but not entirely necessary, would be the ability to have a
large curly brace appear on the right hand side to denote a section of the
stack, such as the entire activation record for a given procedure.

Here is a rough approximation

       sp ->				current top of stack
		-----------------
            -20 |		|	this is the activation record
	    -16 |		|	for procedure foo.
	    -12	|  array x      |	note how it contains pointers to
	     -8 |  variable b	|	the previous AR.
	     -4	|  variable a   |
	fp ->	|    old fp ----|-|
		|return address | |
            +8  | first param   | |
		----------------- |
            	|		| |	
            	|		| |	
            	|		| |	
            	|		| |	
            	|		| |	
            	|	<-------|-|	

Does anybody know of a relatively EASY way to produce these sorts of
pictures in either LaTeX or Troff?

--tim budd, oregon state university (budd@cs.orst.edu)
Technical Details
Message-ID: <9112@orstcs.CS.ORST.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!rutgers!orstcs!mist!budd

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!rutgers!orstcs!mist!budd
From: budd@mist.cs.orst.edu (Tim Budd)
Newsgroups: comp.text
Subject: drawing activation records
Message-ID: <9112@orstcs.CS.ORST.EDU>
Date: 27 Feb 89 18:26:56 GMT
Sender: usenet@orstcs.CS.ORST.EDU
Lines: 36