Subversion Repositories Kolibri OS

Rev

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

Rev 1564 Rev 2387
Line 12... Line 12...
12
;;          GNU GENERAL PUBLIC LICENSE                              ;;
12
;;          GNU GENERAL PUBLIC LICENSE                              ;;
13
;;             Version 2, June 1991                                 ;;
13
;;             Version 2, June 1991                                 ;;
14
;;                                                                  ;;
14
;;                                                                  ;;
15
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 16... Line 16...
16
 
16
 
Line 17... Line 17...
17
; $Revision: 1564 $
17
; $Revision: 2387 $
Line 18... Line 18...
18
 
18
 
Line 954... Line 954...
954
	[eax+00]:2,[eax+01]:2,[eax+02]:2,[eax+03]:2,[eax+04]:2,[eax+05]:2,\
954
        [eax+00]:2,[eax+01]:2,[eax+02]:2,[eax+03]:2,[eax+04]:2,[eax+05]:2,\
955
	[eax+06]:2,[eax+07]:2,[eax+08]:2,[eax+09]:2,[eax+10]:2,[eax+11]:2,\
955
        [eax+06]:2,[eax+07]:2,[eax+08]:2,[eax+09]:2,[eax+10]:2,[eax+11]:2,\
956
	[eax+13]:2,[eax+12]:2
956
        [eax+13]:2,[eax+12]:2
Line 957... Line 957...
957
 
957
 
958
	cmp	dword [esp+8], 1514
958
        cmp     dword [esp+8], 1514
959
	jg	.finish 			; packet is too long
959
        jg      .nospace                        ; packet is too long
960
	cmp	dword [esp+8], 60
960
        cmp     dword [esp+8], 60
Line 961... Line 961...
961
	jl	.finish 			; packet is too short
961
        jl      .nospace                        ; packet is too short
962
 
962
 
963
; check descriptor
963
; check descriptor
964
	movzx	eax, [device.cur_tx]
964
        movzx   eax, [device.cur_tx]
Line 998... Line 998...
998
	DEBUGF	2," - Packet Sent! "
998
        DEBUGF  2," - Packet Sent! "
Line 999... Line 999...
999
 
999
 
1000
.finish:
1000
.finish:
1001
	DEBUGF	2," - Done!\n"
1001
        DEBUGF  2," - Done!\n"
-
 
1002
        stdcall KernelFree, [esp+4]
1002
	stdcall KernelFree, [esp+4]
1003
        xor     eax, eax
Line 1003... Line 1004...
1003
	ret	8
1004
        ret     8
1004
 
1005
 
1005
.nospace:
-
 
1006
	DEBUGF	1, 'ERROR: no free transmit descriptors\n'
1006
.nospace:
-
 
1007
        DEBUGF  1, 'ERROR: no free transmit descriptors\n'
1007
; todo: maybe somehow notify the kernel about the error?
1008
        stdcall KernelFree, [esp+4]
Line 1008... Line 1009...
1008
	stdcall KernelFree, [esp+4]
1009
        or      eax, -1