*** ARCETHER.ASM	Sat Feb 10 17:44:10 1996
--- new/arcether.asm	Tue Feb 27 21:36:07 1996
***************
*** 1,4 ****
--- 1,6 ----
  ;History:180,18
+ ;Feb 26, 1996   Fix so that same code can run on 386+ and non-386
+ ;               -- Peter Fales <psfales@att.com>
  ;Jan 11, 1995   Fix packet splitting bug
  ;               -- from Avery Pennarun <apenwarr@foxnet.net>
  ;Dec 23, 1994   Add patches to fix PC/TCP compatibility, etc
***************
*** 457,467 ****
          pop    ds                       ;ds:si for movsw
          assume ds:nothing
          push   cx
          call   movemem                  ;und nun noch cx bytes clientdata bertragen   ****
          pop    cx
  ;
!         sub    si,4                     ; apenwarr - movemem added too many
  ;
          push   ds                       ;the next fragment
          push   si
          mov    ax,cs
--- 459,483 ----
          pop    ds                       ;ds:si for movsw
          assume ds:nothing
          push   cx
+ 	push   si			; psfales - save si across movemem
          call   movemem                  ;und nun noch cx bytes clientdata bertragen   ****
          pop    cx
  ;
! ;       sub    si,4                     ; apenwarr - movemem added too many
  ;
+ 	pop    si			; psfales - the problem here is 
+ 	mov    ax,si			; psfales - that the 386 version reads an
+ 	add    ax,cx			; psfales - extra long from memory, even if
+ 	mov    si,ax			; psfales - if it doesn't use it.  apenwarr
+ 					; psfales - fixed it by just subtracting off
+ 					; psfales - the extra, but that doesn't work
+ 					; psfales - in the non-386 case and, I think,
+ 					; psfales - assumes that the number of bytes
+ 					; psfales - is a multiple of 4.  Instead, we
+ 					; psfales - save the value of SI, and 
+ 					; psfales - we add CX (the count) to it now 
+ 					; psfales - that we've completed movemem.
+ 					
          push   ds                       ;the next fragment
          push   si
          mov    ax,cs
***************
*** 923,929 ****
  copyright_msg   db      "Packet driver for Novell ARCnet TCP/IP and IPX version ",'0'+(majver / 10),'0'+(majver mod 10),".",'0'+version,CR,LF
                  db      "Portions Copyright 1988 Philip Prindeville",CR,LF
                  db      "Copyright 1991 Martin Wilmes",CR,LF
!                 db      "Slight modifications by Stephen A. Wood, Vladimir Shergin, and Avery Pennarun",CR,LF,'$'
  
  no_arcnet_msg   db      "No ARCnet found at that address.",CR,LF,'$'
  failed_test_msg db      "Failed self test.",CR,LF,'$'
--- 939,947 ----
  copyright_msg   db      "Packet driver for Novell ARCnet TCP/IP and IPX version ",'0'+(majver / 10),'0'+(majver mod 10),".",'0'+version,CR,LF
                  db      "Portions Copyright 1988 Philip Prindeville",CR,LF
                  db      "Copyright 1991 Martin Wilmes",CR,LF
!                 db      "Slight modifications by Stephen A. Wood, "
! 		db	"Vladimir Shergin, Avery Pennarun, ",CR,LF
! 		db	"and Peter Fales",CR,LF,'$'
  
  no_arcnet_msg   db      "No ARCnet found at that address.",CR,LF,'$'
  failed_test_msg db      "Failed self test.",CR,LF,'$'
***************
*** 1026,1032 ****
          jmp     failed_test_error       ;failed power on self-test.
  etopen_3:
          mov     al,es:[1]
!         mov     rom_address[5],al
          
  ; saw -- Removed this - defaulting to 6 makes ethernet emulation work better.
  ; Put it back because defaulting to 6 confuses the special ARP transmitter.
--- 1044,1053 ----
          jmp     failed_test_error       ;failed power on self-test.
  etopen_3:
          mov     al,es:[1]
!         mov     rom_address[0],al	; psfales - changed from 5 to 0
! 				        ; psfales - So that software that 
! 					; psfales - knows that our address 
! 					; psfales - length is 1 will work 
  
  ; saw -- Removed this - defaulting to 6 makes ethernet emulation work better.
  ; Put it back because defaulting to 6 confuses the special ARP transmitter.
