page%rishathra@Sun.COM (Bob Page) (04/27/89)
Submitted-by: rminnich@super.org (Ronald G. Minnich) Posting-number: Volume 89, Issue 100 Archive-name: comm/amigatcp.p1 These two files were missing from the original distribution. You can't re-make the AmigaTCP package without them. # This is a shell archive. # Remove anything above and including the cut line. # Then run the rest of the file through 'sh'. # Unpacked files will be owned by you and have default permissions. #----cut here-----cut here-----cut here-----cut here----# #!/bin/sh # shar: SHell ARchive # Run the following text through 'sh' to create: # devstub.asm # version.c # This is archive 1 of a 1-part kit. # This archive created: Wed Apr 26 14:43:23 1989 echo "extracting devstub.asm" sed 's/^X//' << \SHAR_EOF > devstub.asm X;**************************************************************** X;* * X;* Stub device driver. * X;* * X;* Copyright (C) 1986 * X;* Louis A. Mamakos * X;* Software & Stuff * X;* * X;* All rights reserverd. The program represents propriatary * X;* information of value to the author, and my not be * X;* reproduced or redistributed in any form include source, * X;* object code or any other representation without prior * X;* permission from the author. * X;* * X;**************************************************************** X X X; X; Assembly language stub for device driver. X; X; FAR CODE X; FAR DATA X X X CSECT text X XREF _NetDevOpen,_DevClose,_DevBeginIO ; external symbols X XREF _DevExpunge,_DevAbortIO ;_geta4 X XREF _nopens X X XDEF _DSOpen,_DSClose,_DSAbortIO ; defined symbols X XDEF _DSBeginIO,_DSExpunge X XDEF _Savea4 X;REGS REG D1-D7/A0-A6 X X; X; set up C runtime environment. This is the Aztec C version. X; XCENTRY MACRO X movem.l D2-D7/A2-A6,-(sp) ;save registers X move.l a4loc,a4 ;get a4 X; jsr _geta4 X ENDM X XCRETURN MACRO X movem.l (sp)+,D2-D7/A2-A6 ;restore registers X rts ;return to caller X ENDM X X; MACRO DEBUG X; move.l a6,-(sp) X; move.l _SysBase,a6 X; jsr _LVODebug(a6) X; move.l (sp)+,a6 X; ENDM X X X;---------------------------------------------------------------------- X; X; here begins the system interface commands. When the user calls X; Opendevice/Closedevice/Removedevice, this eventually gets translated X; into a call to the following routines (Open/Close/Expunge). Exec X; has already put our device pointer in A6 for us. Exec has turned X; off task switching while in these routines (via Forbid/Permit), so X; we should not take too long in them. X; X;---------------------------------------------------------------------- X X ; Open returns the device pointer in d0 if the open X ; was successful. If the open failed then null is returned. X ; It might fail if we allocated memory on each open, or X ; if only open application could have the device open X ; at a time... X X_DSOpen: ; ( device:a6, unitnum: d0, iob:a1, flags:d1 ) X CENTRY X move.l a4loc,a4 X move.l d1,-(sp) ; push flags X move.l a1,-(sp) ; push iob address X move.l d0,-(sp) ; push unit number X move.l a6,-(sp) ; device X addq.l #1,_nopens X jsr _NetDevOpen ; DevOpen(device, iob, unit, flags) X lea 16(sp),sp ; trash paramters X CRETURN X X ; There are two different things that might be returned from X ; the Close routine. If the device is no longer open and X ; there is a delayed expunge then Close should return the X ; segment list (as given to Init). Otherwise close should X ; return NULL. X X_DSClose: ; ( device:a6, iob:a1 ) X CENTRY X move.l a1,-(sp) ; push iob X move.l a6,-(sp) ; push device X jsr _DevClose ; DevClose(device, iob) X addq.l #8,sp ; trash parameters X CRETURN X X X ; There are two different things that might be returned from X ; the Expunge routine. If the device is no longer open X ; then Expunge should return the segment list (as given to X ; Init). Otherwise Expunge should set the delayed expunge X ; flag and return NULL. X ; X ; One other important note: because Expunge is called from X ; the memory allocator, it may NEVER Wait() or otherwise X ; take long time to complete. X X_DSExpunge: ; ( device: a6 ) X CENTRY X move.l a6,-(sp) ; push device pointer X jsr _DevExpunge ; DevExpunge(dev) X addq.l #4,sp ; pop parameters X CRETURN X X XNull: X moveq.l #0,d0 X rts Xa4loc dc.l 0 X_Savea4: X move.l a4,a4loc X rts X;---------------------------------------------------------------------- X; X; here begins the device specific commands X; X;---------------------------------------------------------------------- X X_DSBeginIO: ; ( iob:a1, device:a6 ) X CENTRY X move.l a6,-(sp) ; push device X move.l a1,-(sp) ; push iob X jsr _DevBeginIO ; DevBeginIO(iob, device) X addq.l #8,sp ; pop args X CRETURN X X; X_DSAbortIO: ; ( iob:a1, device:a6 ) XInvalid: X CENTRY X move.l a6,-(sp) ; push device X move.l a1,-(sp) ; push iob X jsr _DevAbortIO ; DevAbortIO(iob, device) X addq.l #8,sp ; pop args X CRETURN X X END SHAR_EOF echo "extracting version.c" sed 's/^X//' << \SHAR_EOF > version.c X/* version control information */ X X/* the date of release by N3EUA from distribution central -- DO NOT CHANGE! */ Xchar major_rev[] = "870227"; X X/* revision indicator for keeping track of local patches - change this one! */ Xchar minor_rev[] = "5"; SHAR_EOF echo "End of archive 1 (of 1)" # if you want to concatenate archives, remove anything after this line exit