Subversion Repositories Kolibri OS

Rev

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

Rev 1985 Rev 1993
Line 1... Line 1...
1
;***************************************************************
1
;***************************************************************
2
; project name:    PCI Device Enumeration
2
; project name:    PCI Device Enumeration
3
; target platform: KolibriOS
3
; target platform: KolibriOS
4
; compiler:        flat assembler 1.68
4
; compiler:        flat assembler 1.68
5
; version:         2.3
5
; version:         2.3
6
; last update:     June 2011
6
; last update:     Jule 2011
7
; maintained by:   Jason Delozier 
7
; maintained by:   Jason Delozier 
8
;                  Sergey Kuzmin 
8
;                  Sergey Kuzmin 
9
;                  Mihailov Ilia 
9
;                  Mihailov Ilia 
10
;                  Marat Zakiyanov 
10
;                  Marat Zakiyanov 
11
;                  Artem Jerdev  
11
;                  Artem Jerdev  
Line 448... Line 448...
448
	
448
	
Line 449... Line 449...
449
	call	store_2_digits
449
	call	store_2_digits
450
	
450
	
-
 
451
;
-
 
452
; from Ghost april 2007                 ;*****************************************
451
;
453
	and	edx, 0xFFFF
452
; from Ghost april 2007                 ;*****************************************
454
	or	edx, 310 * 65536	; X start becomes 310
453
	movzx	ecx, [PCI_IRQ]		; get Interface
455
	movzx	ecx, [PCI_IRQ]		; get Interface
Line 454... Line -...
454
	cmp	cl, 0x0f		; IRQ between 0..15
-
 
455
	ja	@f
-
 
456
	
456
	cmp	cl, 0x0f		; IRQ between 0..15
Line 457... Line 457...
457
	and	edx, 0xFFFF
457
	ja	@f
458
	or	edx, 310 * 65536	; X start becomes 310
-
 
-
 
458
 
459
	mcall
459
	mcall
-
 
460
 
-
 
461
	call	store_2_digits
460
	
462
	jmp	.PCI_Vendor
461
	call	store_2_digits
463
@@:	
462
	
464
	call	store_NA
Line 463... Line 465...
463
@@:
465
.PCI_Vendor:
Line 642... Line 644...
642
	add	[store_text_area_end],eax
644
	add	[store_text_area_end],eax
643
@@:
645
@@:
644
	popa
646
	popa
645
	ret	
647
	ret	
646
;-----------------------------------------------------------------------------
648
;-----------------------------------------------------------------------------
647
store_4_digits:
649
store_NA:
648
	pusha
650
	pusha
649
	mov	ebx,ecx
651
	mov	ebx,edx
650
	mov	ecx,4
652
	mcall	4,,0x80000000,text_NA
651
	mov	edi,[store_text_area_end]
653
	mov	edi,[store_text_area_end]
652
	call	binary_to_hex_string
654
	mov	ax,[edx]
653
	add	[store_text_area_end],dword 6
-
 
654
	popa
655
	mov	[edi+1],ax
655
	ret
656
	jmp	store_2_digits.1
656
;-----------------------------------------------------------------------------
657
;-----------------------------------------------------------------------------
657
store_2_digits:
658
store_2_digits:
658
	pusha
659
	pusha
659
	inc	[store_text_area_end]
660
	inc	[store_text_area_end]
660
	mov	ebx,ecx
661
	mov	ebx,ecx
661
	mov	ecx,2
662
	mov	ecx,2
662
	mov	edi,[store_text_area_end]
663
	mov	edi,[store_text_area_end]
663
	call	binary_to_hex_string
664
	call	binary_to_hex_string
-
 
665
.1:
664
	add	[store_text_area_end],dword 4
666
	add	[store_text_area_end],dword 4
665
	popa
667
	popa
666
	ret
668
	ret
667
;-----------------------------------------------------------------------------
669
;-----------------------------------------------------------------------------
-
 
670
store_4_digits:
-
 
671
	pusha
-
 
672
	mov	ebx,ecx
-
 
673
	mov	ecx,4
-
 
674
	mov	edi,[store_text_area_end]
-
 
675
	call	binary_to_hex_string
-
 
676
	add	[store_text_area_end],dword 6
-
 
677
	popa
-
 
678
	ret
-
 
679
;-----------------------------------------------------------------------------
668
; ebx - value
680
; ebx - value
669
; ecx - digits
681
; ecx - digits
670
; edi - output string
682
; edi - output string
671
binary_to_hex_string:
683
binary_to_hex_string:
672
	add	edi,ecx
684
	add	edi,ecx
Line 717... Line 729...
717
bar_rom db 'BAR6: Expansion ROM', 0
729
bar_rom db 'BAR6: Expansion ROM', 0
Line 718... Line 730...
718
 
730
 
719
text_save_button:
731
text_save_button:
720
	db 'Save PCI list',0
732
	db 'Save PCI list',0
-
 
733
.1:	db '(Press S key)',0
-
 
734
 
-
 
735
text_NA:
721
.1:	db '(Press S key)',0
736
	db 'NA',0
722
;---------------------------------------------------------------------
737
;---------------------------------------------------------------------
Line 723... Line 738...
723
system_dir_ProcLib	db '/sys/lib/proc_lib.obj',0
738
system_dir_ProcLib	db '/sys/lib/proc_lib.obj',0