⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 91c110.asm

📁 lan91c111 测试代码
💻 ASM
📖 第 1 页 / 共 2 页
字号:
;******************************************************************************
; Card Name: SMSC/Rockwell LAN91C110 Ethernet/Modem PCCard
; Code Name: 
; File Contents: Multifunction CIS
;
;
; $Log: /Software/CIS/SMSC/Source/91C110.ASM $
; 
; 9     2/04/99 1:43p Fwbent
; - Added comment about CIS lenght needed to be less than 512 bytes.
; 
; 7     11/14/98 1:00p Fwbent
;
;
; Update V5:
;   1 - Changed the base for the CCR's in the global CIS to 8000 from 8020, this 
;       was needed for DOS card services
;   **Known problems:
;   1 - The buffer sizes in Func1_tuple 7, 6, and 5 need to be verified
;   2 - The global CIS contains no device type, so DOS CS will not enable the card
;       as a modem only device.  This is GOOD, if this tuple is put in then it will
;       cause trouble on other OS's like the Mac OS.
; Update V4:
;   1 - changed the order of the network and modem and simplified the network cis
;       now works in OSR2
;   **Known problems:
;   1 - The buffer sizes in Func1_tuple 7, 6, and 5 need to be verified
;   2 - The global CIS contains no device type, so DOS CS will not enable the card
;       as a modem only device.  This is OK, if this tuple is put in then it will
;       cause trouble on other OS's like the Mac OS.
; Update V3:
;   1 - Added a LongLink tuple and a new MF CIS segment.  The theory is that the
;       NON-MF Card Services will only parse the Global CIS and the MF Capable
;       Card Services will skip the rest of the global CIS at the LongLink tuple
;       and jump to the MF CIS area.
;   **Known problems:
;   1 - The buffer sizes in Func1_tuple 7, 6, and 5 need to be verified
;   2 - The global CIS contains no device type, so DOS CS will not enable the card
;       as a modem only device.  This is OK, if this tuple is put in then it will
;       cause trouble on other OS's like the Mac OS.
; Update V2:
;   1 - Removed the CISTPL_FUNCID tuple from the global CIS so both functions
;       didn't look like serial devices.
;       This should work correctly under Win95, Win95 OSR2, WinNT4.0
;       MacOS with CM2 or CM3
;   **Known problems:
;   1 - The buffer sizes in Func1_tuple 7, 6, and 5 need to be verified
; Update V1:
;   1 - Created CIS
;   **Known problems:
;   1 - The buffer sizes in Func1_tuple 7, 6, and 5 need to be verified
;
;

;
; Include files
;
.INCLUDE PCCTPL.INC

;
; CIS Version
;
CIS_VERSION EQU 5

;
; The CISTPL_FUNCE LAN function Extension TPLFE_TYPE constants
;

LAN_TECH  EQU  01h
LAN_SPEED EQU  02h
LAN_MEDIA EQU  03h
LAN_NID   EQU  04h
LAN_CONN  EQU  05h

	PUBLIC CIS_ROM_TABLE

CIS_ROM_TABLE:
start_global_tuple1:
	.DB CISTPL_DEVICE
	.DB (start_global_tuple2 - $ - 1)
	.DB 00h
	.DB 0ffh ; End of Tuple

SPECIAL_global_CISTPL_VERS_1:
start_global_tuple2:
	.DB CISTPL_VERS_1
	.DB (start_global_tuple3 - $ - 1)
	.DB 05h         ; TPLLV1_MAJOR     5h, 0h  February 1995
	.DB 00h         ; TPLLV1_MINOR
        .DB "SMSC"
	.DB 00h         ; NULL Terminator
        .DB "LAN91C110 Ethernet+Modem"
;        .DB "56k + 10Mb Ethernet"
	.DB 00h         ; NULL Terminator
        .DB "400071-xxx"
;        .DB "400019-16C"
	.DB 00h         ; NULL Terminator
        .DB "SerialNumber"
;        .DB "123456789abc"
	.DB 00h         ; NULL Terminator
	.DB CIS_VERSION ; CIS Version number
	.DB 0ffh        ; End of Tuple

start_global_tuple3:
	.DB CISTPL_MANFID
	.DB (start_global_tuple4 - $ - 1)
        .DW 0108h       ; SMSC 0108H/Ositech 0140H
        .DW 0133h       ;

;CIS_ROM_3V_HEADER_END:

start_global_tuple4:
	.DB CISTPL_LONGLINK_A
	.DB (start_global_tuple5 - $ - 1)
        .DW (start_MF_tuple1 - CIS_ROM_TABLE) ; The address of the first function
	.DW 00h         ; the high order word of the first function address

; Only none multi-function card and socket services will get here.

start_global_tuple5:
	.DB CISTPL_CONFIG
	.DB (start_global_tuple6 - $ - 1)
	.DB 005h  ; TPCC_SZ   Size Fields - Reserved  : TPCC_RMSZ : TPCC_RASZ
                  ;                            00     :   0001    :    01
        .DB 007h  ; TPCC_LAST - Last Config Table Index 7
        .DB 000h  ; TPCC_RADR - Config register base address, 2Bytes
        .DB 004h  ;    400h
        .DB 077h  ; TPCC_RMSK - Config register Presence Mask, 2Byte
        .DB 000h  ;    0000 0000 0111 0111
                  ;    Offset 0  : MCOR
                  ;    Offset 2  : MCSR
                  ;    Offset 4  : MPRR 
                  ;    Offset 6  : NOT USED
                  ;    Offset 8  : MESR
                  ;    Offset a  : MIO-0
                  ;    Offset c  : MIO-1
                  ;    Offset e  : NOT USED
                  ;    Offset 10 : NOT USED 
                  ;    Offset 12 : NOT USED 

start_global_tuple6:
	.DB CISTPL_CFTABLE_ENTRY
        .DB (SPECIAL_global_LAN_NID - $ - 1)
	.DB 087h  ; TPCE_INDX       Configuration Table Index
                  ;                 Configuration Entry Number :7
                  ;                 NOT Default Configuration
                  ;                 Interface(TPCE_IF) byte follows
	.DB 041h  ; TPCE_IF        I/O Interface,Ready/Busy Active
	.DB 09Dh  ; TPCE_FS        Feature Selection
                  ;                 VCC power description follows
                  ;                 Timing Description follows
                  ;                 IRQ Structure present
                  ;                 A miscellaneous field struct is present
	.DB 07Fh  ; TPCE_PD        Power Description
	.DB 055h  ;                 Nominal supply voltage :5 V
	.DB 0C5h  ;                 Minimum supply voltage
	.DB 04Bh  ;                 (Extension) :4.75 V
	.DB 0D5h  ;                 Maximum supply voltage
	.DB 019h  ;                 (Extension) :5.25 V
	.DB 026h  ;                 Continuous current required :200 mA
	.DB 04Eh  ;                 Max current required averaged over 1 second :450 mA
	.DB 0E6h  ;                 Max current required averaged over 10 milliseconds
	.DB 032h  ;                 (Extension) :650 mA
	.DB 053h  ;                 Power-down current required :0 mA
	.DB 0E7h  ; TPCE_TD         Timing Description
	.DB 05Fh  ;                  Ready/Busy Scale
	.DB 023h  ; TPCE_IO         I/O Description
                  ;                  8-bit,I/O Address Line: 3
	.DB 0B0h  ; TPCE_IR         Interrupt Request, Shared, Level
	.DB 0FFh  ;                  IRQs Allowed
	.DB 0FFh  ;                  IRQs Allowed
	.DB 028h  ; TPCE_MI         Miscellaneous

; We put this here so that the drivers will find
; it without having to know about the CISTPL_LONGLINK_A
; and CISTPL_LONGLINK_MFC tuples.

; BUGBUGBUG
; If we leave this as a CISTPL_FUNCE then will things break,
; since there is no CISTPL_FUNCID tuple before it?

SPECIAL_global_LAN_NID:
;        .DB CISTPL_FUNCE
        .DB 090h       ; OSITECH_TUPLE
        .DB (start_global_end - $ - 1)
        .DB LAN_NID
        .DB 006h  ; Length
        .DB 000h  
        .DB 080h  ; SMSC OUI 00-80-0F-XX-XX-XX
        .DB 00Fh
        .DB 0F0h
        .DB 027h
        .DB 00Dh

start_global_end:
	.DB CISTPL_END
        .DB (start_global_ends - $ - 1)
        .DB 0ffh  ; CISTPL_END for non PC Card 5.0
start_global_ends:
;        .DB 0ffh  ; CISTPL_END for non PC Card 5.0

;******************************************************************************
; MultiFunction Section
;******************************************************************************
start_MF_tuple1:
	.DB CISTPL_LINKTARGET
	.DB (start_MF_tuple2 - $ - 1)
	.DB "CIS" 

start_MF_tuple2:
	.DB CISTPL_LONGLINK_MFC
	.DB (start_MF_end - $ - 1)
	.DB 02h         ; Two functions
	.DB 00h         ; Attributes - NONE
  .DW (start_func2_tuple1 - CIS_ROM_TABLE) ; The address of the "first" function
	.DW 00h         ; the high order word of the first function address

	.DB 00h         ; Attributes - NONE
  .DW (start_func1_tuple1 - CIS_ROM_TABLE) ; The address of the "second" function
	.DW 00h         ; the high order word of the second function address

start_MF_end:
	.DB CISTPL_END
        .DB (start_MF_ends - $ - 1)

start_MF_ends:

;******************************************************************************
; Ethernet CIS
;******************************************************************************

start_func2_tuple1:
	.DB CISTPL_LINKTARGET
	.DB (start_func2_tuple2 - $ - 1)
	.DB "CIS" 

start_func2_tuple2:
	.DB CISTPL_FUNCID
	.DB (start_func2_tuple9 - $ - 1)
	.DB 006h ; TPLFID_FUNCTION Network Adapter
	.DB 000h ; TPLFID_SYSINIT  

start_func2_tuple9:
	.DB CISTPL_CONFIG
	.DB (start_func2_tuple10 - $ - 1)
	.DB 005h  ; TPCC_SZ   Size Fields - Reserved  : TPCC_RMSZ : TPCC_RASZ
                  ;                            00     :   0001    :    01
	.DB 007h  ; TPCC_LAST - Last Config Table Index 1
        .DB 000h  ; TPCC_RADR - Config register base address, 2Byte
        .DB 004h  ;    400h
        .DB 0ffh  ; TPCC_RMSK - Config register Presence Mask, 2Byte
        .DB 003h  ;    0000 0000 0011 0011
                  ;    Offset 0  : ECOR
                  ;    Offset 2  : ECSR
                  ;    Offset 4  : NOT USED
                  ;    Offset 6  : NOT USED
                  ;    Offset 8  : NOT USED
                  ;    Offset a  : EIO-0
                  ;    Offset c  : EIO-1
                  ;    Offset e  : NOT USED 
                  ;    Offset 10 : NOT USED 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -