<PAGE>   1

                                                                   EXHIBIT 10.40

          AGREEMENT DATED MAY 21, 1998 WITH WILLIAM M. THOMPSON, M.D.


                                    AGREEMENT

        This Agreement, dated as of May 21, 1998 ("Agreement"), by and between
AMDL, INC., a Delaware corporation (the "Company") and WILLIAM M. THOMPSON, M.D.
(the "Director"), sets forth certain benefits to be received by the Director
upon the occurrence of a Termination Event (as defined in Section 2.3 below)
following a Change in Control of the Company (as defined in Section 2.2 below).

                                        I
                                    RECITALS

        1.1 The Company considers it essential to the best interests of its
shareholders to foster the continuous employment of certain key management
personnel. In this connection, the board of directors of the Company (the
"Board") recognizes that, as is the case with many publicly held corporations,
the possibility of a Change in Control of the Company may exist and that such
possibility, and the uncertainty and questions which it may raise among
management, may result in the departure or distraction of certain key management
personnel, including the Director, to the detriment of the Company and its
shareholders.

        1.2 The Board has determined that to reinforce and encourage the
Director's continued attention and dedication to his duties without distraction
in the face of potentially disturbing circumstances arising from the possibility
of a Change in Control of the Company, the Company desires to enter into this
Agreement with the Director.

                                       II
                                    AGREEMENT

        2.1 Termination Following a Change in Control. After a Change in Control
of the Company and the occurrence of a Termination Event, the Director shall be
entitled to Termination Benefits (as defined in Section 2.4) during the term of
this Agreement, all as provided in this Agreement.

        2.2 Definition of "Change in Control". A "Change in Control" of the
Company shall be deemed to have occurred upon the occurrence of any one or more
of the following events:

        (a) any "person" (as such term is used in Sections 13(d) and 14(d) of
the Securities Exchange Act of 1934, as amended (the "Exchange Act")), other
than the Director or a trustee or other fiduciary holding securities under an
employee benefit plan of the Company, hereafter becomes the "beneficial owner"
(as defined in Rule 13d-3 under the Exchange Act), directly or indirectly, of
securities of the Company representing 30% or more of the combined voting power
of the Company's then outstanding securities;

        (b) during any period (other than any period prior to the execution of
this Agreement), individuals who at the beginning of such period constitute the
Board and any new directors (other than directors designated by a person who has
entered into an agreement with the Company to effect a transaction described in
paragraph (a) or (c) of this Section 2.2) whose election by the Board or
nomination for election by the Company's shareholders was approved by a vote of
at least a majority of the directors then still in office who either were
directors at the beginning of the period or whose election or nomination for
election was previously so approved, cease for any reason to constitute a
majority thereof; or

        (c) the shareholders of the Company approve a merger or consolidation of
the Company with any other corporation, other than a merger or consolidation
which would result in the voting securities of the Company outstanding
immediately prior thereto continuing to represent (either by remaining
outstanding or by being converted into voting securities of the surviving
entity) at least 51% of the combined voting power of the voting securities of
the Company or such surviving entity outstanding immediately after such merger
or consolidation; or

        (d) the shareholders of the Company approve a plan of complete
liquidation of the Company or an agreement for the sale or disposition by the
Company of all or substantially all of the Company's assets.


                                      -1-

<PAGE>   2

        2.3 Definition of "Termination Event". A Termination Event shall be
deemed to have occurred upon the failure to re-elect the Director or the failure
of the Board to nominate the Director for re-election at a meeting of
stockholders (whether at a held meeting or by written consent) after a Change in
Control.

        2.4 Definition of "Termination Benefits"; Payment of Termination
Benefits. The term Termination Benefits" shall mean the payment in six (6) equal
monthly installments commencing thirty (30) days after a Termination Event of
all prior unpaid or deferred salary due Director, which the parties acknowledge
to be the amount of $227,250 as of the date hereof;

        2.5 Termination in the Absence of a Change in Control. The Director
hereby acknowledges and agrees that the rights and benefits provided under this
Agreement shall be triggered to benefit the Director only after a Change in
Control of the Company and the occurrence of a Termination Event and shall not
be triggered to benefit the Director in the absence of a Change in Control of
the Company. This Agreement has been entered into solely to address the
legitimate concerns of the Company arising as the result of a possible Change in
Control of the Company, all as summarized in the Recitals to this Agreement. The
provisions of this Agreement are not intended to and do not purport to provide
any assurances or rights to the Director's continued employment with the
Company.

        2.6 Term of Agreement. This Agreement shall commence on the date hereof
and shall continue in effect through May 21, 2000 provided, however, that
commencing on May 22, 2000, and each May 22 thereafter, the term of this
Agreement shall automatically be extended for one additional year unless, not
later than December 31 of the preceding year, the Company shall have given
notice that it does not wish to extend this Agreement. If a Change in Control of
the Company shall have occurred during the original or extended term of this
Agreement, this Agreement shall continue in effect for a period of 24 months
beyond the month in which such Change in Control of the Company occurred.

                                       III
                               STANDARD PROVISIONS

        3.1 Successors; Binding Agreement.

        (a) The Company will require any successor (whether direct or indirect,
by purchase, merger, consolidation or otherwise) to all or substantially all of
the business and/or assets of the Company to expressly assume and agree to
perform this Agreement in the same manner and to the same extent that the
Company would be required to perform it if no such succession had taken place.
Failure of the Company to obtain such assumption and agreement prior to the
effectiveness of any such succession shall be a breach of this Agreement and
shall entitle the Director to Termination Benefits from the Company as provided
in this Agreement, except that, for purposes of implementing the foregoing, the
date on which any such succession becomes effective shall be deemed the date of
termination for purposes of this Agreement. As used in this Agreement, "Company"
shall mean the Company as hereinbefore defined and any successor to its business
and/or assets as aforesaid which assumes and agrees to perform this Agreement,
by operation of law or otherwise.

        (b) This Agreement shall inure to the benefit of and be enforceable by
the Director's personal or legal representatives, executors, administrators,
successors, heirs, distributees, devises and legatees. In the event the Director
should die while any amount would still be payable to him hereunder if the
Director had continued to live, all such amounts, unless otherwise provided
herein, shall be paid in accordance with the terms of this Agreement to the
Director's devisee, legatee or other designee or, if there is no such designee,
to the Director's estate.

        3.2 Notice. For the purpose of this Agreement, notices and all other
communications provided for in this Agreement shall be in writing and shall be
deemed to have been duly given when delivered personally or mailed by United
States, registered or certified mail, return receipt requested, postage prepaid,
addressed to the respective parties as provided in this Section 6.3; provided
that all notice to the Company shall be directed to the attention of the Board
with a copy to the Secretary of the Company, or to such other addresses as
either party may have furnished to the other in writing in accordance herewith,
except that notice of change of address shall be effective only upon receipt.


                                      -2-

<PAGE>   3

      COMPANY:             AMDL, Inc.                                
                           14272 Franklin Avenue, Suite 106          
                           Tustin, California 92780-7039             
                           Attention:  That T. Ngo, Ph.D., President 
                                                                     
      EMPLOYEE:            William M. Thompson, M.D.                 
                           16342 Niantic Circle                      
                           Huntington Beach, CA  92649               

        3.3 Modifications, Waivers or Discharge of Agreement. No provision of
this Agreement may be modified, waived or discharged unless such waiver,
modification or discharge is agreed to in writing and signed by the Director and
such officer as may be specifically designated by the Board. No waiver by either
party hereto at any time of any breach by the other party hereto of, or
compliance with, any condition or provision of this Agreement to be performed by
such other party shall be deemed a waiver of similar or dissimilar provisions or
conditions at the same or at any prior or subsequent time. No agreements or
representations, oral or otherwise, express or implied, with respect to the
subject matter hereof have been made by either party which are not expressly set
forth in this Agreement. The validity, interpretation, construction and
performance of this Agreement shall be governed by the laws of the State of
California. All references to sections of the Exchange Act or the Code shall be
deemed also to refer to any successor provisions to such sections. Any payments
provided for hereunder shall be paid net of any applicable withholding required
under federal, state or local law. The obligations of the Company under this
Agreement shall survive the expiration of the term of this Agreement.

        3.4 Validity. The invalidity or unenforceability or any provision of
this Agreement shall not affect the validity or enforceability of any other
provision of this Agreement, which shall remain in full force and effect.

        3.5 Attorneys Fees. In the event it becomes necessary to commence any
proceeding or action to enforce the provision of this Salary Continuation
Agreement, the court before whom the same shall be tried, may award to the
prevailing party all costs and expenses thereof, including but not limited to,
reasonable attorneys' fees, the usual, customary and lawfully recoverable court
costs and all other expenses in connection therewith.

        3.6 Counterparts. This Agreement may be executed in several
counterparts, each of which shall be deemed to be an original but all of which
together will constitute one and the same instrument.

        IN WITNESS WHEREOF, this Salary Continuation Agreement shall be
effective as of and on the date first written above.

                                            COMPANY:

                                            AMDL, INC., A DELAWARE CORPORATION


                                            By:   /s/ THAT T. NGO, PH.D.
                                                  ------------------------------
                                            Name:  That T. Ngo, Ph.D.
                                            Title: President

                                            EMPLOYEE:


                                            By:  /s/ WILLIAM M. THOMPSON, M.D.
                                            ------------------------------------
                                                     William M. Thompson, M.D.


                                      -3-