<PAGE>
 
                                                              EXHIBIT 10(r)(xvi)


                            AMENDMENT NUMBER FOUR TO
                          LOAN AND SECURITY AGREEMENT
                                   QMS, INC.

   This AMENDMENT NUMBER FOUR TO LOAN AND SECURITY AGREEMENT (this "Amendment")
is entered into as of January 22, 1997, by and between Foothill Capital
Corporation, a California corporation ("Foothill"), on the one hand, and QMS,
Inc., a Delaware corporation ("Borrower"), with reference to the following
facts:

A. Foothill and Borrower heretofore have entered into that certain Loan and
   Security Agreement, dated as of November 7, 1995 as amended by that certain
   Amendment Number One to Loan and Security Agreement, dated as of December 4,
   1995, as further amended by that certain Amendment Number Two to Loan and
   Security Agreement, dated as of February 7, 1996, and as further amended by
   that certain Amendment Number Three to Loan and Security Agreement, dated as
   of July 31, 1996 (as so amended and otherwise modified from time to time, the
   "Agreement");

B. Borrower has requested Foothill to amend the Agreement to extend the Term
   Loan B Funding Window to expire on March 1, 1997;

C. Foothill is willing to so amend the Agreement in accordance with the terms
   and conditions hereof; and

D. All capitalized terms used herein and not defined herein shall have the
   meanings ascribed to them in the Agreement, as amended hereby.

   NOW, THEREFORE, in consideration of the above recitals and the mutual
premises contained herein, Foothill and Borrower agree as follows:

1. Amendment to the Agreement.
   -------------------------- 

      a. The definition of "Term Loan B Funding Window" contained in Section 1.1
of the Agreement hereby is deleted in its entirety and the following hereby is
substituted in lieu thereof:

      "Term Loan B Funding Window" means the period commencing on the Closing
       --------------------------                                            
Date and ending on March 1, 1997 (which end date Foothill in its sole discretion
may (but shall not be obligated to) extend upon Borrower's written request for
such extension.

   2. Representations and Warranties.  Borrower hereby represents and warrants
      ------------------------------                                          
to Foothill that (a) the execution, delivery, and performance of this Amendment
and of the Agreement, as amended by this Amendment, are within its corporate
powers, have been duly authorized by all necessary corporate action, and are not
in contravention of any law, rule, or regulation, or any order, judgment,
decree, writ, injunction, or award of any arbitrator, court, or governmental
authority, or of the terms of its charter or bylaws, or of any contract or
undertaking to which it is a party or by which any of its properties may be
bound or affected, and (b) this Amendment and the Agreement, as amended by this
Amendment, constitute Borrower's legal, valid, and binding obligation,
enforceable against Borrower in accordance with its terms.

   3. Conditions Precedent to Amendment.  The satisfaction of each of the
      ---------------------------------                                  
following on or before, unless otherwise specified below, shall constitute
conditions precedent to the effectiveness of this Amendment:

      a. Foothill shall have received the reaffirmation and consent of the
Guarantors attached hereto as Exhibit A, duly executed and delivered by the
                              ---------                                    
respective authorized officials thereof;

      b. Foothill shall have received a certificate from the Secretary of
Borrower attesting to the incumbency and signatures of authorized officers of
Borrower and to the resolutions of Borrower's Board of Directors authorizing its
<PAGE>
 
execution and delivery of this Amendment and the performance of this Amendment
and the Agreement as amended by this Amendment, and authorizing specific
officers of Borrower to execute and deliver the same;


      c. Foothill shall have received a certificate from the Secretary of each
Guarantor attesting to the incumbency and signatures of authorized officers of
the Guarantor and to the resolutions of the Guarantor's Board of Directors
authorizing its execution and delivery of the reaffirmation and consent of that
Guarantor attached hereto as Exhibit A, and authorizing specific officers of
                             ---------                                      
that Guarantor to execute and deliver the same;

      d. Foothill shall have received all required consents of Foothill's
participants in the Obligations to Foothill's execution, delivery, and
performance of this Amendment;

      e. The representations and warranties in this Amendment, the Agreement as
amended by this Amendment, and the other Loan Documents shall be true and
correct in all respects on and as of the date hereof, as though made on such
date (except to the extent that such representations and warranties relate
solely to an earlier date);

      f. No Event of Default or event which with the giving of notice or passage
of time would constitute an Event of Default shall have occurred and be
continuing on the date hereof, nor shall result from the consummation of the
transactions contemplated herein;

      g. No injunction, writ, restraining order, or other order of any nature
prohibiting, directly or indirectly, the consummation of the transactions
contemplated herein shall have been issued and remain in force by any
governmental authority against Borrower, Foothill, or any of their Affiliates;

      h. The Collateral shall not have declined materially in value from the
values set forth in the most recent appraisals of field examinations previously
done by Foothill;

      i. All other documents and legal matters in connections with the
transactions contemplated by this Amendment shall have been delivered or
executed or recorded and shall be in form and substance satisfactory to Foothill
and its counsel.

   4. Effect on Agreement.  The Agreement, as amended hereby, shall be and
      -------------------                                                 
remain in full force and effect in accordance with its respective terms and
hereby is ratified and confirmed in all respects.  The execution, delivery, and
performance of this Amendment shall not operate as a waiver of or, except as
expressly set forth herein, as an amendment, of any right, power, or remedy of
Foothill under the Agreement, as in effect prior to the date hereof.

   5. Further Assurances.  Borrower shall, and shall cause Guarantor to, execute
      ------------------                                                        
and deliver all agreements, documents, and instruments, in form and substance
satisfactory to Foothill, and take all actions as Foothill may reasonably
request from time to time, to perfect and maintain the perfection and priority
of Foothill's security interests in the Collateral, the collateral in which
Guarantor has granted or is required to grant security interest in favor of
Foothill, and the Real Property, and to fully consummate the transactions
contemplated under this Amendment and the Agreement, as amended by this
Amendment.

   6. Miscellaneous.
      ------------- 

      a. Upon the effectiveness of this Amendment, each reference in the
Agreement to "this Agreement", "hereunder", "herein", "hereof" or words of like
import referring to the Agreement shall mean and refer to the Agreement as
amended by this Amendment.

      b. Upon the effectiveness of this Amendment, each reference in the Loan
Documents of the "Loan Agreement", "thereunder", "therein", "thereof" or words
of like import referring to the Agreement shall mean and refer to the Agreement
as amended by this Amendment.

                                       2
<PAGE>
 
      c. This Amendment may be executed in any number of counterparts, all of
which taken together shall constitute one and the same instrument and any of the
parties hereto may execute this Amendment by signing any such counterpart.

   IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be duly
executed as of the date first written above.

 
                                         FOOTHILL CAPITAL CORPORATION
                                         a California corporation

                                         By:  /s/ Lisa M. Gonzales
                                            --------------------------------
                                             Lisa M. Gonzales
                                         Title:  Assistant Vice President

                                         QMS, INC.,
                                         a Delaware Corporation

                                         By:  /s/ R. A. Wiggins
                                            --------------------------------
                                            Richard Wiggins
                                         Title:  Vice President & Controller


                                   EXHIBIT A
                                   ---------

                           Reaffirmation and Consent

      All capitalized terms used herein but not otherwise defined herein shall
have the meanings ascribed to them in that certain Amendment Number Four to Loan
and Security Agreement, dated as of January 22, 1997 (the "Amendment").  Each of
the undersigned hereby (a) represents and warrants to Foothill that the
execution, delivery, and performance of this Reaffirmation and Consent are
within its corporate powers, have been duly authorized by all necessary
corporate action, and are not in contravention of any law, rule, or regulation,
or any order, judgment, decree, writ, injunction, or award of any arbitrator,
court, or governmental authority, or of the terms of its charter or bylaws, or
of any contract or undertaking to which it is a party or by which any of its
properties may be bound or affected; (b) consents to the amendment of the
Agreement by the Amendment; (c) acknowledges and reaffirms its obligations owing
to Foothill under its Guaranty and each of the other loan Documents to which it
is a party; and (d) agrees that each of the Guaranty and the other Loan
Documents to which it is a party is and shall remain in full force and effect.
Although each of the undersigned has been informed of the matters set forth
herein and has acknowledged and agreed to same, it understands that Foothill has
no obligation to inform it of such matters in the future or to seek its
acknowledgment or agreement to future amendments, and nothing herein shall
create such a duty.

                                    QMS CIRCUITS, INC., a Delaware Corporation

                                    By:  /s/ R. A. Wiggins
                                       --------------------------------
                                         Richard Wiggins
                                    Title:  Secretary and Treasurer

                                    QMS CANADA, INC., a corporation incorporated
                                    under the laws of Canada

                                    By:  /s/ R. A. Wiggins
                                       --------------------------------  
                                         Richard Wiggins
                                         Title: Secretary and Treasurer

                                       3