Abstract:
A read/writable memory formed in the same semiconductor chip as a microprocessor is employed in testing a plurality of hardware interrupt service routines initiated by corresponding devices (and components of devices) during a power-on, self-test(POST) of a computer system. The POST is set in the read-only memory(ROM) of the computer system. The read/writable memory, which is ordinarily inoperative during the POST, is used for storing a diagnostic interrupt vector table, which has a list of interrupt numbers and corresponding addresses of the respective interrupt routines. This table is normally subject to change because each device and each of its components have different interrupt service routines, requiring different addresses for the same interrupt number. The random access memory(RAM) has not yet been tested in the POST, and is not regarded as reliable for the hardware interrupt testing and therefore the read/writable memory is used for such testing.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to the utilization of read/writable memory located in a semiconductor chip with a microprocessor which can be read from and written to prior to the completion of a computer system&#39;s power-on, self-test program(POST). More particularly, it relates to the use of the read/writable memory for hardware interrupt routine testing. 
     2. Description of the Related Art 
     When a computer system is turned on, it typically implements a POST program to verify the functionality of its components. Conventionally, it has been assumed that prior to the verification of a computer system&#39;s main random access memory(RAM), no reliable read/writable memory is available to the system other than a component microprocessor&#39;s few internal registers. As a result of the perceived lack of reliable read/writable memory, hardware interrupt routines have been difficult to test. 
     When a failure occurs in the testing of hardware interrupt routines (or any other POST testing), the POST should identify as precisely as possible which component has failed. Precise component failure identification is beneficial because it results in more cost-effective effective and efficient repairs. Illustratively, when using the POST, a failure often can only be isolated to several suspect components. To repair this failure requires either 1) replacing all the suspect components; or 2) conducting additional testing to determine which of the suspect components is faulty and replacing it. The amount of additional testing and/or replacement of components required is dependent upon the number of suspect components. Consequently, more precise tests result in fewer suspect components and more cost-effective and efficient repairs. 
     To accomplish precise fault identification, the POST should ideally be performed in a &#34;crawl out&#34; sequence, that is, a component must first be tested before it is used to test other components. This methodology yields a chronological hierarchy of testing, starting with the most fundamental components and building through more complex ad dependent ones. A consequence of the &#34;crawl out&#34; sequence is the necessary assumption that the bare minimum components needed to implement the POST, which is stored in read-only memory(ROM), are functional. These components include the microprocessor, the ROM, and the components necessary for the microprocessor to read the ROM. 
     Reliable read/writable memory is memory whose functionality has been verified pursuant to the &#34;crawl out&#34; sequence. The major and often the only source of read/writable memory available to a computer system is the main RAM. A problem arises in that the main RAM is dependent on many other components, and therefor should be tested late in the &#34;crawl out&#34; sequence. Because the main RAM must be regarded as unreliable until tested, no read/writable memory has been though to be reliable prior to the verification of the main RAM except for the microprocessor&#39;s few internal registers. 
     This lack of reliable read/writable memory has made testing of hardware interrupt routines difficult. Hardware interrupts are the communication pathways between the microprocessor and different hardware devices and components thereof. In a typical personal computer (PC) architecture which may utilize, for example, an Am386 microprocessor, interrupts are handled in the following fashion. A device connects to a chained pair of programmable interrupt controllers(PIC) via one of fifteen interrupt request lines(IRQs). When a device needs servicing, it initiates an interrupt by sending a signal on the appropriate IRQ line. The signal is received by the PIC and converted into an eight bit interrupt number which identifies the IRQ line. The PIC, in turn, is connected to the microprocessor and sends it the eight bit interrupt number. Upon receipt of the interrupt number, the microprocessor 1) stores the information necessary to return to the job from which it is interrupted and 2) converts the interrupt number into an interrupt vector table address for that particular device. The vector table address specifies a location in an interrupt vector table where a physical, interrupt handler address may be found. The interrupt vector table may be located in either the system ROM or RAM, but as described below, RAM is ordinarily preferable. 
     The computer program located at the physical handler address is the interrupt service routine which is used to service an interrupt. In this manner, the microprocessor has used the interrupt vector table to translate an interrupt number into the physical address of an interrupt service routine. 
     Many devices are capable of generating a number of different types of interrupts on the same IRQ line. In a diagnostic environment each type of interrupt will require its own interrupt service routine and therefore its own interrupt vector. The result is that the interrupt vector table changes for each different type of interrupt. The interrupt vector table is therefore ordinarily set in RAM where such changes may be readily made. The microprocessor then implements whichever interrupt service routine is located at the physical address it reads from the interrupt vector table. The interrupt service routine services the interrupt and, upon completion, the microprocessor reloads the job information and returns to processing the interrupted job. 
     In testing the interrupts during POST, a problem arises in that the interrupt vector table may be very large to accommodate the multiplicity of different types of interrupts. The table needs frequent updating and modification. However, as indicated earlier, main RAM cannot be tested early in the POST and therefore cannot be regarded as reliable at that point in POST when interrupt testing is to be done. One non-optimal solution to the problem is to reproduce in ROM all of the different permutations of the interrupt vector tables required by the multiplicity of different types of interrupts. This is an extremely space inefficient solution that could require a large amount of valuable ROM space. Consequently, to perform a proper &#34;crawl out&#34; sequence, testing of the hardware interrupts should be completed before that of the main RAM. As a result, it has been conventionally assumed that no reliable read/writable memory was available to store the interrupt vector table for hardware interrupt testing. Therefore, hardware interrupt testing was not implemented without either relying on the untested main RAM, or using large amounts of ROM to store the interrupt vector table. The technique of using the untested main RAM is unsatisfactory because, if a fault is indicated, it is not discernable as to whether the fault is in the RAM or in the interrupt hardware. The technique of using ROM for storing the interrupt vector table yields a more precise fault identification. However, ROM is not readily modifiable and therefore large amounts of ROM must be used to store the multiple interrupt vector tables required to service multiple component devices. 
     SUMMARY OF THE INVENTION 
     This invention overcomes the lack of available RAM prior to the completion of the POST through the novel use of the read/writable memory, that is ordinarily not used until after completion of the POST, for storing the interrupt vector table (among other possible uses). The read/writable memory then provides an alterable table for hardware interrupt testing. 
     The principle object of this invention is to use the read/writable memory prior to completion of the POST for testing hardware interrupt routines. 
     This and other objects will be made evident in the detailed description that follows. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a microprocessor and its associated memory. 
     FIG. 2 is a block diagram of the hardware interrupt communications pathways. 
     FIG. 3 is a block diagram of the ROM diagnostic interrupt vector table and the master handler. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     In this preferred embodiment, an Am386 microprocessor is described, but is representative of other microprocessors as well. 
     FIG. 1 shows microprocessor 10 with internal registers 12 and page mode translation look-aside buffer(TLB) 30. TLB 30 is the pertinent read/writable memory of this invention. Connected to microprocessor 10 via the host bus 16 are bus controller 18 and memory controller 22. ROM 20 connects through bus controller 18 and main RAM connects through memory controller 22. 
     TLB 30 is cache memory which is ordinarily used as a buffer for quick translation of paging operations (cache memory is a type of RAM and is read/writable). This use is available after conclusion of the POST. TLB 30 is organized as a 4-way set associative 32-entry page table cache. TLB 30 has 20 bit linear addresses indexed to corresponding 20 bit physical addresses. Although TLB 30 cannot be accessed during normal operations, it can be accessed for testing purposes during the POST. The novelty in this invention lies in the accessing of TLB 30 during POST for purposes other than its own testing. In this preferred embodiment, TLB 30 is loaded with interrupt vectors, i.e., addresses of interrupt routines during POST. 
     FIG. 2 illustrates microprocessor 10 having interrupt descriptor table register(IDTR) 14 which is used for storing an address for pointing to the interrupt vector table in normal operation, and to the diagnostic interrupt vector table 50 (see FIG. 3) in ROM during interrupt routine testing. 
     Device 42 is shown having functional subcomponents 43-45, each of which may require its own different interrupt routine. Device 42 is shown connected to PIC 32 by way of IRQ line 40. Pic 32 has an output connecting it to microprocessor 10 for transmission of the eight bit interrupt numbers which are converted by microprocessor 10 into vector table addresses. 
     FIG. 3 shows ROM diagnostic interrupt vector table 50 set in ROM, having addresses 52 entered. Table 50 receives vector table addresses, and is connected to master handler 56, set in the POST, which identifies a coded interrupt number. The output of master handler 56 is applied to TLB 30 to select the appropriate physical handler for performing the interrupt. 
     MODE OF OPERATION OF THE INVENTION 
     Referring first to FIG. 2, assume that subcomponent 43 of device 42 is selected for testing. The program that selects subcomponent 43 and initiates an interrupt request is the computer program illustrated in source code in Appendix A. The interrupt signal from subcomponent 43 is sent to PIC 32 over IRQ line 40 (1 of 15 in this preferred embodiment). PIC 32 forms an 8 bit interrupt number representative of the interrupting device--device 42 in this case, but requiring the physical address of the interrupt routine for subcomponent 43 to be appended in the diagnostic interrupt vector table loaded in TLB 30 (FIG. 3). The loading of TLB 30 is done by the program shown in Appendix A and is a preliminary step in the testing of the hardware interrupts. Also, IDTR register 14 is loaded with the address of the ROM diagnostic interrupt vector table 50. 
     Referring again to FIG. 2, microprocessor 10 receives the 8 bit interrupt number from PIC 32 and translates it into the vector table address. That address enables activation of ROM diagnostic interrupt vector table 50 (FIG. 3). In a normal environment, when microprocessor 10 receives the 8 bit interrupt number, it also stores the information on which it was working in its internal registers. Upon completion of the service routine, the information is retrieved. In the absence of RAM in the diagnostic environment, master handler 56 causes the storing of pertinent information relative to that on which microprocessor 10 had been working when the interrupt occurred. This storage is done in arbitrarily selected general purpose register 11 (FIG. 1). Upon the completion of the interrupt service routine, master handler 56 reads the contents of register 11 to continue the diagnostic routine. 
     In FIG. 2, it can be seen that the interrupt vector for device 42 is referenced by microprocessor 10 through its IDTR 14. The interrupt vector is sent to master handler 56. The details of master handler 56, set in ROM, is shown in Appendix A. Through master handler 56, the interrupt vector is recognized and referenced to TLB 30 (FIG. 2). 
     While this invention has been described in specific steps and in specific hardware and software, it is contemplated that those skilled in the art will readily recognize that numerous variations and substitutions may be made to the invention to achieve substantially the same results as achieved in the preferred embodiment. Such variations and substitutions could be to the method steps as well as to the hardware. Therefor, the detailed description is to be clearly understood as being given by way of illustration and example only. The spirit and scope of the present invention is to be limited only by the appended claims. 
     APPENDIX A 
     
                                           APPENDIX A__________________________________________________________________________    IDEAL    INCLUDE          &#34;system.inc&#34;    EXTRN sys.sub.-- init                            : NEAR    EXTRN reg.sub.-- tests                           : NEAR    EXTRN PIC.sub.-- sanity                          : NEAR    EXTRN timer.sub.-- sanity                        : NEAR    EXTRN RTC.sub.-- sanity                          : NEAR    EXTRN RTC.sub.-- vs.sub.-- timer                        : NEAR    EXTRN RTC.sub.-- int                             : NEAR    EXTRN CMOS.sub.-- test                           : NEAR    EXTRN video.sub.-- tests                         : NEAR    EXTRN EMS.sub.-- testsSEGMENT  DIAGS.sub.-- CODE USE16 PUBLIC `CODE`           ASSUME cs:DIAGS.sub.-- CODE,ds:DIAGS.sub.-- CODE; ************************************* driver ********************************************; description:    This is the main test driver for the ELAN emulation    diagtiostics.;               The driver label should be located at DIAGS.sub.-- CODE:0    so that it can;               be jumped to from the reset code.;               the driver is an endless loop calling tests from the    DPOST.sub.-- tbl and;               displaying their result status to port 80h. Execution    terminates only;               when an error condition has been detected.;;              The normal test process is as follows:;        1.      Point to test N in the DPOST.sub.-- tbl.;           Display the test&#39;s port 80h ID for 1s.;           Call test N.;           Disable INTR and restore  DS to GDTD.sub.-- DIAGS.;           Examine test&#39;s status. If undefined it&#39;s an error. Use test;            status to look up a corresponding port 80h code.;           Display port 80h result status and hold for 1s.;           Increment test pointer (N=N+1) and  wrap if end of test      list.;           Go to step 1.;;        The error handling procedure is as follows:;        1.      Display the failure type code (error, spurious interrupt;            or unexpected interrupt) and  hold  1s.;           Display the failure mpdifier code and hold 1s.;          ERROR failure type code:  The modifier will          ;              be the test subsection indicator          (SET.sub.-- ERC #)          ;           UNEXP.sub.-- INT failure type code: The modifier will be          the          ;              unexpected iterrupt #, either software          0-1F, or hardware          ;              20-2F.          ;           SPUR.sub.-- INT failure type code: The modifier will          indicate which          ;              PIC the spurious interrupt arrived at (0          master, 1 slave).;        3.      Display the test ID code and hold for 1s.;           Go to step 1.; sys regs:    dr0  . . . General purpose scratch register.;             . . . Holds system bit flag.;             . . . IRQ bit flags.;             . . . TLB stack pionter.;             . . . Holds test ID code in byte1, failure modifier in         byte0.;                tr6;              . . . Used to access TLB interrupt vectors and TLB stack.;; history:  Created.chieve; ****************************************************************************************    PUBLIC          signature            SIGN.sub.-- LENIC            driver     PUBLICdriver:             al,DIAGS.sub.-- IN.sub.-- 80                     ;DIAGS entry code for port 80h.               80h.alt                             ;Announce that diags has been entered.               over.sub.-- sign                          ;skip signaturesignature          DB                &#34;AMD ELAN&#34;SIGN.sub.-- LEN    = $ - signatureover.sub.-- sign:    mov   eax,dr1       ;get status register              eax,NOT MASK STAT.sub.-- TSTIX                             ;zero test index (AL)              dr1,eax                       ;save status registerDPOST.sub.-- loop:        mov              ah,SIZE proctbl                                     ;# of bytes in proctbl                        structure              ah   mul                            ;AX contains                        offset into DPOST.sub.-- tbl+bx              bx,axmov    mov   cx,[(proctb1 PTR DPOST.sub.-- tbl+bx).proc.sub.-- addr]                              ;get test procedure addr    mov       dl,[(proctb1 PTR DPOST.sub.-- tbl+bx).test.sub.--                                     ;get port 80h ID for cur; Display port 80h code at before the test is called. Wait -1s beforecalling the; test so that user can see ID code.    SET.sub.-- ID          dl            ;signal test entry at last possible    DELAY   DLYSEC                                         ;Wait so                        user can see test code.; Jump to the test.  Use ROM stack to allow NEAR RETs from tests.    mov   sp,OFFSET test.sub.-- retptr                        ;Point to ROM stack.              cx    jmp                                       ;Call                        the test.test.sub.-- retptr:       DW      OFFSET, test.sub.-- ret                                                ;NEAR return addr.test.sub.-- ret:          mov              cx,GDTD.sub.-- DIAGS                                                   ;make sure DS is                        correct. just in case              ds,cxmov                                     ;turkey                        has screwed it up                   cli                        ;same reason as above; Any unrecognized return code must be treated as a failure. Index into atabla of; port 80h status codes in the 6xh range.    mov   bx,ERROR      ;Reuult code in si.    cmp      ax.0                                         ;SUCCESS?    jb        disp.sub.-- res.sub.-- 80h                                                  ;out of bounds                        (-), so ERROR.    cmp      ax,RES80TBL.sub.-- SIZ    ja        disp.sub.-- res.sub.-- 80h                                                  ;out of bounds                        (+), so ERROR    mov      bx.ax                                       ;return                        code is OK.; Display port 80h result code and delay -ls for user to see it.disp.sub.-- res.sub.-- 80h:    mov   bl,[res.sub.-- 80h.sub.-- tbl+bx]                        ;Get port80h result code.               bl,ERROR.sub.-- 80                err.sub.-- proc                                                ;If ERROR let                        err.sub.-- proc handle display               al,blov               80h,alt             DLYSECDELAY               eax,Oov               cr2,eax                ;zero result register               eax.dr1               al  inc                     ;increment test number               al,NUM.sub.-- DPOST.sub.-- TSTS                            ;have we reached the end of the test               save.sub.-- status;                                 ;If not, save test number               eax.drl    mov   al,(DPOST.sub.-- repeat - DPOST.sub.-- tbl) / SIZE          proctbl                ;reset the test number tosave.sub.-- status;    mov   drl.eax       ;save status register               DPOST.sub.-- loop                                                ;the never-ending                        loop; ************************************************************************************************;  If a test failed, we end up here - loop on failure type code, failuremodifier code; and port 80h test ID.; ************************************************************************************************    PUBLIC          err.sub.-- procerr.sub.-- proc:             al,bl                       ;Display failure type                        code.             80h,al out           DLYSEC   DELAY             eax,cr2mov                ;Display failure modifier                        code.             80h,al out           DLYSEC   DELAY             eax,cr2mov                ;Display test ID code.             al,ah  mov             80h,al out           DLYSEC   DELAY             err.sub.-- proc                                      ;Do it al again.; ************************************************************************************************; description:    Software exception handler. INTS 0 - 1Fh. These are treated as    unexpected;                        interrupts indicating catastrophic CPU events.    These generate a call to;                        the driver&#39;s error handler procedure. The    UNEXP.sub.-- INT failure code, the;                        interrupt # and test-in-progress&#39;s ID will be    cyclically displayed to port;                        80h by the error handler.;; history:  Created.chieve; ************************************************************************************************int.sub.-- 0:    mov   bx,0            SW.sub.-- intint.sub.-- 1:            bx,1            Sw.sub.-- intint.sub.-- 2:            bx,2            SW.sub.-- intint.sub.-- 3:            bx,3            SW.sub.-- intint 4:           bx,4            SW.sub.-- intint.sub.-- 5:            bx,5            SW.sub.-- intint.sub.-- 6:            bx,6            SW.sub.-- intint 7:           bx,7            SW.sub.-- intint.sub.-- 8:            bx,8            SW.sub.-- intint.sub.-- 9:            bx,9            SW.sub.-- intint.sub.-- A:            bx,0Ah            SW.sub.-- intint.sub.-- B:            bx,0Bh            SW.sub.-- intint.sub.-- C:            bx,0Ch            SW.sub.-- intint.sub.-- D:            bx,0Dh            SW.sub.-- intint.sub.-- E:            bx,0Eh            SW.sub.-- intsint.sub.-- F:            bx,0Fh            SW.sub.-- intint.sub.-- 10:            bx,10h            SW.sub.-- intint.sub.-- 11:            bx,11h            SW.sub.-- intint.sub.-- 12:            bx,12h            SW.sub.-- intint.sub.-- 13:            bx.13h           SW.sub.-- intint.sub.-- 14:            bx,14h            SW.sub.-- intint.sub.-- 15:            bx,15h            SW.sub.-- intint.sub.-- 16:            bx,16h            SW.sub.-- intint.sub.-- 17:            bx,17h            SW.sub.-- intint.sub.-- 18:            bx,18h            SW.sub.-- intint.sub.-- 19:            bx,19h            SW.sub.-- intint.sub.-- 1A:            bx,1Ah            SW.sub.-- intint.sub.-- 1B:            bx,1Bh            SW.sub.-- intint.sub.-- 1C:            bx,1Ch            SW.sub.-- intint.sub.-- 1D:            bx,1Dh            SW.sub.-- intint.sub.-- 1E:            bx,1Eh            SW.sub.-- intint.sub.-- 1F:            bx,1FhSW.sub.-- int:            al,OFFn            PIC.sub.-- MASTER+1.al                               ;write IMR (PICO) (mask all                        interrupts); Set interrupt number in b0 of CR2.    mov   eax,cr2    mov     al,bl                        ;Unexpected int # in b0 of                        cR2    mov     cr2,eax    mov     bl,UNEXP.sub.-- INT.sub.-- 80                               ;Sets error type to UNEXP.sub.--                        INT.sub.-- 80 (unexpected interrupt)    jmp     err.sub.-- proc; ************************************************************************************************; inputs:    BP - should have been preset to contain the NEAR return address    within;                    a wait loop.;;                   A table of 16 vectors should be established in the    TLB al linear;                   addresses 20xxxh-2Fxxxh. If an interrupt does not    require an ISR;                   (setting the IRQ flag in DR2 is sufficient) then a    vector value of;                   0 should be installed in the TLB vector table.;; description:    Hardware interrupt handler. INTs 20h-2Fh.;; NOTE:  Interrupts are NOT! NOT! NOT! re-enabled at the end of tje ISR.    This must;        be done after returning (jmp bp) to the interrupted routine.;; outputs:    An IRQ flag will be set in DR2 indicating the IRQ that    occurred.;; history:  Created.chieve; ************************************************************************************************    PUBLIC          HWi.sub.-- xint.sub.-- 20:    mov   bx,20h    jmp   HW.sub.-- intint.sub.-- 22:    mov   bx,22h    jmp   HW.sub.-- intint.sub.-- 23:    mov   bx,23h    jmp   HW.sub.-- intint.sub.-- 24:    mov   bx,24h    jmp   HW.sub.-- intint.sub.-- 25:    mov   bx,25h    jmp   HW.sub.-- intint.sub.-- 26:    mov   bx,26h    jmp   HW.sub.-- intint.sub.-- 27:    mov   bx,27h    jmp   HW.sub.-- intint.sub.-- 28:    mov   bx,28h    jmp   HW.sub.-- intint.sub.-- 29:    mov   bx,29h    jmp   HW.sub.-- intint.sub.-- 2A:    mov   bx,2Ah    jmp   HW.sub.-- intint.sub.-- 2B:    mov   bx,2Bh    jmp   HW.sub.-- intint.sub.-- 2C:    mov   bx,2Ch    jmp   HW.sub.-- intint.sub.-- 2D:    mov   bx,2Dh    jmp   HW.sub.-- intint.sub.-- 2E:    mov   bx,2Eh    jmp   HW.sub.-- intint.sub.-- 2F:    mov   bx,2FhHW.sub.-- int:          PUSHTLB          ax          cx     PUSHTLB          dx     PUSHTLB              dx,PIC.sub.-- MASTER             bl,1000b               ;Was the int from master or                        slave PIC?               chk.sub.-- lv1.sub.-- 7                                   ;If master, check for level 7                        interrupt.              dx,PIC.sub.-- SLAVE                                ;Else it was a slave interrupt.chk.sub.-- lvl.sub.-- 7:       mov              al,bl              al,111b                ;Look at interrupt level from                        FIC.              al,7mp                    ;Could it be a level 7                        (spurious).              set.sub.-- IRQ.sub.-- flg                                 ;If not, it&#39;s  a real int.              al,0Bh                  ;OCW3 to enable a read of IS                        bits.              dx,alt                   ;Send OCW3               al,dx                   ;Read IS bits.             al,10000000b                                ;Is level 7 IS bit set?              set.sub.-- IRQ.sub.-- flg                                 ;If so, it&#39;s not spurious.              eax,cr2             bl,1000b               ;Which PIC was the spurious int                        on?            al   setnz                    ;Set failure modifier for                        0 (PIC0) or 1 (PIC1).             cr2,eaxv             bl,SPUR.sub.-- INT.sub.-- 80                                ;Sets error type to SPUR.sub.--                        INT.sub.-- 80 (spurious interr             err.sub.-- procset.sub.-- IRQ.sub.-- flg:      mov    ecx,ebx                   ;Save HW int #             ecx,0Fhd                  ;Get IRQ #             eax,dr2v                  ;Get IRQ flags.             eax,ecxs             dr2,eaxv                 ;Set IRQ active flag.           ecx,bx movzx                ;Zap upper WORD of ebx.             ecx,12hl                  ;Turn INT # into a linear                        address              cl,lor                     ;Set Command bit.             tr6,ecxv                  ;Select linear address for                        TLB lookup.             ecx,tr7v                  ;Read physical address                        (really 2o bits of int ve            cl.10000bt               ;Is PL bit set (was the lookup                        a hit)?             TLB.sub.-- hit                                       ;If so, hit.             ecx,cr2v                  ;Else, we have no vector in                        TLB for this IRQ.            cl,bl  mov                   ;Unexpected HW int # in b0                        of cR2            cr2,ecxmov            bl,UNEXP.sub.-- INT.sub.-- 80                              ;Sets error type to UNEXP.sub.--                        INT.sub.-- 80 (unexpected int            err.sub.-- proc                                     ;If no vector then haul ass  to                        error handler.TLB.sub.-- hit:          shr            ecx,12                      ;Get INT vector.            HWi.sub.-- vect                                      ;If non-NULL jwnp to it.             al,20hov           PIC.sub.-- MASTER,al           PIC.sub.-- SLAVE,al                                   ;EOIs.           HWi.sub.-- x                   ;Bail.HWi.sub.-- vect:         jmp            cz                              ;Jump to the ISR.HWi.sub.-- x:          dxPOPTLB          cx      POPTLB          az      POPTLB            sp,6  add                   ;Restore SP.            bp    jmp                       ;Return address in bp; ************************************************************************************************; Port 80h result translation table. Maps test return codes to port 80hresult codes.; ************************************************************************************************res.sub.-- 80h.sub.-- tbl    DB      SUCCESS.sub.-- 80             NA.sub.-- 80             WRN.sub.-- 80             ERROR.sub.-- 80RES80TBL.sub.-- SIZ        =  $ -res.sub.-- 80h.sub.-- tbl; -----------------------------------------------------------------------------------------------------------------------; DPOST (Diagnostic POST) procedure table.;;              TEST               PORT 80h ID; -----------------------------------------------------------------------------------------------------------------------    ALIGN 4LABEL     DPOST.sub.-- tbl              BYTE    &lt;sys.sub.-- init.                   SYS.sub.-- INIT.sub.-- 80&gt;                                       ;disable reset buttonLABEL    DPOST.sub.-- repeat              BYTE    proctbl &lt;reg.sub.-- tests,                   REG 80&gt;           proctbl &lt;PIC.sub.-- sanity,                    PIC.sub.-- 1.sub.-- 80&gt;           proctbl &lt;timer.sub.-- sanity,                     TIMER.sub.-- 1.sub.-- 80&gt;           proctbl &lt;RTC.sub.-- sanity,                     RTC.sub.-- 1.sub.-- 80&gt;           proctbl &lt;RTC.sub.-- vs.sub.-- timer,                   RTC.sub.-- VS.sub.-- T.sub.-- 80&gt;           proctbl &lt;cmos.sub.-- TEST,                      RTC.sub.-- CMOS.sub.-- 80&gt;           proctbl &lt;video.sub.-- tests,                       VIDEO.sub.-- 80&gt;           proctbl &lt;EMS.sub.-- tests,                      EMS.sub.-- 80&gt;;              proctbl &lt;timerl.sub.-- sanity,                   TIMER.sub.-- C.sub.-- 80&gt;                               ;Timer 1 sanity check;              proctbl &lt;RTC.sub.-- sanity,                      RTC.sub.-- C.sub.-- 80&gt;                                 ;RTC sanity check;              proctbl &lt;RTC.sub.-- vs.sub.-- timer.                    R.sub.-- VS.sub.-- T.sub.-- 80&gt;                                ;RTC vs. Timer 1 check;              proctbl &lt;RTC.sub.-- test,                        RTC.sub.-- 80&gt;                                   ;RTC test;              proctbl &lt;PIC.sub.-- test.sub.-- 1,                      PIC.sub.-- 1.sub.-- 80&gt;                                 ;PIC test 1;              proctbl &lt;timer.sub.-- test,                      TIMER.sub.-- 2.sub.-- 80&gt;                               ;Programmable Interval Timer test;              proctbl &lt;PIC.sub.-- test.sub.-- 2,                      PIC.sub.-- 2.sub.-- 80&gt;                                 ;PIC test 2;              proctbl &lt;ram.sub.-- cfg,                         RAM.sub.-- CFG.sub.-- 80&gt;                               ;RAM configuration routine;              proctbl &lt;glue.sub.-- testa,                      TESTA.sub.-- 80&gt;                                ;RAM tests test;              proctbl &lt;glue.sub.-- dataline,                   DATALINE.sub.-- 80&gt;                                 ;RAM dataline test;              proctbl &lt;glue.sub.-- burst,                      BURST.sub.-- 80&gt;                                    ;RAM bursting tests;              proctbl &lt;glue.sub.-- misDWORD,                   MISWORD.sub.-- 80&gt;                                  ;RAM misaligned transfer tests;              proctbl &lt;glue.sub.-- misBURST,                   MISBURST.sub.-- 80&gt;                                 ;RAM misaligned transfer tests;              proctbl &lt;glue.sub.-- page.sub.-- miss,                   PAGEMISS.sub.-- 80&gt;                                ;RAM RAS/CAS timing tests;              proctbl &lt;glue.sub.-- chaos,                       CHAOS.sub.-- 80&gt;                                   ;RAM chaos test;              proctbl &lt;glue.sub.-- fdc,                         FDC.sub.-- 80&gt;                                     ;Floppy controller test;              proctbl &lt;fbs.sub.-- pres.sub.-- test,                    FBS.sub.-- PRES.sub.-- 80&gt;                                ;Floppy boot sector presence test;              proctbl &lt;HDC.sub.-- test,                         HDC.sub.-- 80&gt;                                     ;Hard-disk controller test;              proctbl &lt;HDbs.sub.-- pres,                        HBS.sub.-- PRES.sub.-- 80&gt;                                ;Hard-disk boot sector presence                             testNUM.sub.-- DPOST.sub.-- TSTS = (S - DPOST.sub.-- tbl) / SIZE proctbl; -----------------------------------------------------------------------------------------------------------; ROM Interrupt Descriptor Table; -----------------------------------------------------------------------------------------------------------    PUBLIC          ROMIDT    PUBLIC           ROM.sub.-- IDT.sub.-- SIZELABEL        ROMIDT           BYTE    idesc        &lt;int.sub.-- 0,GDTC.sub.-- DIAGS,,86h,&gt;                                  ;INT 0    idesc               &lt;int.sub.-- 1,GDTC.sub.-- DIAGS,,86h,&gt;                                                           ;INT 1    idesc               &lt;int.sub.-- 2,GDTC.sub.-- DIAGS,,86h,&gt;                                                           ;INT 2    idesc               &lt;int.sub.-- 3,GDTC.sub.-- DIAGS,,86h,&gt;                                                           ;INT 3    idesc               &lt;int.sub.-- 4,GDTC.sub.-- DIAGS,,86h,&gt;                                                           ;INT 4    idesc               &lt;int.sub.-- 5,GDTC.sub.-- DIAGS,,86h,&gt;                                                           ;INT 5    idesc               &lt;int.sub.-- 6,GDTC DIAGS,,86h,&gt;                                                           ;INT 6    idesc               &lt;int.sub.-- 7,GDTC.sub.-- DIAGS,,86h,&gt;                                                           ;INT 7    idesc               &lt;int.sub.-- 8,GDTC.sub.-- DIAGS,,86h,&gt;                                                         ;INT 8    idesc               &lt;int.sub.-- 9,GDTC.sub.-- DIZAGS,,86h,&gt;                                                        ;INT 9    idesc               &lt;int.sub.-- A,GDTC.sub.-- DIAGS,,86h,&gt;                                                         ;INT 0Ah    idesc               &lt;int.sub.-- B,GDTC.sub.-- DIAGS,,86h,&gt;                                                         ;INT 0Bh    idesc               &lt;int.sub.-- C,GDTC.sub.-- DIAGS,,86h,&gt;                                                         ;INT 0Ch    idesc               &lt;int.sub.-- D,GDTC.sub.-- DIAGS,,86h,&gt;                                                         ;INT 0Dh    idesc               &lt;int.sub.-- E,GDTC.sub.-- DIAGS,,86h,&gt;                                                         ;INT 0Eh    idesc               &lt;int.sub.-- F.GDTC.sub.-- DIAGS,,86h,&gt;                                                         ;INT 0Fh    idesc               &lt;int.sub.-- 10,GDTC.sub.-- DIAGS,,86h,&gt;                                                        ;INT 10h    idesc               &lt;int.sub.-- 11,GDTC.sub.-- DIAGS,,86h,&gt;                                                        ;INT 11h    idesc               &lt;int.sub.-- 12,GDTC.sub.-- DIAGS,,86h,&gt;                                                        ;INT 12h    idesc               &lt;int.sub.-- 13,GDTC.sub.-- DIAGS,,86h,&gt;                                                        ;INT 13h    idesc               &lt;int.sub.-- 14,GDTC.sub.-- DIAGS,,86h,&gt;                                                        ;INT 14h    idesc               &lt;int.sub.-- 15,GDTC.sub.-- DIAGS,,86h,&gt;                                                        ;INT 15h    idesc               &lt;int.sub.-- 16,GDTC.sub.-- DIAGS,,86h,&gt;                                                        ;INT 16h    idesc               &lt;int.sub.-- 17,GDTC DIAGS,,86h,&gt;                                                        ;INT 17h    idesc               &lt;int.sub.-- 18,GDTC.sub.-- DIAGS,,86h,&gt;                                                        ;INT 18h    idesc               &lt;int.sub.-- 19,GDTC.sub.-- DIAGS,,86h,&gt;                                                        ;INT 19h    idesc               &lt;int.sub.-- 1A,GDTC.sub.-- DIAGS,,86h,&gt;                                                        ;INT 1Ah    idesc               &lt;int.sub.-- 1B,GDTC.sub.-- DIAGS,,86h,&gt;                                                        ;INT 1Bh    idesc               &lt;int.sub.-- 1C,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 1Ch    idesc               &lt;int.sub.-- 1D,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 1Dh    idesc               &lt;int.sub.-- 1E,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 1Eh    idesc               &lt;int.sub.-- 1F,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 1Fh    idesc               &lt;int.sub.-- 20,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 20h (IRQ0)    idesc               &lt;int.sub.-- 21,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 21h (IRQ1)    idesc               &lt;,GDTC.sub.-- DIAGS,,6h,&gt;                                   ;INT 22h (Not present)    idesc               &lt;int.sub.-- 23,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 23h (IRQ3)    idesc               &lt;int.sub.-- 24,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 24h (IRQ4)    idesc               &lt;int.sub.-- 25,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 25h (IRQ5)    idesc               &lt;int.sub.-- 26,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 26h (IRQ6)    idesc               &lt;int.sub.-- 27,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 27h (IRQ7)    idesc               &lt;int.sub.-- 28,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 28h (IRQ8)    idesc               &lt;int.sub.-- 29,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 29h (IRQ9)    idesc               &lt;int.sub.-- 2A,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 2Ah (IRQ10)    idesc               &lt;int.sub.-- 2B,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 2Bh (IRQ11)    idesc               &lt;int.sub.-- 2C,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 2Ch (IRQ12)    idesc               &lt;int.sub.-- 2D,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 2Dh (IRQ13)    idesc               &lt;int.sub.-- 2E,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 2Eh (IRQ14)    idesc               &lt;int.sub.-- 2F,GDTC.sub.-- DIAGS,,86h,&gt;                                   ;INT 2Fh (IRQ15)ROM.sub.-- IDT.sub.-- SIZE = S-ROMIDT-1; -----------------------------------------------------------------------------------------------------------; ROM IDT pointer operend for LIDT instruction.; -----------------------------------------------------------------------------------------------------------    PUBLIC          rom.sub.-- idt.sub.-- ptrLABEL          rom.sub.-- idt.sub.-- ptr FWORD    DW    ROM.sub.-- IDT SIZE                             ;idt limit    DW         OFFSET ROMIDT                                 ;low WORD of idt addr    DW         00fEh                     ;hi WORD of idt addrENDSEND__________________________________________________________________________