<PAGE>   1

                                                                    EXHIBIT 10.4

SECOND AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT

         THIS SECOND AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT (this
"Amendment"), dated as of March 12, 1998, is by and among Genicom Corporation
(the "Borrower"), the subsidiaries of the Borrower identified on the signature
pages hereto (the "Guarantors"), the several lenders identified on the
signature pages hereto (each a "Lender" and, collectively, the "Lenders") and
NationsBank of Texas, N.A., as agent for the Lenders (in such capacity, the
"Agent").  Capitalized terms used herein which are not defined herein and which
are defined in the Credit Agreement shall have the same meanings as therein
defined.

                              W I T N E S S E T H

         WHEREAS, the Borrower, the Guarantors, the Lenders and the Agent
entered into that certain Amended and Restated Credit Agreement dated as of
September 5, 1997, as amended by that First Amendment to Amended and Restated
Credit Agreement dated October 31, 1997, (the "Existing Credit Agreement").

         WHEREAS, the parties have agreed to amend the Existing Credit
Agreement as set forth herein.

         NOW, THEREFORE, in consideration of the agreements hereinafter set
forth, and for other good and valuable consideration, the receipt and adequacy
of which are hereby acknowledged, the parties hereto agree as follows:


                                     PART I
                                  DEFINITIONS

         SUBPART I.1 Certain Definitions. Unless otherwise defined herein or
the context otherwise requires, the following terms used in this Amendment,
including its preamble and recitals, have the following meanings:

                  "Amended Credit Agreement" means the Existing Credit
         Agreement as amended hereby.

                  "Amendment No. 2 Effective Date" is defined in Subpart III.1.

         SUBPART I.2 Other Definitions. Unless otherwise defined herein or the
context otherwise requires, terms used in this Amendment, including its
preamble and recitals, have the meanings provided in the Amended Credit
Agreement.
<PAGE>   2
                                    PART II
                    AMENDMENTS TO EXISTING CREDIT AGREEMENT

         Effective on (and subject to the occurrence of) the Amendment No. 2
Effective Date, the Existing Credit Agreement is hereby amended in accordance
with this Part II. Except as so amended, the Existing Credit Agreement and all
other Credit Documents shall continue in full force and effect.

         SUBPART II.1 Amendments to Section 1.1.

                  (a) The definition of Consolidated Net Income contained in
         Section 1.1 of the Existing Credit Agreement is amended in its
         entirety to read as follows:

                  "Consolidated Net Income" means, for any period, net income
         (excluding extraordinary items) after taxes for such period of the
         Borrower and its Subsidiaries on a consolidated basis, as determined
         in accordance with GAAP; provided, however, that for purposes of
         calculating the financial covenants contained in Section 7.11,
         Consolidated Net Income shall be calculated to exclude up to
         $1,739,000 in non-cash charges incurred during the fourth fiscal
         quarter of 1997 in connection with the acquisition of certain assets
         of the printer division of Digital Equipment Corporation.

                  (b) The definition of Consolidated Net Worth contained in
         Section 1.1 of the Existing Credit Agreement is amended in its
         entirety to read as follows:

                  "Consolidated Net Worth" means, at any time, total
         shareholders' equity of the Borrower and its Subsidiaries on a
         consolidated basis at such time, as determined in accordance with GAAP
         (but excluding in any event foreign currency translation adjustments);
         provided, however, that for the purpose of determining compliance with
         the financial covenants contained in Sections 7.11(a) and 7.11(d),
         Consolidated Net Worth shall be adjusted upward to reflect up to
         $1,739,000 in non-cash charges incurred during the fourth fiscal
         quarter of 1997 in connection with the acquisition of certain assets
         of the printer division of Digital Equipment Corporation.

         SUBPART II.2 New Section 7.16. A new Section 7.16 is hereby added to
the Existing Credit Agreement which reads as follows:

                  7.16     YEAR 2000 COMPATIBILITY.

                           The Borrower will and will cause each of its
                  Subsidiaries to take all action necessary to assure that its
                  computer based systems are able to operate and effectively
                  process data including dates on and after January 1, 2000,
                  and at the reasonable request of the Agent or the Required
                  Lenders provide evidence to the Lenders of such year 2000
                  compatibility.

                                    PART III
<PAGE>   3

                          CONDITIONS TO EFFECTIVENESS

         SUBPART III.1     Amendment No. 2 Effective Date.  This Amendment
shall be and become effective as of the date hereof (the "Amendment No. 2
Effective Date") when all of the conditions set forth in this Subpart 3.1 shall
have been satisfied, and thereafter this Amendment shall be known, and may be
referred to, as "Amendment No. 2."

                  SUBPART III.1.1 Execution of Counterparts of Amendment. The
         Agent shall have received counterparts (or other evidence of
         execution, including telephonic message, satisfactory to the Agent) of
         this Amendment, which collectively shall have been duly executed on
         behalf of each of the Borrower, the Guarantors and the Required
         Lenders.

                  SUBPART III.1.2 Material Adverse Change. Except as otherwise
         previously disclosed in writing to the Lenders, no material adverse
         change shall have occurred since December 29, 1996 in the condition
         (financial or otherwise), business or management of the Borrower or of
         the Borrower and its Subsidiaries taken as a whole.

                  SUBPART III.1.3 Other Items. The Agent shall have received
         such other documents, agreements or information which may be
         reasonably requested by the Agent.

                                    PART IV
                                 MISCELLANEOUS

         SUBPART IV.1 Representations and Warranties. Borrower hereby
represents and warrants to the Agent and the Lenders that, after giving effect
to this Amendment, (a) no Default or Event of Default exists under the Credit
Agreement or any of the other Credit Documents and (b) the representations and
warranties set forth in Section 6 of the Existing Credit Agreement are, subject
to the limitations set forth therein, true and correct in all material respects
as of the date hereof (except for those which expressly relate to an earlier
date).

         SUBPART IV.2 Cross-References. References in this Amendment to any
Part or Subpart are, unless otherwise specified, to such Part or Subpart of
this Amendment.

         SUBPART IV.3 Instrument Pursuant to Existing Credit Agreement. This
Amendment is a Credit Document executed pursuant to the Existing Credit
Agreement and shall (unless otherwise expressly indicated therein) be
construed, administered and applied in accordance with the terms and provisions
of the Existing Credit Agreement.

         SUBPART IV.4 References in Other Credit Documents. At such time as
this Amendment No. 2 shall become effective pursuant to the terms of Subpart
3.1, all references in the Credit Documents to the "Credit Agreement" shall be
deemed to refer to the Credit Agreement as amended by this Amendment No. 2.
<PAGE>   4

         SUBPART IV.5 Counterparts. This Amendment may be executed by the
parties hereto in several counterparts, each of which shall be deemed to be an
original and all of which shall constitute together but one and the same
agreement.

         SUBPART IV.6 Governing Law. THIS AMENDMENT SHALL BE DEEMED TO BE A
CONTRACT MADE UNDER AND GOVERNED BY THE INTERNAL LAWS OF THE COMMONWEALTH OF
VIRGINIA WITHOUT GIVING EFFECT TO THE CONFLICT OF LAW PRINCIPLES THEREOF.

         SUBPART IV.7 Successors and Assigns. This Amendment shall be binding
upon and inure to the benefit of the parties hereto and their respective
successors and assigns.



        [The remainder of this page has been left blank intentionally]

<PAGE>   5

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

                           BORROWER:
                           --------

                           GENICOM CORPORATION


                           By James C. Gale
                           Title: Senior Vice President and CFO


                           GUARANTORS:
                           ----------

                           GENICOM INTERNATIONAL HOLDINGS
                           CORPORATION


                           By \s\James C. Gale
                           Title: Senior Vice President and CFO


                           GENICOM INTERNATIONAL SALES
                           CORPORATION


                           By \s\James C. Gale
                           Title: Senior Vice President and CFO


                           DELMARVA TECHNOLOGIES CORPORATION


                           By \s\James C. Gale
                           Title: Senior Vice President and CFO


                           RASTEK CORPORATION


                           By \s\James C. Gale
                           Title: Senior Vice President and CFO

                           [Signatures Continued]
<PAGE>   6

                           ENTERPRISING SERVICE SOLUTIONS CORPORATION


                           By \s\James C. Gale
                           Title: Senior Vice President and CFO


                           PRINTER SYSTEMS CORPORATION


                           By \s\ James C. Gale
                           Title: Senior Vice President and CFO



                           THE PRINTER CONNECTION, INC.


                           By \s\James C. Gale
                           Title: Senior Vice President and CFO



                           PRINTER SYSTEMS INTERNATIONAL, LTD.


                           By \s\James C. Gale
                           Title: Senior Vice President and CFO




                           [Signatures Continued]

<PAGE>   7

                           LENDERS:
                           -------


                           NATIONSBANK OF TEXAS, N.A.


                           By \s\Sharon Ellis
                           Title: Senior Vice President


                           CREDITANSTALT-BANKVEREIN


                           By \s\ Christina T. Schoen
                           Title: Senior Vice President


                           By \s\ Maura K. Conner
                           Title: Senior Associate


                           DEEPROCK & COMPANY
                           By: Eaton Vance Management,
                                as Investment Advisor

                           By \s\ Payson F. Swaffield
                           Title: Vice President


                           CRESTAR BANK


                           By \s\Nancy R. Petrash
                           Title: Senior Vice President


                           THE RIGGS NATIONAL BANK OF WASHINGTON, D.C.


                           By \s\Jeffrey P. White
                           Title: Vice President

                           [Signatures Continued]
<PAGE>   8

                           FLOATING RATE PORTFOLIO

                           By:  Chancellor LGT Senior Secured
                                 Management, Inc., as attorney-in-fact

                           By
                             -------------------------------------------
                           Title:

                           KZH HOLDING CORPORATION III

                           By
                             -------------------------------------------
                           Title:

                           MORGAN STANLEY SENIOR FUNDING, INC.

                           By
                             -------------------------------------------
                           Title:


                           SENIOR DEBT PORTFOLIO
                           By: Boston Management and Research,
                                as Investment Advisor


                           By \s\Payson F. Swaffield
                           Title: Vice President


                           CERES FINANCE LTD.

                           By \s\J.H. Culliare
                           Title: Director

                           AERIES FINANCE LTD.

                           By
                             -------------------------------------------
                           Title:


                           [Signatures Continued]

<PAGE>   9

                           BANK OF SCOTLAND

                           By \s\Annie Chin Tat
                           Title: Vice President

                           NATIONAL CITY BANK OF KENTUCKY

                           By \s\Glen E. Nord
                           Title: Vice President

                           AGENT:

                           NATIONSBANK OF TEXAS, N.A.,
                           as Agent

                           By \s\Sharon Ellis
                           Title: Senior Vice President