Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!sdd.hp.com!spool.mu.edu!munnari.oz.au!manuel!ccadfa!prolix!dac From: dac@prolix.pub.uu.oz.au (Andrew Clayton) Newsgroups: comp.sys.amiga.programmer Subject: Re: RASTPORT from ML Message-ID: <18d51307.ARN1309@prolix.pub.uu.oz.au> Date: 15 Mar 91 13:00:23 GMT References: <65143@eerie.acsu.Buffalo.EDU> Reply-To: dac@prolix.pub.uu.oz.au Followup-To: comp.sys.amiga.programmer Organization: More like Mis~, really. Lines: 31 In article <65143@eerie.acsu.Buffalo.EDU>, Jeffrey C Murphy writes: > > How do you locate the rastport value from machine language if > your program is using the cli as the output window? > > Thanx > JM Well, I reckon if you can work with ML, decoding the following Modula 2 (M2Sprint) code shouldn't prove too difficult. FROM RunTime IMPORT ExecBase, IntuitionBase; (*****************************************************************************) intbase := IntuitionBase; (*All this hassle to get*) windowptr := intbase^.ActiveWindow; (*the magic item for DrawImage*) rport := windowptr^.RPort; (*called the RastPort!*) (*****************************************************************************) Good luck. Dac -- David Andrew Clayton. // _l _ _ dac@prolix.pub.uu.oz.au *or*|I post.I am. Canberra, Australia.\X/ (_](_l(_ ccadfa.cc.adfa.oz.au!prolix!dac@munnari.oz