home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / packetdrivers.tar.gz / pd.tar / src / tail.asm < prev    next >
Assembly Source File  |  1995-06-25  |  16KB  |  651 lines

  1. ;   PC/FTP Packet Driver source, conforming to version 1.05 of the spec
  2. ;   Updated to version 1.08 Feb. 17, 1989.
  3. ;   Copyright 1988-1993 Russell Nelson
  4.  
  5. ;   This program is free software; you can redistribute it and/or modify
  6. ;   it under the terms of the GNU General Public License as published by
  7. ;   the Free Software Foundation, version 1.
  8. ;
  9. ;   This program is distributed in the hope that it will be useful,
  10. ;   but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. ;   GNU General Public License for more details.
  13. ;
  14. ;   You should have received a copy of the GNU General Public License
  15. ;   along with this program; if not, write to the Free Software
  16. ;   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18.     include    defs.asm
  19.  
  20. code    segment word public
  21.     assume    cs:code, ds:code
  22.  
  23.     public    is_eisa
  24. is_eisa    db    0            ;=0 if ISA, =1 if EISA
  25.     extrn    sys_features: byte    ;bitmask of system features.
  26.     extrn    is_186: byte        ;=0 if 808[68], =1 if 80[1234]86.
  27.     extrn    is_286: byte        ;=0 if 80[1]8[68], =1 if 80[234]86.
  28.     extrn    is_386: byte        ;=0 if 80[12]8[68], =1 if 80[34]86.
  29.     extrn    int_no: byte        ;the board's interrupt level.
  30.     extrn    hw_int_no: byte        ;the 8259 interrupt level.
  31.     extrn    driver_class: byte    ;the class of this driver, per the spec.
  32.     extrn    rcv_modes: word        ;count of modes followed by mode handles.
  33.  
  34. ;-> last byte of static memory used by driver-dependent code.
  35.     extrn    end_resident: byte
  36.     extrn    end_free_mem: byte
  37.  
  38. ;-> the fixed address of the card.
  39.     extrn    rom_address: byte
  40.  
  41. ;-> the current address of the card.
  42.     extrn    my_address: byte
  43.  
  44.     extrn    phd_dioa: byte
  45.     extrn    phd_environ: word
  46.     extrn    flagbyte: byte
  47.  
  48.     include    printnum.asm
  49.     include    decout.asm
  50.     include    digout.asm
  51.     include    crlf.asm
  52.     include    chrout.asm
  53.  
  54. free_mem    dw    end_resident    ;allocate memory from here.
  55. ;also see memory_to_keep.
  56.  
  57.     public    malloc
  58. malloc:
  59. ;enter with dx = amount of memory desired.
  60. ;exit with nc, dx -> that memory, or cy if there isn't enough memory.
  61.     add    dx,free_mem        ;make a pointer after that much memory.
  62.     cmp    dx,offset end_free_mem    ;is it still in the free area?
  63.     ja    malloc_1        ;no, we're in trouble.
  64.     xchg    dx,free_mem        ;get the pointer back, store ptr->end.
  65.     clc
  66.     ret
  67. malloc_1:
  68.     stc
  69.     ret
  70.  
  71.  
  72. end_tail_1    label    byte        ; end of the delayed init driver
  73.  
  74. ;usage_msg is of the form "usage: driver [options] <packet_int_no> <args>"
  75.     extrn    usage_msg: byte
  76.  
  77. options_i_msg    label    byte
  78. db"   -i -- Force driver to report itself as IEEE 802.3 instead of Ethernet II.",CR,LF
  79. options_msg    label    byte
  80. db"   -d -- Delayed initialization.  Used for diskless booting",CR,LF
  81. db"   -n -- NetWare conversion.  Converts 802.3 packets into 8137 packets",CR,LF
  82. db"   -w -- Windows hack, obsoleted by winpkt",CR,LF
  83. db"   -p -- Promiscuous mode disable",CR,LF
  84. db"   -u -- Uninstall",CR,LF
  85. db '$'
  86.  
  87. ;copyright_msg is of the form:
  88. ;"Packet driver for the foobar",CR,LF
  89. ;"Portions Copyright 19xx, J. Random Hacker".
  90.     extrn    copyright_msg: byte
  91.  
  92. copyleft_msg    label    byte
  93.  db "Packet driver skeleton copyright 1988-93, Crynwr Software.",CR,LF
  94.  db "This program is freely copyable; source must be available; NO WARRANTY.",CR,LF
  95.  db "See the file COPYING.DOC for details; send FAX to +1-315-268-9201 for a copy.",CR,LF
  96.  db CR,LF,'$'
  97.  
  98. no_resident_msg    label    byte
  99.  db CR,LF,"*** Packet driver failed to initialize the board ***",CR,LF,'$'
  100.  
  101. ;parse_args should parse the arguments.
  102. ;called with ds:si -> immediately after the entry_point.
  103.     extrn    parse_args: near
  104.  
  105. ;print_parameters should print the arguments.
  106.     extrn    print_parameters: near
  107.  
  108.     extrn    our_isr: near, their_isr: dword
  109.     extrn    entry_point: byte
  110.  
  111. eisa_signature    db    "EISA"
  112.  
  113. system_msg    db    "System: ",'$'
  114. i386_msg    db    "[345]86 processor",'$'
  115. i286_msg    db    "286 processor",'$'
  116. i186_msg    db    "186 processor",'$'
  117. i8088_msg    db    "8088/8086 processor",'$'
  118. mca_msg        db    ", Microchannel bus",'$'
  119. eisa_msg    db    ", EISA bus",'$'
  120. isa_msg        db    ", ISA bus",'$'
  121. two_8259_msg    db    ", Two 8259s",'$'
  122. entry_point_name    db    "Packet driver software interrupt is ",'$'
  123. eaddr_msg    db    "My Ethernet address is ",'$'
  124. aaddr_msg    db    "My ARCnet address is ",'$'
  125.  
  126. already_msg    db    CR,LF,"Error: there is already a packet driver (you may uninstall it using -u) at ",'$'
  127. no_pkint_msg    db    CR,LF,"Error: there is no packet driver at ",'$'
  128. no_pkt_msg    db    CR,LF,"Error: no packet driver found between 0x60 and 0x80",CR,LF,'$'
  129. two_pkts_msg    db    CR,LF,"Error: there are two packets drivers (specify the desired one after -u).",CR,LF,'$'
  130. int_msg        db    CR,LF
  131.         db    "Error: <hardware_irq> should be between 0 and "
  132. int_msg_num    label    word
  133.         db    "15 inclusive", '$'
  134. xt_hd_warn_msg    db    CR,LF,"Warning: the hard disk on an XT usually uses IRQ 5.  Use a different interrupt",CR,LF,'$'
  135. no_ieee_msg    db    CR,LF,"Error: this driver doesn't implement both IEEE 802.3 and Ethernet II",CR,LF,'$'
  136. terminated_msg    db    "Uninstall completed",'$'
  137.  
  138. handle        dw    ?
  139.  
  140. entry_point_fnd    db    0
  141. bogus_type    db    0,0        ;totally bogus type code.
  142. our_recv:
  143.     xor    di,di
  144.     mov    es,di
  145.     retf
  146.  
  147.     public    etopen_diagn
  148. etopen_diagn    db    0        ; errorlevel from etopen if set
  149.  
  150. ;etopen should initialize the device.  If it needs to give an error, it
  151. ;can issue the error message and quit to dos.
  152.     extrn    etopen: near
  153.  
  154. memory_to_keep    dw    end_resident    ;keep at least this much memory.
  155. ;also see free_mem.
  156.  
  157. already_error:
  158.     mov    dx,offset already_msg
  159. already_error_1:
  160.     mov    di,offset entry_point
  161.     call    print_number
  162.     mov    ax,4c05h        ; give errorlevel 5
  163.     int    21h
  164.  
  165. usage_error:
  166.     mov    dx,offset usage_msg
  167.     mov    ah,9
  168.     int    21h
  169.     mov    dx,offset options_msg
  170.     cmp    word ptr driver_class,BLUEBOOK + IEEE8023*256    ;both present?
  171.     jne    error
  172.     mov    dx,offset options_i_msg
  173.     public    error
  174. error:
  175.     mov    ah,9
  176.     int    21h
  177.     mov    ax,4c0ah        ; give errorlevel 10
  178.     int    21h
  179.  
  180. ;;;    include    timeout.asm
  181.  
  182.     public    start_1
  183. start_1:
  184.     cld
  185.  
  186.     mov    dx,offset copyright_msg
  187.     mov    ah,9
  188.     int    21h
  189.  
  190.     mov    dx,offset copyleft_msg
  191.     mov    ah,9
  192.     int    21h
  193.  
  194.     mov    dx,offset branding_msg
  195.     mov    ah,9
  196.     int    21h
  197.  
  198.     mov    dx,0f000h        ;ROM segment
  199.     mov    es,dx
  200.     mov    di,0ffd9h
  201.     mov    si,offset eisa_signature
  202.     mov    cx,2
  203.     repe    cmpsw
  204.     jne    not_eisa
  205.     inc    is_eisa
  206. not_eisa:
  207.  
  208. ;
  209. ; Get the feature byte (if reliable) so we can know if it is a microchannel
  210. ; computer and how many interrupts there are.
  211. ;
  212.     mov    ah,0c0h
  213.     int    15h            ; es:bx <- sys features block
  214.     jc    look_in_ROM        ; error, must use rom.
  215.     or    ah,ah
  216.     jnz    look_in_ROM
  217.     mov    dx,es:[bx]        ; # of feature bytes
  218.     cmp    dx,4            ; do we have the feature byte we want?
  219.     jae    got_features        ;yes.
  220. look_in_ROM:
  221.     cmp    byte ptr es:[0fffeh],0fch;is this an AT?
  222.     jne    identified        ;no.
  223.     or    sys_features,TWO_8259    ; ATs have 2nd 8259
  224.     jmp    identified        ; assume no microchannel
  225. got_features:
  226.     mov    ah,es:[bx+2]        ; model byte
  227.     cmp    ah,0fch
  228.     je    at_ps2
  229.     ja    identified        ; FD, FE and FF are not ATs
  230.     cmp    ah,0f8h
  231.     je    at_ps2
  232.     ja    identified        ; F9, FA and FB are not ATs
  233.     cmp    ah,09ah
  234.     jbe    identified        ; old non-AT Compacs go here
  235. at_ps2:                    ; 9B - F8 and FC are assumed to
  236.     mov    ah,es:[bx+5]        ;   have reliable feature byte
  237.     mov    sys_features,ah
  238. identified:
  239.  
  240. ;Determine the processor type.  The 8088 and 8086 will actually shift ax
  241. ;over by 33 bits, while the 80[123]86 use a shift count mod 32.
  242.     mov    cl,33
  243.     mov    ax,0ffffh
  244.     shl    ax,cl            ;186 or better?
  245.     jz    processor_identified    ;no.
  246.     mov    is_186,1
  247.  
  248.     push    sp
  249.     pop    ax
  250.     cmp    ax,sp            ;286 or better?
  251.     jne    processor_identified    ;no.
  252.     mov    is_286,1
  253.  
  254.     pushf
  255.     pop    ax
  256.     or    ax,7000h        ;the 386 lets us set these bits
  257.     push    ax
  258.     popf                ;this should be a real popf.
  259.     pushf
  260.     pop    ax
  261.     test    ax,7000h        ;did the bits get set?
  262.     je    processor_identified
  263.     mov    is_386,1
  264.  
  265. processor_identified:
  266.  
  267.     mov    si,offset phd_dioa+1
  268.     call    skip_blanks        ;end of line?
  269.     cmp    al,CR
  270.     je    usage_error_j_1
  271.  
  272. chk_options:
  273.     call    skip_blanks
  274.     cmp    al,'-'            ; any options?
  275.     jne    no_more_opt
  276.     inc    si            ; skip past option char
  277.     lodsb                ; read next char
  278.     or    al,20h            ; convert to lower case
  279.     cmp    al,'d'
  280.     jne    not_d_opt
  281.     or    flagbyte,D_OPTION
  282.     jmp    chk_options
  283. not_d_opt:
  284.     cmp    al,'n'
  285.     jne    not_n_opt
  286.     or    flagbyte,N_OPTION
  287.     jmp    chk_options
  288. not_n_opt:
  289.     cmp    al,'w'
  290.     jne    not_w_opt
  291.     or    flagbyte,W_OPTION
  292.     jmp    chk_options
  293. not_w_opt:
  294.     cmp    al,'p'
  295.     jne    not_p_opt
  296.     cmp    rcv_modes,6        ;do they even *have* a promiscuous mode?
  297.     jbe    chk_options        ;no.
  298.     mov    rcv_modes+2[6*2],0    ;yes, nuke it.
  299.     jmp    chk_options
  300. not_p_opt:
  301.     cmp    al,'u'
  302.     jne    not_u_opt
  303.     or    flagbyte,U_OPTION
  304.     jmp    chk_options
  305. not_u_opt:
  306.     cmp    al,'i'
  307.     jne    not_i_opt
  308.     cmp    word ptr driver_class,BLUEBOOK + IEEE8023*256    ;both present?
  309.     mov    dx,offset no_ieee_msg
  310.     jne    usage_error_j_1        ;no - give error
  311.     mov    word ptr driver_class,IEEE8023 + BLUEBOOK*256    ;yes, swap them.
  312.     jmp    chk_options
  313. not_i_opt:
  314. usage_error_j_1:
  315.     jmp    usage_error
  316. no_more_opt:
  317.  
  318.     mov    di,offset entry_point    ;parse the packet interrupt number
  319.     call    get_number        ;  for them.
  320.  
  321.     test    flagbyte,U_OPTION    ;should we terminate the driver?
  322.     jne    terminate
  323.     jmp    not_terminate
  324. terminate:
  325.  
  326.     cmp    entry_point,0        ;did they ask for the default?
  327.     jne    terminate_int_ok    ;no, run with it.
  328.  
  329.     mov    entry_point,60h
  330. terminate_check_int:
  331.     call    verify_packet_int
  332.     jc    terminate_check_int_1
  333.     jne    terminate_check_int_1
  334.     cmp    entry_point_fnd,0    ;did we already find one?
  335.     jne    terminate_check_int_2    ;yes, it's ambiguous - give error.
  336.     mov    al,entry_point        ;no, remember it.
  337.     mov    entry_point_fnd,al
  338. terminate_check_int_1:
  339.     inc    entry_point        ;go look at the next one
  340.     cmp    entry_point,80h
  341.     jbe    terminate_check_int    ;keep going to the end.
  342.  
  343.     mov    al,entry_point_fnd    ;restore the last one found.
  344.     mov    entry_point,al
  345.     cmp    entry_point_fnd,0    ;did we find one?
  346.     jne    terminate_int_ok    ;yes.
  347.     mov    dx,offset no_pkt_msg    ;no packet drivers installed!
  348.     jmp    error
  349. terminate_check_int_2:
  350.     mov    dx,offset two_pkts_msg    ;two packet drivers - which one??
  351.     jmp    error
  352.  
  353. terminate_int_ok:
  354.     call    verify_packet_int    ;is the one they specified acceptable?
  355.     jnc    terminate_1        ;no, it's not in range.
  356.     jmp    error
  357. terminate_1:
  358.     je    terminate_2        ;go if we found a signature.
  359.     mov    dx,offset no_pkint_msg    ;no packet driver there.
  360.     jmp    already_error_1
  361. terminate_2:
  362.  
  363.     mov    their_isr.offs,bx
  364.     mov    their_isr.segm,es
  365.  
  366.     mov    ax,1ffh            ;driver_info
  367.     pushf
  368.     cli
  369.     call    their_isr
  370.     call    fatal_error
  371.     movseg    ds,cs
  372.  
  373.     mov    ah,2            ;access_type
  374.     mov    al,ch            ;their class from driver_info().
  375.     mov    bx,dx            ;their type from driver_info().
  376.     mov    dl,cl            ;their number from driver_info().
  377.     mov    cx,2            ;use type length 2.
  378.     mov    si,offset bogus_type
  379.     movseg    es,cs
  380.     mov    di,offset our_recv
  381.     pushf
  382.     cli
  383.     call    their_isr
  384.     call    fatal_error
  385.     mov    handle,ax
  386.  
  387.     mov    ah,5            ;terminate the driver.
  388.     mov    bx,handle
  389.     pushf
  390.     cli
  391.     call    their_isr
  392.     jnc    now_close
  393.     call    print_error
  394.     mov    ah,3            ;release_type
  395.     mov    bx,handle
  396.     pushf
  397.     cli
  398.     call    their_isr
  399.     int    20h
  400. now_close:
  401.     mov    dx,offset terminated_msg
  402.     mov    ah,9
  403.     int    21h
  404.     int    20h
  405.  
  406. usage_error_j_2:
  407.     jmp    usage_error
  408. not_terminate:
  409.  
  410.     call    parse_args
  411.     jc    usage_error_j_2
  412.  
  413.     call    skip_blanks        ;end of line?
  414.     cmp    al,CR
  415.     jne    usage_error_j_2
  416.  
  417.     call    verify_packet_int
  418.     jnc    packet_int_ok
  419.     jmp    error
  420. packet_int_ok:
  421.     jne    packet_int_unused
  422.     jmp    already_error        ;give an error if there's one there.
  423. packet_int_unused:
  424. ;
  425. ; Verify that the interrupt number they gave is valid.
  426. ;
  427.     cmp    int_no,15        ;can't possibly be > 15.
  428.     ja    int_bad
  429.     test    sys_features,TWO_8259    ; 2nd 8259 ?
  430.     jnz    int_ok            ;yes, no need to check for <= 7.
  431.     mov    int_msg_num,'7'+' '*256    ;correct the error message, just in case.
  432.     cmp    int_no,7        ;make sure that the packet interrupt
  433.     jbe    int_ok_7        ;  number is in range.
  434. int_bad:
  435.     mov    dx,offset int_msg
  436.     jmp    error
  437. int_ok_7:
  438.     cmp    int_no,5        ;Are they trying to use irq 5 on an XT?
  439.     jne    int_ok            ;no.
  440.  
  441.     push    ds
  442.     mov    ax,40h
  443.     mov    ds,ax
  444.     mov    al,ds:[75h]        ;get the number of hard disks.
  445.     pop    ds
  446.  
  447.     or    al,al            ;do they have one?
  448.     je    int_ok            ;unbelievably, no.
  449.     mov    dx,offset xt_hd_warn_msg
  450.     mov    ah,9
  451.     int    21h
  452. int_ok:
  453.  
  454. ;
  455. ; Map IRQ 2 to IRQ 9 if needed.
  456. ;
  457.     test    sys_features,TWO_8259    ; 2nd 8259 ?
  458.     je    no_mapping_needed    ;no, no mapping needed
  459.     cmp    int_no,2        ;map IRQ 2 to IRQ 9.
  460.     jne    no_mapping_needed
  461.     mov    int_no,9
  462. no_mapping_needed:
  463.  
  464. ; If they chose the -d option, don't call etopen when we are loaded,
  465. ; but when we are called for the first time
  466. ;
  467. ; Save part of the tail, needed by delayed etopen
  468.     test    flagbyte,D_OPTION
  469.     jz    open_now
  470.     mov    memory_to_keep,offset end_tail_1    ; save first part of tail
  471.     jmp    delayed_open_1
  472. open_now:
  473.     call    etopen            ;init the driver.  If any errors,
  474.                     ;this routine returns cy.
  475.     jnc    yes_resident
  476.     jmp    no_resident
  477.  
  478. yes_resident:
  479.     mov    si,offset rom_address    ;copy their original address to
  480.     movseg    es,ds
  481.     mov    di,offset my_address    ;  their current address.
  482.     mov    cx,MAX_ADDR_LEN/2
  483.     rep    movsw
  484.  
  485. ; tell them what kind of system they have.
  486.     mov    dx,offset system_msg
  487.     mov    ah,9
  488.     int    21h
  489.  
  490.     mov    dx,offset i386_msg
  491.     cmp    is_386,0
  492.     jne    have_processor
  493.     mov    dx,offset i286_msg
  494.     cmp    is_286,0
  495.     jne    have_processor
  496.     mov    dx,offset i186_msg
  497.     cmp    is_186,0
  498.     jne    have_processor
  499.     mov    dx,offset i8088_msg
  500. have_processor:
  501.     mov    ah,9
  502.     int    21h
  503.  
  504.     mov    dx,offset mca_msg
  505.     test    sys_features,SYS_MCA
  506.     jne    have_bus
  507.     mov    dx,offset eisa_msg
  508.     cmp    is_eisa,0
  509.     jne    have_bus
  510.     mov    dx,offset isa_msg
  511. have_bus:
  512.     mov    ah,9
  513.     int    21h
  514.  
  515.     test    sys_features,TWO_8259
  516.     je    only_one_8259
  517.     mov    dx,offset two_8259_msg
  518.     mov    ah,9
  519.     int    21h
  520. only_one_8259:
  521.  
  522.     call    crlf
  523.  
  524.     mov    di,offset entry_point
  525.     mov    dx,offset entry_point_name
  526.     call    print_number
  527.  
  528.     call    print_parameters    ;echo our parameters.
  529.     or    flagbyte,CALLED_ETOPEN
  530.  
  531.     cmp    driver_class,BLUEBOOK    ;Blue Book Ethernet?
  532.     je    print_eaddr        ;yes.
  533.     cmp    driver_class,IEEE8023    ;IEEE 802.3 Ethernet?
  534.     jne    print_addr_2        ;no, don't print what we don't have.
  535.  
  536. print_eaddr:
  537.     mov    dx,offset eaddr_msg
  538.     mov    ah,9
  539.     int    21h
  540.  
  541.     mov    si,offset rom_address
  542.     call    print_ether_addr
  543.  
  544.     call    crlf
  545.  
  546. print_addr_2:
  547.  
  548.     cmp    driver_class,8        ;ARCnet?
  549.     jne    print_addr_3        ;no, don't print what we don't have.
  550.  
  551.     mov    dx,offset aaddr_msg
  552.     mov    ah,9
  553.     int    21h
  554.  
  555.     mov    al,rom_address
  556.     mov    cl,' '            ;Don't eliminate leading zeroes.
  557.     call    byteout
  558.  
  559.     call    crlf
  560.  
  561. print_addr_3:
  562. delayed_open_1:
  563.     mov    ah,35h            ;remember their packet interrupt.
  564.     mov    al,entry_point
  565.     int    21h
  566.     mov    their_isr.offs,bx
  567.     mov    their_isr.segm,es
  568.  
  569.     mov    ah,25h            ;install our packet interrupt
  570.     mov    dx,offset our_isr
  571.     int    21h
  572.  
  573.     mov    ah,49h            ;free our environment, because
  574.     mov    es,phd_environ        ;  we won't need it.
  575.     int    21h
  576.  
  577.     mov    bx,1            ;get the stdout handle.
  578.     mov    ah,3eh            ;close it in case they redirected it.
  579.     int    21h
  580.  
  581.     test    flagbyte,D_OPTION
  582.     jne    f_release_type_1    ;no.
  583.     cmp    rcv_modes+2[3*2],0    ;does mode 3 exist?
  584.     je    f_release_type_1    ;no.
  585.     call    rcv_modes+2[3*2]    ;  call it.
  586. f_release_type_1:
  587.  
  588.     mov    dx,memory_to_keep    ;keep the greater of this and
  589.     cmp    dx,free_mem        ;  free_mem.
  590.     jae    go_resident
  591.     mov    dx,free_mem
  592. go_resident:
  593.     add    dx,0fh            ;round up to next highest paragraph.
  594.     mov    cl,4
  595.     shr    dx,cl
  596.     mov    ah,31h            ;terminate, stay resident.
  597.     mov    al,etopen_diagn        ; errorlevel (0 - 9, just diagnostics)
  598.     int    21h
  599.  
  600. no_resident:
  601.     mov    ah,9            ;print their error message.
  602.     int    21h
  603.  
  604.     mov    dx,offset no_resident_msg
  605.     mov    ah,9
  606.     int    21h
  607.  
  608.     mov    ax,4c00h + 32        ; give errorlevel 32
  609.     cmp    al,etopen_diagn
  610.     ja    no_et_diagn        ; etopen gave specific reason?
  611.     mov    al,etopen_diagn        ; yes, use that for error level
  612. no_et_diagn:
  613.     int    21h
  614.  
  615. ;             Suggested errorlevels:
  616. ;
  617. ; _____________________  0 = normal
  618. ;              1 = unsuitable memory address given; corrected
  619. ; In most cases every-     2 = unsuitable IRQ level given; corrected
  620. ; thing should work as     3 = unsuitable DMA channel given; corrected
  621. ; expected for lev 1-5     4 = unsuitable IO addr given; corrected (only 1 card)
  622. ; _____________________     5 = packet driver for this int # already loaded
  623. ; External errors, when    20 = general cable failure (but pkt driver is loaded)
  624. ; corrected normal    21 = network cable is open             -"-
  625. ; operation starts    22 = network cable is shorted          -"-
  626. ; _____________________ 23 = 
  627. ; Packet driver not    30 = usage message
  628. ; loaded. A new load    31 = arguments out of range
  629. ; attempt must be done    32 = unspecified device initialization error
  630. ;            33 = 
  631. ;            34 = suggested memory already occupied
  632. ;            35 = suggested IRQ already occupied
  633. ;            36 = suggested DMA channel already occupied
  634. ;            37 = could not find the network card at this IO address
  635.  
  636.  
  637.     include    verifypi.asm
  638.     include    getnum.asm
  639.     include    getdig.asm
  640.     include    skipblk.asm
  641.     include    printea.asm
  642.     include    pkterr.asm
  643.     include    getenv.asm
  644.  
  645.     public    branding_msg
  646. branding_msg    db    '$'
  647.  
  648. code    ends
  649.  
  650.     end
  651.