🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #353

Re: Assembler Help

#353
From: Brett Bourbin
Date: Wed, 05 Jul 1989 14:22
39 lines
2305 bytes
In article <20123@cup.portal.com> Bruce_Eric_Bowers@cup.portal.com writes:
>... it gurus when closing the intuition library.
>* Open the Intuition Library
>           MOVEA.L _AbsExecBase,A6      ;Load A6 With Address Of LVO Table
>           LEA     IntuitLibName(PC),A1 ;Set A1 To Point To Library Name
>           CLR.L   D0                   ;Set Library Version to "Any"
>           JSR     _LVOOpenLibrary(A6)  ;Open The Intuition Library
>           MOVEA.L D0,A6                ;Move Library Address to A6

	First, I don't know if you are aware, but moving a value into a
address register _DOESN'T_ set the condition codes.  I think you are safe
right now, with the current OS, since I seem to remember that the status is
loaded into D0 right before returning.  To be safe and nice to people, put
a TST.L D0 or some move to a data register before the BEQ Exit.

>           BEQ     Exit                 ;If Addr Was 0, OpenLibrary Failed
>* Close The Intuition Library
>           MOVEA.L _AbsExecBase,A6      ;Load A6 With Address Of LVO Table
>           LEA     IntuitLibName(PC),A1 ;Set A1 To Point To Library Name

	ACK! or should I say NAK!  8^)  When you close a library, you load 
_AbsExecBase into register A6 like you did, but you pass it the library base
that you received when opening the library.  (What was passed in D0.)  You
are trying to close a library thats base address is IntuitLibName, a nono.
   
>           JSR     _LVOCloseLibrary(A6) ;Close The Intuition Library
>IntuitLibName    DC.B   'intuition.library'
>                 DC.B   0

	Fix that and I think you will be alright.  Good luck.
 
>Thanks!  Bruce Bowers


-- 

--Brett S Bourbin, Instructional Computing Programs -- Univ of Maryland
            Computer Science Center, College Park, MD 20742
       INTERNET: brett@umd5.umd.edu  BIX: brettb  DELPHI: brettb
Technical Details
Message-ID: <5071@umd5.umd.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!haven!umd5!brett
References: <20123@cup.portal.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!haven!umd5!brett
From: brett@umd5.umd.edu (Brett Bourbin)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Assembler Help
Message-ID: <5071@umd5.umd.edu>
Date: 5 Jul 89 14:22:49 GMT
References: <20123@cup.portal.com>
Reply-To: brett@umd5.umd.edu (Brett Bourbin)
Organization: University of Maryland, College Park
Lines: 39