🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #4020

Re: PostScript disassembler?

#4020
From: Carl J Lydick
Date: Mon, 09 Nov 1992 20:55
67 lines
2681 bytes
In article <BxGFon.27D@tegra.com>, rothman@tegra.com (Steve Rothman) writes:
=Well, here's an extremely simple-minded example:
=
=:
=:
=%buried somewhere in the prolog
=/d {dup} def
=:
=%buried somewhere else in the prolog
=/m {mul} def
=:
=%buried in yet another place in the prolog
=/s {d m} def    
=:
=:
=%somewhere deep in the page description
=4 s
=:
=:
=
=Ok, so I'm trying to understand why something happened on a page. The line, "4
=s" happens right before something is drawn. In order to find out what it does,
=as I'm looking in the page description, I can search for "/s". When I find it,
=I then have to do a search for "/d" and "/m".  Since this is a simple example,
=I'm now set. In real-life, I've found my self backtracking through a dozen
=layers, in many directions, just to find out what one lousy operator in the
=middle of an otherwise understandable page description does.
=
=What I would like my mythical "ps dissasembler" program to do is to replace the
=line 
=
=4 s
=
=with a line reading
=
=4 dup mul
=
=Then I know exactly what's happening, without prolonged searching around in the
=prolog!

Sorry.  Can't be done.  Consider the following (legal) Postscript code:

	/BIG
	{ /POINTSIZE 18 def
	} def
	/SMALL
	{ /POINTSIZE 9 def
	} def
	BIG
	/Courier findfont POINTSIZE scalefont setfont
	72 72 moveto
	(This is the big font) show
	SMALL
	/Courier findfont POINTSIZE scalefont setfont
	72 144 moveto
	(This is the small font) show
	showpage

Now, how would your "disassembler" expand POINTSIZE?
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL

Disclaimer:  Hey, I understand VAXen and VMS.  That's what I get paid for.  My
understanding of astronomy is purely at the amateur level (or below).  So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it.  If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.
Technical Details
Message-ID: <1dmj7eINNha9@gap.caltech.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!elroy.jpl.nasa.gov!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
References: <Bx90n0.3H5@tegra.com> <1992Nov8.061155@eklektix.com>,<BxGFon.27D@tegra.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!elroy.jpl.nasa.gov!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
Newsgroups: comp.lang.postscript
Subject: Re: PostScript disassembler?
Date: 9 Nov 1992 20:55:10 GMT
Organization: HST Wide Field/Planetary Camera
Lines: 67
Distribution: world
Message-ID: <1dmj7eINNha9@gap.caltech.edu>
References: <Bx90n0.3H5@tegra.com> <1992Nov8.061155@eklektix.com>,<BxGFon.27D@tegra.com>
Reply-To: carl@SOL1.GPS.CALTECH.EDU
NNTP-Posting-Host: sol1.gps.caltech.edu