Subversion Repositories Kolibri OS

Rev

Rev 135 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 135 Rev 205
Line 1... Line 1...
1
;***************************************************************
1
;***************************************************************
2
; project name:    PCI Device Enumeration
2
; project name:    PCI Device Enumeration
3
; target platform: KolibriOS and MenuetOS
3
; target platform: KolibriOS and MenuetOS
4
; compiler:        flat assmebler 1.63.2
4
; compiler:        flat assmebler 1.66
5
; version:         1.31
5
; version:         2.0
6
; last update:     13(th) May 2006
6
; last update:     30(th) August 2006
7
; maintained by:   Jason Delozier (cordata51)
7
; maintained by:   Jason Delozier and Sergey Kuzmin
8
; e-mail:          cordata51@hotmail.com
8
; e-mail:          cordata51@hotmail.com and kuzmin_serg@list.ru
9
; project site:    http://www.asmfreaks.com/menuetos
9
; project site:    http://www.coolthemes.narod.ru/pcidev.html
10
;***************************************************************
10
;***************************************************************
11
;Summary: This program will attempt to scan the PCI Bus
11
;Summary: This program will attempt to scan the PCI Bus
12
;        and display basic information about each device
12
;        and display basic information about each device
13
;        connected to the PCI Bus.
13
;        connected to the PCI Bus.
14
;***************************************************************
14
;***************************************************************
15
;HISTORY:
15
;HISTORY:
16
;keep dates in european format (dd/mm/yyyy), please
16
;keep dates in european format (dd/mm/yyyy), please
17
; '!' means big changes
17
; '!' means big changes
-
 
18
;
18
; to-do:
19
;to-do:
19
;PCI version should be normalized (0210->02.10)
20
; PCI version should be normalized 0210 -> 02.10 (it is BCD number)
-
 
21
; vendor's website
-
 
22
; more vendors
-
 
23
; device IRQ
-
 
24
; Subsystem id and Subsystem vendor id detection
-
 
25
 
-
 
26
; Full device detection (like "ATI Radeon 9200") will increase app
-
 
27
; size a lot and probably it is function of particular drivers
-
 
28
;----------------------------------------------------------------
-
 
29
;2.0: PCIDEV   30/08/2006
-
 
30
;(it differs a lot from the version 1.0, which was introduced 19 months ago)
-
 
31
;Author:    Marat Zakiyanov aka Mario79 
-
 
32
;           Sergey Kuzmin aka Wildwest 
-
 
33
;Features:
-
 
34
;           added
-
 
35
;                 * Detection of Interface by Mario79
-
 
36
;                 * 122 vendor id's by Wildwest
-
 
37
;                 * Description is based on Class, SubClass and Interface now (PCI 3.0) by Wildwest
20
;----------------------------------------------------------------
38
;----------------------------------------------------------------
21
;1.31: PCIDEV   13/05/2006
39
;1.31: PCIDEV   13/05/2006
22
;Author:    Jason Delozier 
40
;Author:    Jason Delozier 
23
;Features:
41
;Features:
24
;           fixed
42
;           fixed
Line 36... Line 54...
36
;Author:    Sergey Kuzmin aka Wildwest 
54
;Author:    Sergey Kuzmin aka Wildwest 
37
;Features:
55
;Features:
38
;           added
56
;           added
39
;                * 3 new vendor id's (ESS from Madis Kalme and 2 id's
57
;                * 3 new vendor id's (ESS from Madis Kalme and 2 id's
40
;                  forgotten from 1.15 release: Broadcom -SiByte and Chaintech Comp.)
58
;                  forgotten from 1.15 release: Broadcom -SiByte and Chaintech Comp.)
41
;                       changed
59
;           changed
42
;                            * I don't know why other devs (Jason or Victor) changed window style
60
;                * I don't know why other devs (Jason or Victor) changed window style
43
;                  to old ugly one, so I changed it back to skinned type 3.
61
;                  to old ugly one, so I changed it back to skinned type 3.
44
;                * the same goes to the use of macroc.inc - it is enabled again.
62
;                * the same goes to the use of macroc.inc - it is enabled again.
45
;           deleted
63
;           deleted
46
;                * there is no more label "PREVIOUSVERSIONLIST" - id's moved to the
64
;                * there is no more label "PREVIOUSVERSIONLIST" - id's moved to the
47
;                  appropriate parts of global list.
65
;                  appropriate parts of global list.
Line 62... Line 80...
62
;----------------------------------------------------------------
80
;----------------------------------------------------------------
63
;1.25: PCIDEV   02/10/2005
81
;1.25: PCIDEV   02/10/2005
64
;Author:    Sergey Kuzmin aka Wildwest 
82
;Author:    Sergey Kuzmin aka Wildwest 
65
;Features:
83
;Features:
66
;            changed
84
;            changed
67
;                                       * ! Description is based on Class and SubClass
85
;                  * ! Description is based on Class and SubClass
68
;                     now (PCI 3.0). The Names of Classes and SubClasses
86
;                     now (PCI 3.0). The Names of Classes and SubClasses
69
;                     are in the end of Vendors.inc
87
;                     are in the end of Vendors.inc
70
;            deleted
88
;            deleted
71
;                  * label "Descriptions" (names of Classes)
89
;                  * label "Descriptions" (names of Classes)
72
;
90
;
Line 103... Line 121...
103
;                 * detect Revision, Class and Subclass of Device,
121
;                 * detect Revision, Class and Subclass of Device,
104
;                 * and make Description based on Class
122
;                 * and make Description based on Class
105
;-------------------------------------------------------------
123
;-------------------------------------------------------------
106
use32
124
use32
Line 107... Line 125...
107
 
125
 
Line 108... Line 126...
108
	org    0x0
126
  org    0x0
109
 
127
 
110
	db     'MENUET01'; 8 byte id
128
  db     'MENUET01'; 8 byte id
111
	dd     0x01	 ; header version
129
  dd     0x01   ; header version
112
	dd     START	 ; start of code
130
  dd     START   ; start of code
113
	dd     I_END	 ; size of image
131
  dd     I_END   ; size of image
114
	dd     0xFFFF	 ; memory for app = 64 KB
132
  dd     0xFFFF   ; memory for app = 64 KB
Line 115... Line 133...
115
	dd     I_END	 ; esp
133
  dd     I_END   ; esp
116
	dd     0x0 , 0x0 ; I_Param , I_Icon
134
  dd     0x0 , 0x0 ; I_Param , I_Icon
117
 
-
 
Line 118... Line 135...
118
 
135
 
119
include 'macros.inc'
136
 
Line 120... Line 137...
120
include 'vendors.inc'
137
include 'macros.inc'
121
include 'lang.inc'
138
include 'VENDORS.INC'
122
 
139
 
Line 123... Line 140...
123
START:	  ; start of execution
140
START:    ; start of execution
124
     call draw_window
141
     call draw_window
125
 
142
 
126
still:
143
still:
127
    mov  eax,10   ; wait here for event
144
    mov  eax,10   ; wait here for event
128
    int  0x40
145
    int  0x40
Line 129... Line 146...
129
 
146
 
Line 130... Line 147...
130
    cmp  eax,1	 ; redraw request ?
147
    cmp  eax,1   ; redraw request ?
131
    je	red
148
    je  red
132
    cmp  eax,2	 ; key in buffer ?
149
    cmp  eax,2   ; key in buffer ?
133
    je	key
150
    je  key
134
    cmp  eax,3	 ; button in buffer ?
151
    cmp  eax,3   ; button in buffer ?
135
    je	button
152
    je  button
136
 
153
 
137
    jmp  still
154
    jmp  still
138
 
155
 
139
  red:	  ; redraw
156
  red:    ; redraw
140
    mov eax, 9		    ;window redraw requested so get new window coordinates and size
157
    mov eax, 9        ;window redraw requested so get new window coordinates and size
141
    mov ebx, Proc_Info	    ;area to store process information
158
    mov ebx, Proc_Info      ;area to store process information
142
    mov ecx, -1 	    ;
159
    mov ecx, -1       ;
143
    int 0x40		    ;get the process information
160
    int 0x40        ;get the process information
144
    mov eax,[Proc_Info+34]  ;store the window coordinates into the Form Structure
161
    mov eax,[Proc_Info+34]  ;store the window coordinates into the Form Structure
Line 145... Line 162...
145
    mov [Form+2], ax	    ;x start position
162
    mov [Form+2], ax      ;x start position
146
    mov eax,[Proc_Info+38]  ;
163
    mov eax,[Proc_Info+38]  ;
147
    mov [Form+6],ax	    ;ystart position
164
    mov [Form+6],ax      ;ystart position
148
    mov eax,[Proc_Info+42]  ;
165
    mov eax,[Proc_Info+42]  ;
149
    mov [Form],ax	    ;window width
166
    mov [Form],ax      ;window width
150
    mov eax,[Proc_Info+46]  ;
167
    mov eax,[Proc_Info+46]  ;
151
    mov [Form+4] ,ax	    ;window height
168
    mov [Form+4] ,ax      ;window height
Line 152... Line 169...
152
    call draw_window	    ;go redraw window now
169
    call draw_window      ;go redraw window now
153
    jmp  still
170
    jmp  still
Line 154... Line 171...
154
 
171
 
155
  key:	  ; key
172
  key:    ; key
156
    mov  eax,2	 ; just read it and ignore
173
    mov  eax,2   ; just read it and ignore
Line 185... Line 202...
185
draw_window:
202
draw_window:
Line 186... Line 203...
186
 
203
 
Line 187... Line 204...
187
    mov byte [total],0
204
    mov byte [total],0
188
 
205
 
189
    mov  eax,12      ; function 12:tell os about windowdraw
206
    mov  eax,12      ; function 12:tell os about windowdraw
190
    mov  ebx,1	     ; 1, start of draw
207
    mov  ebx,1       ; 1, start of draw
191
    int  0x40
208
    int  0x40
192
    ; DRAW WINDOW
209
    ; DRAW WINDOW
193
    mov  eax,0			   ; function 0 : define and draw window
210
    mov  eax,0         ; function 0 : define and draw window
194
    mov  ebx, dword [Form]	   ; x/width of window
211
    mov  ebx, dword [Form]     ; x/width of window
195
    mov  ecx, dword [Form+4]	   ; y/height of window
212
    mov  ecx, dword [Form+4]     ; y/height of window
196
    mov  edx,0x03ffffff 	   ; color of work area RRGGBB,8->color gl
213
    mov  edx,0x03ffffff      ; color of work area RRGGBB,8->color gl
197
    mov  esi,0x805080d0 	   ; color of grab bar  RRGGBB,8->color gl
214
    mov  esi,0x805080d0      ; color of grab bar  RRGGBB,8->color gl
198
    mov  edi,0x005080d0 	   ; color of frames    RRGGBB
215
    mov  edi,0x005080d0      ; color of frames    RRGGBB
199
    int  0x40			   ; draw the window
216
    int  0x40         ; draw the window
200
    ; WINDOW LABEL
217
    ; WINDOW LABEL
201
    mov  eax,4			   ; function 4 : write text to window
218
    mov  eax,4         ; function 4 : write text to window
202
    mov  ebx,8*65536+8		   ; [x start] *65536 + [y start]
219
    mov  ebx,8*65536+8       ; [x start] *65536 + [y start]
203
    mov  ecx,0x10ddeeff 	   ; font 1 & color ( 0xF0RRGGBB )
220
    mov  ecx,0x10ddeeff      ; font 1 & color ( 0xF0RRGGBB )
204
    mov  edx,labelt		   ; pointer to text beginning
221
    mov  edx,labelt       ; pointer to text beginning
Line 205... Line 222...
205
    mov  esi,labellen-labelt	   ; text length
222
    mov  esi,labellen-labelt     ; text length
206
    int  0x40
223
    int  0x40
207
 
224
 
208
    ;draw captions to window
225
    ;draw captions to window
209
    mov ebx, 20*65536+25	   ;x start, ystart of text
226
    mov ebx, 20*65536+25     ;x start, ystart of text
210
    mov ecx, 0x224466		   ;color of text
227
    mov ecx, 0x224466       ;color of text
211
    mov edx, dword PCIWin	   ;start of text buffer
228
    mov edx, dword PCIWin     ;start of text buffer
212
    mov esi, 106		   ;lenght of line
229
    mov esi, 106             ;lenght of line  106
213
newline:			   ;
230
newline:         ;
214
    mov eax, 4			   ;draw text system function
231
    mov eax, 4         ;draw text system function
215
    int 0x40			   ;draw the text
232
    int 0x40         ;draw the text
216
    add ebx, 10 		   ;one line down
233
    add ebx, 10        ;one line down
Line 217... Line 234...
217
    add edx, esi		   ;add lenght of line to offset of text buffer
234
    add edx, esi       ;add lenght of line to offset of text buffer
218
    cmp byte[edx], byte 'x'	   ;is it the end of buffer?
235
    cmp byte[edx], byte 'x'     ;is it the end of buffer?
219
    jne newline 		   ;if not draw another line of text
236
    jne newline        ;if not draw another line of text
220
 
237
 
221
    ;Insert horizontal bars  in list area
238
    ;Insert horizontal bars  in list area
222
    mov eax, 13 		   ;draw bar system function
239
    mov eax, 13        ;draw bar system function
223
    mov ebx, 18 		   ;set Xstart position of bar
240
    mov ebx, 18        ;set Xstart position of bar
224
    shl ebx, 16 		   ;
241
    shl ebx, 16        ;
225
    mov bx,word [Form]		   ;get width of window
242
    mov bx,word [Form]       ;get width of window
226
    sub bx, 32			   ;bar is 32 pixels shorter then window width
243
    sub bx, 32         ;bar is 32 pixels shorter then window width
227
    mov ecx, 109*65536+10	   ;set Ystart(109) and Height(10) of bar
244
    mov ecx, 119*65536+10     ;set Ystart(109) and Height(10) of bar   109
228
    mov edx, 0xb6b6b6		   ;set color of bar
245
    mov edx, 0xC0C0C0       ;set color of bar
229
   again:			   ;begin draw bar loop
246
   again:         ;begin draw bar loop
230
    int 0x40			   ;draw bar to window area
247
    int 0x40         ;draw bar to window area
231
    shr ecx, 16 		   ;move the Ystart position to working area
248
    shr ecx, 16        ;move the Ystart position to working area
232
    add ecx, 34 		   ;add 34 pixels to Y Start (moves bar down)
249
    add ecx, 34        ;add 34 pixels to Y Start (moves bar down)
233
    cmp cx,word [Form+4]	   ;is the Ystart position outside of window area
250
    cmp cx,word [Form+4]     ;is the Ystart position outside of window area
234
    jae nomo			   ;if so stop drawing bars
251
    jae nomo         ;if so stop drawing bars
235
    sub ecx, 14 		   ;if not, we only need 20 pixels between bar tops
252
    sub ecx, 14        ;if not, we only need 20 pixels between bar tops
Line 236... Line 253...
236
    shl ecx, 16 		   ;set that values as Ystart
253
    shl ecx, 16        ;set that values as Ystart
237
    add ecx, 10 		   ;Bar Height is always 10 pixels
254
    add ecx, 10        ;Bar Height is always 10 pixels
238
    jmp again			   ;draw another bar
255
    jmp again         ;draw another bar
239
   nomo:			   ;done drawing bars here
256
   nomo:         ;done drawing bars here
240
 
257
 
241
    ;start PCI stuff
258
    ;start PCI stuff
242
    call Get_PCI_Info		   ;get pci version and last bus
259
    call Get_PCI_Info       ;get pci version and last bus
243
    mov cx,word [PCI_Version]	   ;number to draw
260
    mov cx,word [PCI_Version]     ;number to draw
244
    mov eax, 47 		   ;draw number system function
261
    mov eax, 47        ;draw number system function
245
    xor esi, esi		   ;color of text
262
    xor esi, esi       ;color of text
246
    mov ebx, 0x00040100 	   ;4 digits to draw in hex format
263
    mov ebx, 0x00040100      ;4 digits to draw in hex format
247
    mov edx, 110*65536+45	   ;x/y start position of number
264
    mov edx, 110*65536+45     ;x/y start position of number
248
    int 0x40			   ;draw pci version to window
265
    int 0x40         ;draw pci version to window
249
    mov cl,byte [PCI_LastBus]	   ;number to draw
266
    mov cl,byte [PCI_LastBus]     ;number to draw
250
    mov ebx, 0x00020100 	   ;2 digits hex format
267
    mov ebx, 0x00020100      ;2 digits hex format
251
    add edx, 10 		   ;one line below pci version
268
    add edx, 10        ;one line below pci version
252
    int 0x40			   ;draw the last bus to window
269
    int 0x40         ;draw the last bus to window
253
 
270
 
254
    call scan_Pci		   ;scan for and draw each pci device
271
    call scan_Pci       ;scan for and draw each pci device
255
 
272
 
256
    movzx ecx, byte [total]	   ;number to draw
273
    movzx ecx, byte [total]     ;number to draw
Line 257... Line 274...
257
    mov eax, 47 		   ;draw number system function
274
    mov eax, 47        ;draw number system function
258
    mov ebx, 0x00020000 	   ;2 digits to draw in decimal format
275
    mov ebx, 0x00020000      ;2 digits to draw in decimal format
259
    xor esi, esi		   ;color of text
276
    xor esi, esi       ;color of text
Line 260... Line 277...
260
    mov edx, 150*65536+65	   ;x/y position to draw to
277
    mov edx, 150*65536+65     ;x/y position to draw to
261
    int 0x40			   ;draw total number of devices to window
278
    int 0x40         ;draw total number of devices to window
262
 
279
 
263
    mov  eax,12 		   ; function 12:tell os about windowdraw
280
    mov  eax,12        ; function 12:tell os about windowdraw
Line 264... Line 281...
264
    mov  ebx,2			   ; 2, end of draw
281
    mov  ebx,2         ; 2, end of draw
265
    int  0x40
282
    int  0x40
266
 
283
 
267
    ret
284
    ret
268
;   ***********************************************
285
;   ***********************************************
269
;   *******  END WINDOW DEFINITIONS & DRAW  *******
286
;   *******  END WINDOW DEFINITIONS & DRAW  *******
270
;   ***********************************************
287
;   ***********************************************
Line 286... Line 303...
286
 
303
 
287
 
304
 
288
;******************************************************
305
;******************************************************
289
;* Get all devices on PCI Bus
306
;* Get all devices on PCI Bus
290
scan_Pci:
307
scan_Pci:
291
   cmp	byte [PCI_LastBus],0xff ;0xFF means no pci bus found
308
   cmp  byte [PCI_LastBus],0xff ;0xFF means no pci bus found
292
   jne	Pci_Exists		;
309
   jne  Pci_Exists    ;
293
   ret				;if no bus then leave
310
   ret        ;if no bus then leave
294
Pci_Exists:
311
Pci_Exists:
295
   mov	byte [V_Bus], 0 	;reset varibles
312
   mov  byte [V_Bus], 0   ;reset varibles
296
   mov	byte [V_Dev], 0 	;
313
   mov  byte [V_Dev], 0   ;
297
   mov	edx,  20*65536+110	;set start write position
314
   mov  edx,  20*65536+110  ;set start write position
298
Start_Enum:
315
Start_Enum:
299
   mov	bl, 6			;get a dword
316
   mov  bl, 6      ;get a dword
300
   mov	bh, byte [V_Bus]	;bus of pci device
317
   mov  bh, byte [V_Bus]  ;bus of pci device
301
   mov	ch, byte [V_Dev]	;device number/function
318
   mov  ch, byte [V_Dev]  ;device number/function
302
   mov	cl, 0			;offset to device/vendor id
319
   mov  cl, 0      ;offset to device/vendor id
303
   mov	eax, 62 		;pci system function
320
   mov  eax, 62     ;pci system function
304
   int	0x40			;get ID's
321
   int  0x40      ;get ID's
305
 
322
 
306
   cmp	ax, 0			;Vendor ID should not be 0 or 0xFFFF
323
   cmp  ax, 0      ;Vendor ID should not be 0 or 0xFFFF
307
   je	nextDev 		;check next device if nothing exists here
324
   je  nextDev     ;check next device if nothing exists here
308
   cmp	ax, 0xffff		;
325
   cmp  ax, 0xffff    ;
309
   je	nextDev 		;
326
   je  nextDev     ;
310
 
327
 
311
   mov	word [PCI_Vendor], ax	;There is a device here, save the ID's
328
   mov  word [PCI_Vendor], ax  ;There is a device here, save the ID's
312
   shr	eax, 16 		;
329
   shr  eax, 16     ;
313
   mov	word [PCI_Device], ax	;
330
   mov  word [PCI_Device], ax  ;
314
   mov	eax, 62 		;PCI Sys Function
331
   mov  eax, 62     ;PCI Sys Function
315
   mov	bl, 4			;Read config byte
332
   mov  bl, 4      ;Read config byte
316
   mov	bh, byte [V_Bus]	;Bus #
333
   mov  bh, byte [V_Bus]  ;Bus #
317
   mov	ch, byte [V_Dev]	;Device # on bus
334
   mov  ch, byte [V_Dev]  ;Device # on bus
318
   mov	cl, 0x08		;Register to read (Get Revision)
335
   mov  cl, 0x08    ;Register to read (Get Revision)
319
   int	0x40			;Read it
336
   int  0x40      ;Read it
320
   mov	byte [PCI_Rev], al	;Save it
337
   mov  byte [PCI_Rev], al  ;Save it
321
   mov	eax, 62 		;PCI Sys Function
338
   mov  eax, 62     ;PCI Sys Function
322
   mov	cl, 0x0b		;Register to read (Get class)
339
   mov  cl, 0x0b    ;Register to read (Get class)
323
   int	0x40			;Read it
340
   int  0x40      ;Read it
324
   mov	byte [PCI_Class], al	;Save it
341
   mov  byte [PCI_Class], al  ;Save it
325
   mov	eax, 62 		;PCI Sys Function
342
   mov  eax, 62     ;PCI Sys Function
326
   mov	cl, 0x0a		;Register to read (Get Subclass)
343
   mov  cl, 0x0a    ;Register to read (Get Subclass)
-
 
344
   int  0x40      ;Read it
-
 
345
   mov  byte [PCI_SubClass], al ;Save it
-
 
346
; from Mario79 august 2006
-
 
347
   mov  eax, 62      ;PCI Sys Function
-
 
348
   mov  cl, 0x09      ;Register to read (Get Interface)
-
 
349
   int  0x40          ;Read it
327
   int	0x40			;Read it
350
   mov  [PCI_Interface], al ;Save it
328
   mov	byte [PCI_SubClass], al ;Save it
351
;
329
   inc	byte [total]		;one more device found
352
   inc  byte [total]    ;one more device found
330
   call Print_New_Device	;print device info to screen
353
   call Print_New_Device  ;print device info to screen
331
nextDev:
354
nextDev:
332
   inc	byte [V_Dev]		;next device on this bus
355
   inc  byte [V_Dev]    ;next device on this bus
333
   jnz	Start_Enum		;jump until we reach zero
356
   jnz  Start_Enum    ;jump until we reach zero
334
				;(used to be JNO which caused bug!!! 30-4-2006, JMD)
357
        ;(used to be JNO which caused bug!!! 30-4-2006, JMD)
335
   mov	byte [V_Dev], 0 	;reset device number
358
   mov  byte [V_Dev], 0   ;reset device number
336
   inc	byte [V_Bus]		;next bus
359
   inc  byte [V_Bus]    ;next bus
337
   mov	al, byte [PCI_LastBus]	;get last bus
360
   mov  al, byte [PCI_LastBus]  ;get last bus
338
   cmp	byte [V_Bus], al	;was it last bus
361
   cmp  byte [V_Bus], al  ;was it last bus
339
   jbe	Start_Enum		;if not jump to keep searching
362
   jbe  Start_Enum    ;if not jump to keep searching
Line 340... Line 363...
340
ret
363
ret
341
;******************************************************
364
;******************************************************
342
 
365
 
343
 
366
 
344
 
367
 
345
;******************************************************
368
;******************************************************
346
;* Print device info to screen
369
;* Print device info to screen
347
Print_New_Device:
370
Print_New_Device:
348
   mov	 eax, 47		;Write number to screen system function
371
   mov   eax, 47    ;Write number to screen system function
349
   mov	 ebx, 0x00040100	;4 byte number, print in hexidecimal
372
   mov   ebx, 0x00040100  ;4 byte number, print in hexidecimal
350
   xor	 esi, esi              	;Color of text
373
   xor   esi, esi                ;Color of text
351
   movzx ecx,word [PCI_Vendor]	;Pointer to number to be written
374
   movzx ecx,word [PCI_Vendor]  ;Pointer to number to be written
352
   int	 0x40			;Write Vendor ID
375
   int   0x40      ;Write Vendor ID
353
   and	 edx, 0xFFFF		;*****************************************
376
   and   edx, 0xFFFF    ;*****************************************
354
   or	 edx, 54*65536		;X start becomes 54
377
   or   edx, 54*65536    ;X start becomes 54
355
   movzx ecx,word [PCI_Device]	;get Vendor ID
378
   movzx ecx,word [PCI_Device]  ;get Vendor ID
356
   int	 0x40			;Draw Vendor ID to Window
379
   int   0x40      ;Draw Vendor ID to Window
357
   mov	 ebx, 0x00020100	;2 digit number, in hexidecimal format
380
   mov   ebx, 0x00020100  ;2 digit number, in hexidecimal format
358
   and	 edx, 0xFFFF		;*****************************************
381
   and   edx, 0xFFFF    ;*****************************************
359
   or	 edx, 98*65536		;X start becomes 98
382
   or   edx, 98*65536    ;X start becomes 98
360
   movzx ecx,byte [V_Bus]	;get bus number
383
   movzx ecx,byte [V_Bus]  ;get bus number
361
   int	 0x40			;draw bus number to screen
384
   int   0x40      ;draw bus number to screen
362
   and	 edx, 0xFFFF		;*****************************************
385
   and   edx, 0xFFFF    ;*****************************************
363
   or	 edx, 128*65536 	;X start becomes 128
386
   or   edx, 128*65536   ;X start becomes 128
364
   movzx ecx,byte [V_Dev]	;get device number
387
   movzx ecx,byte [V_Dev]  ;get device number
365
   shr	 ecx, 3 		;device number is bits 3-7
388
   shr   ecx, 3     ;device number is bits 3-7
366
   int	 0x40			;Draw device Number To Window
389
   int   0x40      ;Draw device Number To Window
367
   and	 edx, 0xFFFF		;*****************************************
390
   and   edx, 0xFFFF    ;*****************************************
368
   or	 edx, 155*65536 	;X start becomes 155
391
   or   edx, 155*65536   ;X start becomes 155
369
   movzx ecx, byte [V_Dev]	;get Function number
392
   movzx ecx, byte [V_Dev]  ;get Function number
370
   and	 ecx, 7 		;function is first 3 bits
393
   and   ecx, 7     ;function is first 3 bits
371
   int	 0x40			;Draw Function Number To Window
394
   int   0x40      ;Draw Function Number To Window
372
   and	 edx, 0xFFFF		;*****************************************
395
   and   edx, 0xFFFF    ;*****************************************
373
   or	 edx, 179*65536 	;X start becomes 179
396
   or   edx, 179*65536   ;X start becomes 179
374
   movzx ecx,byte [PCI_Rev]	;get revision number
397
   movzx ecx,byte [PCI_Rev]  ;get revision number
375
   int	 0x40			;Draw Revision to screen
398
   int   0x40      ;Draw Revision to screen
376
   and	 edx, 0xFFFF		;*****************************************
399
   and   edx, 0xFFFF    ;*****************************************
377
   or	 edx, 215*65536 	;X start becomes 215
400
   or   edx, 215*65536   ;X start becomes 215
378
   movzx ecx,byte [PCI_Class]	;get PCI_Class
401
   movzx ecx,byte [PCI_Class]  ;get PCI_Class
-
 
402
   int   0x40      ;Draw Class to screen
-
 
403
   and   edx, 0xFFFF    ;*****************************************
-
 
404
   or   edx, 250*65536   ;X start becomes 250
-
 
405
   movzx ecx,byte [PCI_SubClass];get sub class
-
 
406
   int   0x40      ;Draw Sub Class to screen
-
 
407
; from Mario79 august 2006
379
   int	 0x40			;Draw Class to screen
408
   and     edx, 0xFFFF          ;*****************************************
380
   and	 edx, 0xFFFF		;*****************************************
409
   or      edx, 280*65536       ;X start becomes 280
381
   or	 edx, 266*65536 	;X start becomes 266
410
   movzx ecx, [PCI_Interface]   ;get Interface
Line 382... Line 411...
382
   movzx ecx,byte [PCI_SubClass];get sub class
411
   int   0x40
383
   int	 0x40			;Draw Sub Class to screen
412
;
384
   ;Write Names
413
   ;Write Names
385
   movzx ebx, dx		;Set y position
414
   movzx ebx, dx    ;Set y position
Line 393... Line 422...
393
;
422
;
394
; Modified on 30-04-2006 by JMD for size
423
; Modified on 30-04-2006 by JMD for size
395
;-----------------------------------------------------------------------------
424
;-----------------------------------------------------------------------------
396
    ;first determine which list to find the vendor in
425
    ;first determine which list to find the vendor in
397
    mov ax, word [PCI_Vendor]
426
    mov ax, word [PCI_Vendor]
398
    mov ecx, 255	   ;# vendors in most lists
427
    mov ecx, 255     ;# vendors in most lists
399
    cmp ax,4800 	   ;Check if Vendor's value is less than this number
428
    cmp ax,4540      ;Check if Vendor's value is less than this number (the start of next part)
400
    jae next1		   ;if it is less, let's continue, or jump to next1
429
    jae next1       ;if it is less, let's continue, or jump to next1
401
      mov edx, _FIRSTPART  ;select this list
430
      mov edx, _FIRSTPART  ;select this list
402
      jmp rep1		   ;start searching list
431
      jmp rep1       ;start searching list
403
  next1:		   ;
432
  next1:       ;
404
    cmp ax,5314 	   ;same thing happening here as above^
433
    cmp ax,5120        ;same thing happening here as above^
405
    jae next2		   ;
434
    jae next2       ;
406
      mov edx, _SECONDPART ;
435
      mov edx, _SECONDPART ;
407
      jmp rep1		   ;
436
      jmp rep1       ;
408
  next2:		   ;
437
  next2:       ;
409
    cmp ax,5574 	   ;
438
    cmp ax,5459      ;
410
    jae next3		   ;
439
    jae next3       ;
411
      mov edx, _THIRDPART  ;
440
      mov edx, _THIRDPART  ;
412
      jmp rep1		   ;
441
      jmp rep1       ;
413
  next3:		   ;
442
  next3:       ;
414
      mov ecx, 110	   ;only 110 vendors in this list
443
      mov ecx, 222     ;only 222 vendors in this list
415
      mov edx, _FOURTHPART ;
444
      mov edx, _FOURTHPART ;
Line 416... Line 445...
416
 
445
 
417
  rep1:
446
  rep1:
418
   cmp ax,word[edx+50]	   ;are Vendor ID's the same?
447
   cmp ax,word[edx+50]     ;are Vendor ID's the same?
419
   je  ex		   ;if so jump to print the description to screen
448
   je  ex       ;if so jump to print the description to screen
420
   add edx, 52		   ;if not put us at start of next description
449
   add edx, 52       ;if not put us at start of next description
421
   dec ecx		   ;one less description in list
450
   dec ecx       ;one less description in list
422
   jnz rep1		   ;was it our last?
451
   jnz rep1       ;was it our last?
Line 423... Line 452...
423
   mov edx, _UNKNOWN	   ;if so we dont know this Vendor
452
   mov edx, _UNKNOWN     ;if so we dont know this Vendor
424
 
453
 
425
 ex:
454
 ex:
426
  ;lets print the vendor Name
455
  ;lets print the vendor Name
427
   xor ecx, ecx 	   ;font color
456
   xor ecx, ecx      ;font color
428
   mov eax,4		   ;OS CMD
457
   mov eax,4       ;OS CMD
429
   mov esi,50		   ;Length of text
-
 
Line 430... Line 458...
430
   int 0x40		   ;Print the text
458
   mov esi,50       ;Length of text
431
;------------------------------------------------------------------
459
   int 0x40       ;Print the text
432
 
460
 
433
;------------------------------------------------------------------
461
;------------------------------------------------------------------
434
;Get description based on Class/Subclass
462
;Get description based on Class/Subclass
435
   cmp	 byte [PCI_Class], 11h	  ;we only know of 17 classes
463
   cmp   byte [PCI_Class], 11h    ;we only know of 17 classes
436
   ja	 endd			  ;if its more then, its unknown to us, so jump
464
   ja   endd        ;if its more then, its unknown to us, so jump
437
   movzx eax, byte [PCI_Class]	  ;load our class
465
   movzx eax, byte [PCI_Class]    ;load our class
-
 
466
   shl   eax, 3       ;multiply for jump table
438
   shl	 eax, 3 		  ;multiply for jump table
467
   mov   ecx, [ClassList+eax+4]   ;number of descriptions for this class
-
 
468
   mov   edx, [ClassList+eax]    ;start of description list for class
439
   mov	 ecx, [ClassList+eax+4]   ;number of descriptions for this class
469
 
440
   mov	 edx, [ClassList+eax]	  ;start of description list for class
470
   mov   al, byte [PCI_SubClass] ;get subclass
441
   movzx eax, byte [PCI_SubClass] ;get subclass
471
  ; mov   ah, byte [PCI_Interface] ;get subclass
442
 repu1:
472
 repu1:
443
   cmp	 al,byte[edx+32]	  ;are subclasses the same?
473
   cmp   al,byte[edx+32]    ;are subclasses the same?
444
   je	 endd			  ;if so jump to print the description to screen
474
   je   interface_check          ;if so jump to print the description to screen
445
   add	 edx, 33		  ;if not put us at start of next description
475
   add   edx, 33      ;if not put us at start of next description
-
 
476
   dec   ecx        ;one less description in list
-
 
477
   jnz   repu1        ;was it our last?
-
 
478
   mov   edx,_UNKNOWND      ;if so its unknown device
-
 
479
   jmp endd
-
 
480
 
-
 
481
 interface_check:
-
 
482
 
-
 
483
 cmp [PCI_Class], 00h
-
 
484
 je endd
-
 
485
 
-
 
486
;////////////////////////////
-
 
487
 cmp [PCI_Class], 01h
-
 
488
 je check01
-
 
489
 jmp nextclass02
-
 
490
 
-
 
491
check01:
-
 
492
 cmp [PCI_SubClass], 05h
-
 
493
 je sc01_05
-
 
494
 jmp endd
-
 
495
 
-
 
496
sc01_05:
-
 
497
cmp [PCI_Interface], 20h
-
 
498
je sc01_05_20
-
 
499
cmp [PCI_Interface], 30h
-
 
500
je sc01_05_30
-
 
501
jmp endd
-
 
502
 
-
 
503
 
-
 
504
sc01_05_20:
-
 
505
mov  edx,ata1     ; pointer to text beginning
-
 
506
jmp endd
-
 
507
 
-
 
508
sc01_05_30:
-
 
509
mov  edx,ata2     ; pointer to text beginning
-
 
510
jmp endd
-
 
511
 
-
 
512
 
-
 
513
;////////////////////////////
-
 
514
nextclass02:
-
 
515
 cmp [PCI_Class], 02h
-
 
516
 je endd
-
 
517
;////////////////////////////////
-
 
518
 cmp [PCI_Class], 03h
-
 
519
 je check03
-
 
520
 jmp nextclass04
-
 
521
 
-
 
522
check03:
-
 
523
 cmp [PCI_SubClass], 00h
-
 
524
 je sc03_00
-
 
525
 jmp endd
-
 
526
 
-
 
527
sc03_00:
-
 
528
cmp [PCI_Interface], 00000000b
-
 
529
je sc03_00_00000000
-
 
530
cmp [PCI_Interface], 00000001b
-
 
531
je sc03_00_00000001
-
 
532
;jmp endd
-
 
533
 
-
 
534
 
-
 
535
sc03_00_00000000:
-
 
536
mov  edx,display1     ; pointer to text beginning
-
 
537
jmp endd
-
 
538
 
-
 
539
sc03_00_00000001:
-
 
540
mov  edx,display2     ; pointer to text beginning
-
 
541
jmp endd
-
 
542
;///////////////////////////////
-
 
543
nextclass04:
-
 
544
 cmp [PCI_Class], 04h
-
 
545
 je endd
-
 
546
 
-
 
547
 cmp [PCI_Class], 05h
-
 
548
 je endd
-
 
549
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
550
 cmp [PCI_Class], 06h
-
 
551
 
-
 
552
 je check06
-
 
553
 jmp nextclass07
-
 
554
 
-
 
555
check06:
-
 
556
 cmp [PCI_SubClass], 04h
-
 
557
 je sc06_04
-
 
558
 
-
 
559
 cmp [PCI_SubClass], 09h
-
 
560
 je sc06_09
-
 
561
 jmp endd
-
 
562
 
-
 
563
sc06_04:
-
 
564
cmp [PCI_Interface], 00h
-
 
565
je sc06_04_00
-
 
566
cmp [PCI_Interface], 01h
-
 
567
je sc06_04_01
-
 
568
jmp endd
-
 
569
 
-
 
570
 
-
 
571
sc06_04_00:
-
 
572
mov  edx,bridge1     ; pointer to text beginning
-
 
573
jmp endd
-
 
574
 
-
 
575
sc06_04_01:
-
 
576
mov  edx,bridge2     ; pointer to text beginning
-
 
577
jmp endd
-
 
578
 
-
 
579
;======================================
-
 
580
 
-
 
581
sc06_09:
-
 
582
cmp [PCI_Interface], 40h
-
 
583
je sc06_09_40
-
 
584
cmp [PCI_Interface], 80h
-
 
585
je sc06_09_80
-
 
586
jmp endd
-
 
587
 
-
 
588
 
-
 
589
sc06_09_40:
-
 
590
mov  edx,bridge3     ; pointer to text beginning
-
 
591
jmp endd
-
 
592
 
-
 
593
sc06_09_80:
-
 
594
mov  edx,bridge4     ; pointer to text beginning
-
 
595
jmp endd
-
 
596
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
597
nextclass07:
-
 
598
 cmp [PCI_Class], 07h
-
 
599
 je check07
-
 
600
 jmp nextclass08
-
 
601
 
-
 
602
check07:
-
 
603
 cmp [PCI_SubClass], 00h
-
 
604
 je sc07_00
-
 
605
 
-
 
606
 cmp [PCI_SubClass], 01h
-
 
607
 je sc07_01
-
 
608
 
-
 
609
 cmp [PCI_SubClass], 03h
-
 
610
 je sc07_03
-
 
611
 jmp endd
-
 
612
 
-
 
613
;=
-
 
614
sc07_00:
-
 
615
cmp [PCI_Interface], 00h
-
 
616
je sc07_00_00
-
 
617
cmp [PCI_Interface], 01h
-
 
618
je sc07_00_01
-
 
619
cmp [PCI_Interface], 02h
-
 
620
je sc07_00_02
-
 
621
cmp [PCI_Interface], 03h
-
 
622
je sc07_00_03
-
 
623
cmp [PCI_Interface], 04h
-
 
624
je sc07_00_04
-
 
625
cmp [PCI_Interface], 05h
-
 
626
je sc07_00_05
-
 
627
cmp [PCI_Interface], 06h
-
 
628
je sc07_00_06
-
 
629
 
-
 
630
 
-
 
631
sc07_00_00:
-
 
632
mov  edx,communication0    ; pointer to text beginning
-
 
633
jmp endd
-
 
634
 
-
 
635
sc07_00_01:
-
 
636
mov  edx,communication1     ; pointer to text beginning
-
 
637
jmp endd
-
 
638
 
-
 
639
sc07_00_02:
-
 
640
mov  edx,communication2     ; pointer to text beginning
-
 
641
jmp endd
-
 
642
 
-
 
643
sc07_00_03:
-
 
644
mov  edx,communication3     ; pointer to text beginning
-
 
645
jmp endd
-
 
646
 
-
 
647
sc07_00_04:
-
 
648
mov  edx,communication4     ; pointer to text beginning
-
 
649
jmp endd
-
 
650
 
-
 
651
sc07_00_05:
-
 
652
mov  edx,communication5     ; pointer to text beginning
-
 
653
jmp endd
-
 
654
 
-
 
655
sc07_00_06:
-
 
656
mov  edx,communication6     ; pointer to text beginning
-
 
657
jmp endd
-
 
658
;=
-
 
659
sc07_01:
-
 
660
cmp [PCI_Interface], 00h
-
 
661
je sc07_01_00
-
 
662
cmp [PCI_Interface], 01h
-
 
663
je sc07_01_01
-
 
664
cmp [PCI_Interface], 02h
-
 
665
je sc07_01_02
-
 
666
cmp [PCI_Interface], 03h
-
 
667
je sc07_01_03
-
 
668
cmp [PCI_Interface], $FE
-
 
669
je sc07_01_FE
-
 
670
 
-
 
671
 
-
 
672
sc07_01_00:
-
 
673
mov  edx,communication7    ; pointer to text beginning
-
 
674
jmp endd
-
 
675
 
-
 
676
sc07_01_01:
-
 
677
mov  edx,communication8     ; pointer to text beginning
-
 
678
jmp endd
-
 
679
 
-
 
680
sc07_01_02:
-
 
681
mov  edx,communication9     ; pointer to text beginning
-
 
682
jmp endd
-
 
683
 
-
 
684
sc07_01_03:
-
 
685
mov  edx,communication10     ; pointer to text beginning
-
 
686
jmp endd
-
 
687
 
-
 
688
sc07_01_FE:
-
 
689
mov  edx,communication11     ; pointer to text beginning
-
 
690
jmp endd
-
 
691
 
-
 
692
 
-
 
693
;=
-
 
694
sc07_03:
-
 
695
cmp [PCI_Interface], 00h
-
 
696
je sc07_03_00
-
 
697
cmp [PCI_Interface], 01h
-
 
698
je sc07_03_01
-
 
699
cmp [PCI_Interface], 02h
-
 
700
je sc07_03_02
-
 
701
cmp [PCI_Interface], 03h
-
 
702
je sc07_03_03
-
 
703
cmp [PCI_Interface], 04h
-
 
704
je sc07_03_04
-
 
705
 
-
 
706
 
-
 
707
sc07_03_00:
-
 
708
mov  edx,communication12    ; pointer to text beginning
-
 
709
jmp endd
-
 
710
 
-
 
711
sc07_03_01:
-
 
712
mov  edx,communication13     ; pointer to text beginning
-
 
713
jmp endd
-
 
714
 
-
 
715
sc07_03_02:
-
 
716
mov  edx,communication14     ; pointer to text beginning
-
 
717
jmp endd
-
 
718
 
-
 
719
sc07_03_03:
-
 
720
mov  edx,communication15     ; pointer to text beginning
-
 
721
jmp endd
-
 
722
 
-
 
723
sc07_03_04:
-
 
724
mov  edx,communication16     ; pointer to text beginning
-
 
725
jmp endd
-
 
726
 
-
 
727
 
-
 
728
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
729
nextclass08:
-
 
730
cmp [PCI_Class], 08h
-
 
731
je check08
-
 
732
jmp nextclass09
-
 
733
 
-
 
734
check08:
-
 
735
 cmp [PCI_SubClass], 00h
-
 
736
 je sc08_00
-
 
737
 cmp [PCI_SubClass], 01h
-
 
738
 je sc08_01
-
 
739
 cmp [PCI_SubClass], 02h
-
 
740
 je sc08_02
-
 
741
 cmp [PCI_SubClass], 03h
-
 
742
 je sc08_03
-
 
743
 jmp endd
-
 
744
;--
-
 
745
sc08_00:
-
 
746
cmp [PCI_Interface], 00h
-
 
747
je sc08_00_00
-
 
748
cmp [PCI_Interface], 01h
-
 
749
je sc08_00_01
-
 
750
cmp [PCI_Interface], 02h
-
 
751
je sc08_00_02
-
 
752
cmp [PCI_Interface], 10h
-
 
753
je sc08_00_10
-
 
754
cmp [PCI_Interface], 20h
-
 
755
je sc08_00_20
-
 
756
jmp endd
-
 
757
 
-
 
758
 
-
 
759
sc08_00_00:
-
 
760
mov  edx,system0     ; pointer to text beginning
-
 
761
jmp endd
-
 
762
 
-
 
763
sc08_00_01:
-
 
764
mov  edx,system1     ; pointer to text beginning
-
 
765
jmp endd
-
 
766
 
-
 
767
sc08_00_02:
-
 
768
mov  edx,system2     ; pointer to text beginning
-
 
769
jmp endd
-
 
770
 
-
 
771
sc08_00_10:
-
 
772
mov  edx,system3     ; pointer to text beginning
-
 
773
jmp endd
-
 
774
 
-
 
775
sc08_00_20:
-
 
776
mov  edx,system4    ; pointer to text beginning
-
 
777
jmp endd
-
 
778
 
-
 
779
;--
-
 
780
 
-
 
781
sc08_01:
-
 
782
cmp [PCI_Interface], 00h
-
 
783
je sc08_01_00
-
 
784
cmp [PCI_Interface], 01h
-
 
785
je sc08_01_01
-
 
786
cmp [PCI_Interface], 02h
-
 
787
je sc08_01_02
-
 
788
jmp endd
-
 
789
 
-
 
790
 
-
 
791
sc08_01_00:
-
 
792
mov  edx,system5     ; pointer to text beginning
-
 
793
jmp endd
-
 
794
 
-
 
795
sc08_01_01:
-
 
796
mov  edx,system6     ; pointer to text beginning
-
 
797
jmp endd
-
 
798
 
-
 
799
sc08_01_02:
-
 
800
mov  edx,system7     ; pointer to text beginning
-
 
801
jmp endd
-
 
802
 
-
 
803
 
-
 
804
;--
-
 
805
 
-
 
806
sc08_02:
-
 
807
cmp [PCI_Interface], 00h
-
 
808
je sc08_02_00
-
 
809
cmp [PCI_Interface], 01h
-
 
810
je sc08_02_01
-
 
811
cmp [PCI_Interface], 02h
-
 
812
je sc08_02_02
-
 
813
jmp endd
-
 
814
 
-
 
815
 
-
 
816
sc08_02_00:
-
 
817
mov  edx,system8     ; pointer to text beginning
-
 
818
jmp endd
-
 
819
 
-
 
820
sc08_02_01:
-
 
821
mov  edx,system9     ; pointer to text beginning
-
 
822
jmp endd
-
 
823
 
-
 
824
sc08_02_02:
-
 
825
mov  edx,system10     ; pointer to text beginning
-
 
826
jmp endd
-
 
827
 
-
 
828
;--
-
 
829
sc08_03:
-
 
830
cmp [PCI_Interface], 00h
-
 
831
je sc08_03_00
-
 
832
cmp [PCI_Interface], 01h
-
 
833
je sc08_03_01
-
 
834
jmp endd
-
 
835
 
-
 
836
 
-
 
837
sc08_03_00:
-
 
838
mov  edx,system11     ; pointer to text beginning
-
 
839
jmp endd
-
 
840
 
-
 
841
sc08_03_01:
-
 
842
mov  edx,system12     ; pointer to text beginning
-
 
843
jmp endd
-
 
844
 
-
 
845
;--
-
 
846
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
847
nextclass09:
-
 
848
 
-
 
849
 cmp [PCI_Class], 09h
-
 
850
 je check09
-
 
851
 jmp nextclass0A
-
 
852
 
-
 
853
check09:
-
 
854
 cmp [PCI_SubClass], 04h
-
 
855
 je sc09_04
-
 
856
 jmp endd
-
 
857
 
-
 
858
sc09_04:
-
 
859
cmp [PCI_Interface], 00h
-
 
860
je sc09_04_00
-
 
861
cmp [PCI_Interface], 10h
-
 
862
je sc09_04_10
-
 
863
jmp endd
-
 
864
 
-
 
865
 
-
 
866
sc09_04_00:
-
 
867
mov  edx,gameport1     ; pointer to text beginning
-
 
868
jmp endd
-
 
869
 
-
 
870
sc09_04_10:
-
 
871
mov  edx,gameport2     ; pointer to text beginning
-
 
872
jmp endd
-
 
873
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
874
 
-
 
875
nextclass0A:
-
 
876
 cmp [PCI_Class], 0Ah
-
 
877
 je endd
-
 
878
 
-
 
879
 cmp [PCI_Class], 0Bh
-
 
880
 je endd
-
 
881
;============================================
-
 
882
 cmp [PCI_Class], 0Ch
-
 
883
 je check0C
-
 
884
 jmp nextclass0D
-
 
885
 
-
 
886
check0C:
-
 
887
 cmp [PCI_SubClass], 00h
-
 
888
 je sc0C_00
-
 
889
 cmp [PCI_SubClass], 03h
-
 
890
 je sc0C_03
-
 
891
 cmp [PCI_SubClass], 07h
-
 
892
 je sc0C_07
-
 
893
 jmp endd
-
 
894
 ;;;;;;;;;;;
-
 
895
 
-
 
896
sc0C_00:
-
 
897
cmp [PCI_Interface], 00h
-
 
898
je sc0C_00_00
-
 
899
 
-
 
900
cmp [PCI_Interface], 10h
-
 
901
je sc0C_00_10
-
 
902
 
-
 
903
 
-
 
904
 
-
 
905
sc0C_00_00:
-
 
906
mov  edx,serialbus6     ; pointer to text beginning
-
 
907
jmp endd
-
 
908
 
-
 
909
sc0C_00_10:
-
 
910
mov  edx,serialbus7     ; pointer to text beginning
-
 
911
jmp endd
-
 
912
 ;;;;;;;;;;;;;;;;;;;
-
 
913
 
-
 
914
sc0C_03:
-
 
915
cmp [PCI_Interface], 00h
-
 
916
je sc0C_03_00
-
 
917
 
-
 
918
cmp [PCI_Interface], 10h
-
 
919
je sc0C_03_10
-
 
920
 
-
 
921
cmp [PCI_Interface], 20h
-
 
922
je sc0C_03_20
-
 
923
cmp [PCI_Interface], 80h
-
 
924
je sc0C_03_80
-
 
925
 
-
 
926
cmp [PCI_Interface], $FE
-
 
927
je sc0C_03_FE
-
 
928
 
-
 
929
;jmp endd
-
 
930
 
-
 
931
sc0C_03_00:
-
 
932
mov  edx,serialbus1     ; pointer to text beginning
-
 
933
jmp endd
-
 
934
 
-
 
935
sc0C_03_10:
-
 
936
mov  edx,serialbus2     ; pointer to text beginning
-
 
937
jmp endd
-
 
938
 
-
 
939
 
-
 
940
sc0C_03_20:
-
 
941
mov  edx,serialbus3     ; pointer to text beginning
-
 
942
jmp endd
-
 
943
 
-
 
944
sc0C_03_80:
-
 
945
mov  edx,serialbus4     ; pointer to text beginning
-
 
946
jmp endd
-
 
947
 
-
 
948
sc0C_03_FE:
-
 
949
mov  edx,serialbus5     ; pointer to text beginning
-
 
950
jmp endd
-
 
951
 
-
 
952
 ;;;;;;;;;;;
-
 
953
 
-
 
954
sc0C_07:
-
 
955
cmp [PCI_Interface], 00h
-
 
956
je sc0C_07_00
-
 
957
 
-
 
958
cmp [PCI_Interface], 01h
-
 
959
je sc0C_07_01
-
 
960
 
-
 
961
cmp [PCI_Interface], 02h
-
 
962
je sc0C_07_02
-
 
963
 
-
 
964
 
-
 
965
sc0C_07_00:
-
 
966
mov  edx,serialbus8     ; pointer to text beginning
-
 
967
jmp endd
-
 
968
 
-
 
969
sc0C_07_01:
-
 
970
mov  edx,serialbus9     ; pointer to text beginning
-
 
971
jmp endd
-
 
972
 
-
 
973
sc0C_07_02:
-
 
974
mov  edx,serialbus10     ; pointer to text beginning
-
 
975
jmp endd
-
 
976
 ;;;;;;;;;;;;;;;;;;;
-
 
977
;==============================================
-
 
978
nextclass0D:
-
 
979
 cmp [PCI_Class], 0Dh
-
 
980
 je endd
-
 
981
;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
982
cmp [PCI_Class], 0Eh
-
 
983
je check0E
-
 
984
jmp nextclass0F
-
 
985
 
-
 
986
check0E:
-
 
987
 cmp [PCI_SubClass], 00h
-
 
988
 je sc0E_00
-
 
989
 jmp endd
-
 
990
 
-
 
991
sc0E_00:
-
 
992
cmp [PCI_Interface], 00h
-
 
993
je sc0E_00_00
-
 
994
cmp [PCI_Interface], 00h   ;!!!
-
 
995
ja sc0E_00_xx
-
 
996
jmp endd
-
 
997
 
-
 
998
 
-
 
999
sc0E_00_00:
-
 
1000
mov  edx,i2o1     ; pointer to text beginning
-
 
1001
jmp endd
-
 
1002
 
-
 
1003
sc0E_00_xx:
-
 
1004
mov  edx,i2o2     ; pointer to text beginning
-
 
1005
jmp endd
-
 
1006
 
-
 
1007
 
-
 
1008
;////////////////////////////
-
 
1009
nextclass0F:
-
 
1010
 cmp [PCI_Class], 0Fh
-
 
1011
 je endd
-
 
1012
 
-
 
1013
 cmp [PCI_Class], 10h
-
 
1014
 je endd
-
 
1015
 
446
   dec	 ecx			  ;one less description in list
1016
 cmp [PCI_Class], 11h
447
   jnz	 repu1			  ;was it our last?
1017
 je endd
448
   mov	 edx,_UNKNOWND		  ;if so its unknown device
1018
 
449
 endd:
1019
 endd:
450
   and	 ebx, 0x0000FFFF	  ;clear X position
1020
   and   ebx, 0x0000FFFF    ;clear X position
451
   or	 ebx, 0x02300000	  ;set X position to 560 pixels
1021
   or   ebx, 0x02300000    ;set X position to 560 pixels
452
   xor	 ecx, ecx		  ;color of text
1022
   xor   ecx, ecx      ;color of text
Line 453... Line 1023...
453
   mov	 eax,4			  ;draw text system function
1023
   mov   eax,4        ;draw text system function
454
   mov	 esi,32 		  ;length of text to draw
1024
   mov   esi,32       ;length of text to draw
455
   int	 0x40			  ;draw the text
1025
   int   0x40        ;draw the text
Line 456... Line 1026...
456
 
1026
 
457
   movzx edx, bx		  ;get y coordinate
1027
   movzx edx, bx      ;get y coordinate
458
   add	 edx, 0x0014000A	  ;add 10 to y coordinate and set x coordinate to 20
1028
   add   edx, 0x0014000A    ;add 10 to y coordinate and set x coordinate to 20
Line 469... Line 1039...
469
 
1039
 
Line 470... Line 1040...
470
 
1040
 
471
; DATA AREA
1041
; DATA AREA
472
 
1042
 
Line -... Line 1043...
-
 
1043
labelt:
-
 
1044
db 'PCI Device Enumeration v 2.0 by J. Delozier, S. Kuzmin, V. Hanla, M. Zakiyanov'
-
 
1045
labellen:
-
 
1046
 
-
 
1047
ata1:
-
 
1048
db 'Storage - ATA c. w/ single DMA  '
-
 
1049
ata1len:
-
 
1050
 
-
 
1051
ata2:
-
 
1052
db 'Storage - ATA c. w/ chained DMA '
-
 
1053
ata2len:
473
labelt:
1054
 
-
 
1055
 
474
db 'PCI Device Enumeration v 1.31 by J. Delozier, S. Kuzmin and V. Hanla'
1056
display1:
-
 
1057
db 'Display - VGA-compatible c.     '
-
 
1058
display1len:
-
 
1059
 
-
 
1060
display2:
-
 
1061
db 'Display - 8514-compatible c.    '
475
 labellen:
1062
display2len:
-
 
1063
 
-
 
1064
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
1065
serialbus1:
476
 
1066
db 'Serial Bus - USB Universal HC   '
-
 
1067
serialbus1len:
-
 
1068
 
-
 
1069
serialbus2:
-
 
1070
db 'Serial Bus - USB Open HC        '
-
 
1071
serialbus2len:
-
 
1072
 
-
 
1073
serialbus3:
-
 
1074
db 'Serial Bus - USB2 Enhanced HC   '
-
 
1075
serialbus3len:
-
 
1076
 
-
 
1077
serialbus4:
-
 
1078
db 'Serial Bus - USB w/o specific PI'
-
 
1079
serialbus4len:
-
 
1080
 
-
 
1081
serialbus5:
-
 
1082
db 'Serial Bus - USB device (not HC)'
-
 
1083
serialbus5len:
-
 
1084
 
-
 
1085
 
-
 
1086
serialbus6:
-
 
1087
db 'Serial Bus - IEEE 1394(FireWire)'
-
 
1088
serialbus6len:
-
 
1089
 
-
 
1090
serialbus7:
-
 
1091
db 'Serial Bus- IEEE 1394(Open HCI) '
477
if lang eq de
1092
serialbus7len:
-
 
1093
 
-
 
1094
 
-
 
1095
serialbus8:
478
PCIWin:
1096
db 'Serial Bus - IPMI SMIC I.       '
-
 
1097
serialbus8len:
-
 
1098
 
-
 
1099
serialbus9:
479
db 'Im Einstellungsmenue muss der PCI Zugriff eingeschaltet sein.      '
1100
db 'Serial Bus - IPMI Kybd CSI      '
-
 
1101
serialbus9len:
-
 
1102
 
-
 
1103
serialbus10:
480
db '                                       '
1104
db 'Serial Bus - IPMI BTI           '
-
 
1105
serialbus10len:
-
 
1106
;;;;;;;;;;;;;;;;;;;;;;;
-
 
1107
bridge1:
-
 
1108
db 'Bridge - PCI/PCI                '
-
 
1109
bridge1len:
-
 
1110
 
-
 
1111
bridge2:
-
 
1112
db 'Bridge - Subtract.Decode PCI/PCI'
-
 
1113
bridge2len:
-
 
1114
 
-
 
1115
bridge3:
-
 
1116
db 'Bridge - Semi-transp. PCI/PCI 1 '
-
 
1117
bridge3len:
-
 
1118
 
-
 
1119
bridge4:
-
 
1120
db 'Bridge - Semi-transp. PCI/PCI 2 '
-
 
1121
bridge4len:
-
 
1122
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
1123
gameport1:
-
 
1124
db 'Input - Gameport  c. (generic)  '
-
 
1125
gameport1len:
-
 
1126
 
-
 
1127
gameport2:
-
 
1128
db 'Input - Gameport c. (legacy)    '
-
 
1129
gameport2len:
-
 
1130
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
1131
i2o1:
-
 
1132
db 'Intelligent I/O - I/O c. (I2O 1)'
-
 
1133
i2o1len:
-
 
1134
 
-
 
1135
i2o2:
-
 
1136
db 'Intelligent I/O - c.(FIFO @ 40h)'
481
db '                                                                   '
1137
i2o2len:
-
 
1138
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
1139
 
-
 
1140
communication0:
-
 
1141
db 'Communication - Serial (XT)     '
-
 
1142
communication0len:
-
 
1143
 
-
 
1144
communication1:
-
 
1145
db 'Communication - Serial c.(16450)'
-
 
1146
communication1len:
-
 
1147
 
-
 
1148
communication2:
-
 
1149
db 'Communication - Serial c.(16550)'
-
 
1150
communication2len:
-
 
1151
 
-
 
1152
communication3:
-
 
1153
db 'Communication - Serial c.(16650)'
-
 
1154
communication3len:
-
 
1155
 
-
 
1156
communication4:
-
 
1157
db 'Communication - Serial c.(16750)'
-
 
1158
communication4len:
-
 
1159
 
-
 
1160
communication5:
-
 
1161
db 'Communication - Serial c.(16850)'
-
 
1162
communication5len:
-
 
1163
 
-
 
1164
communication6:
-
 
1165
db 'Communication - Serial c.(16950)'
-
 
1166
communication6len:
-
 
1167
;-------------------------------
-
 
1168
communication7:
-
 
1169
db 'Communication - Parallel port   '
-
 
1170
communication7len:
-
 
1171
 
-
 
1172
communication8:
-
 
1173
db 'Communication - Bi-dir. par.port'
-
 
1174
communication8len:
-
 
1175
 
-
 
1176
communication9:
-
 
1177
db 'Communication - ECP 1.X par.port'
-
 
1178
communication9len:
-
 
1179
 
-
 
1180
communication10:
-
 
1181
db 'Communication - IEEE1284 c.     '
-
 
1182
communication10len:
-
 
1183
 
-
 
1184
communication11:
-
 
1185
db 'Communication - IEEE1284 device '
-
 
1186
communication11len:
-
 
1187
;-------------------------------
-
 
1188
communication12:
-
 
1189
db 'Communication - Generic modem   '
-
 
1190
communication12len:
-
 
1191
 
-
 
1192
communication13:
-
 
1193
db 'Communication -Hayes modem 16450'
-
 
1194
communication13len:
-
 
1195
 
-
 
1196
communication14:
-
 
1197
db 'Communication -Hayes modem 16550'
-
 
1198
communication14len:
-
 
1199
 
-
 
1200
communication15:
-
 
1201
db 'Communication -Hayes modem 16650'
-
 
1202
communication15len:
-
 
1203
 
-
 
1204
communication16:
-
 
1205
db 'Communication -Hayes modem 16750'
-
 
1206
communication16len:
-
 
1207
 
482
db '                                       '
1208
 
-
 
1209
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
1210
 
-
 
1211
system0:
483
db 'PCI Version  =                                                     '
1212
db 'System - Generic 8259 PIC       '
-
 
1213
system0len:
-
 
1214
 
-
 
1215
system1:
484
db '                                       '
1216
db 'System - ISA PIC                '
-
 
1217
system1len:
-
 
1218
 
-
 
1219
system2:
-
 
1220
db 'System - EISA PIC               '
-
 
1221
system2len:
-
 
1222
 
-
 
1223
system3:
-
 
1224
db 'System - I/O APIC interrupt c.  '
-
 
1225
system3len:
-
 
1226
 
-
 
1227
system4:
485
db 'Letzter PCI Bus =                                                  '
1228
db 'System - I/O(x) APIC interrupt c'
-
 
1229
system4len:
-
 
1230
;-
-
 
1231
system5:
486
db '                                       '
1232
db 'System - Generic 8237 DMA c.    '
-
 
1233
system5len:
-
 
1234
 
-
 
1235
system6:
487
db 'Anzahl von Geraeten =                                              '
1236
db 'System - ISA DMA c.             '
-
 
1237
system6len:
-
 
1238
 
-
 
1239
system7:
488
db '                                       '
1240
db 'System - EISA DMA c.            '
-
 
1241
system7len:
-
 
1242
;--
-
 
1243
system8:
489
db '                                                                   '
1244
db 'System - 8254 system timer      '
-
 
1245
system8len:
-
 
1246
 
-
 
1247
system9:
490
db '                                       '
1248
db 'System - ISA system timer       '
-
 
1249
system9len:
491
db 'VenID DevID Bus# Dev# Fnc Rev  Class  Subclass               Herste'
1250
 
-
 
1251
system10:
-
 
1252
db 'System - EISA (2 system timers) '
-
 
1253
system10len:
-
 
1254
;--
492
db 'ller                    Beschreibung   '
1255
system11:
-
 
1256
db 'System - Generic RTC c.         '
-
 
1257
system11len:
-
 
1258
 
493
db '----- ----- ---- ---- --- ---  -----  -------- --------------------'
1259
system12:
494
db '---------------------- ----------------'
1260
db 'System - ISA RTC c.             '
495
db 'x'
1261
system12len:
496
else
1262
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
497
PCIWin:
1263
PCIWin:
498
db 'Please remember to enable PCI Access to Applications in Setup Menu.'
1264
db 'Please remember to enable PCI Access to Applications in Setup Menu.'
499
db '                                       '
1265
db '                                       '
500
db '                                                                   '
1266
db '                                                                   '
501
db '                                       '
1267
db '                                       '
502
db 'PCI Version  =                                                     '
1268
db 'PCI Version  =                                                     '
503
db '                                       '
1269
db '                                       '
504
db 'Last PCI Bus =                                                     '
1270
db 'Last PCI Bus =                                                     '
505
db '                                       '
1271
db '                                       '
506
db 'Number of devices =                                                '
1272
db 'Quantity of devices =                                              '
507
db '                                       '
1273
db '                                       '
-
 
1274
db '                                                                   '
-
 
1275
db '                                       '
508
db '                                                                   '
1276
db 'VenID DevID Bus# Dev# Fnc Rev  Class  Subclass/                Comp'
509
db '                                       '
1277
db 'any                      Description   '
510
db 'VenID DevID Bus# Dev# Fnc Rev  Class  Subclass                 Comp'
1278
db '                                      Interface                    '
511
db 'any                      Description   '
-
 
Line -... Line 1279...
-
 
1279
db '                                       '
Line 512... Line 1280...
512
db '----- ----- ---- ---- --- ---  -----  -------- --------------------'
1280
db '----- ----- ---- ---- --- ---  -----  -------- --------------------'
513
db '---------------------- ----------------'
1281
db '---------------------- ----------------'
514
db 'x'
1282
db 'x'
515
end if
1283
 
516
 
1284
;
517
 
1285
 
518
total	     db 0
1286
total       db 0
519
V_Bus	     db 0
1287
V_Bus       db 0
520
V_Dev	     db 0
1288
V_Dev       db 0
521
PCI_Version  dw 0
1289
PCI_Version  dw 0
522
PCI_LastBus  db 0
1290
PCI_LastBus  db 0
523
PCI_Device   dw 0
1291
PCI_Device   dw 0
524
PCI_Vendor   dw 0
-
 
-
 
1292
PCI_Vendor   dw 0
Line 525... Line 1293...
525
PCI_Bus      db 0
1293
PCI_Bus      db 0
526
PCI_Dev      db 0
1294
PCI_Dev      db 0
Line 527... Line 1295...
527
PCI_Rev      db 0
1295
PCI_Rev      db 0
528
PCI_Class    db 0
1296
PCI_Class    db 0