home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
DRIVERS
/
SRC
/
ptys.lzh
/
cpty.a
< prev
next >
Wrap
Text File
|
1990-03-17
|
3KB
|
144 lines
* This software is copyright (C) 1989 by Reimer Mellin *
* *
* Permission is granted to reproduce and distribute *
* this package by any means so long as no fee is charged *
* above a nominal handling fee and so long as this *
* notice is always included in the copies. *
* Commerical use or incorporation into commercial software *
* is prohibited without the written permission of the *
* author. *
* *
* Other rights are reserved except as explicitly granted *
* by written permission of the author. *
* Reimer Mellin *
* *
* Sulenstr.8 *
* D-8000 Muenchen 71 (Federal Republic of Germany) *
* *
* EMAIL: *
* mellin@lan.informatik.tu-muenchen.dbp.de *
* ram@altger.UUCP *
* ....!pyramid!tmpmbx!doitcr!ramsys!ram (home) *
* *
*
* $Id: cpty.a_v 1.2.1.1 89/09/04 13:12:14 ram Exp $
*
* $Log: cpty.a_v $
* Revision 1.2.1.1 89/09/04 13:12:14 ram
* added some comments
*
* Revision 1.2 89/08/31 12:27:06 ram
* Copyright-message added
*
*
nam PtyMan
ttl PtyMan - Pty File Manager
use defsfile
Edition set 2
Typ_Lang set (FlMgr<<8)+Objct
Attr_Rev set (ReEnt+SupStat)<<8+0
PD_Sysglob equ $22
PD_Errno equ $1e
psect PtyMan,Typ_Lang,Attr_Rev,Edition,0,Entry
errno: equ $1e ; !!! PD_Errno in /DEFS/sysio.a !!!
* dadurch koennen C-Routinen die errno setzen, ganz normal genutzt
* werden !!
page
Entry:
dc.w _Create-Entry
dc.w _Open-Entry
dc.w _MakDir-Entry
dc.w _ChdDir-Entry
dc.w _Delete-Entry
dc.w _Seek-Entry
dc.w _Read-Entry
dc.w _Write-Entry
dc.w _ReadLn-Entry
dc.w _WriteLn-Entry
dc.w _GetStat-Entry
dc.w _SetStat-Entry
dc.w _Close-Entry
_MakDir:
_ChdDir:
_Delete:
move.w #E$BMode,d1
ori.w #Carry,ccr
rts
_Seek:
andi.w #NoCarry,ccr
rts
_Read:
movem.l d0-d7/a0-a6,-(sp)
bsr.s _setup
bra Read
_ReadLn:
movem.l d0-d7/a0-a6,-(sp)
bsr.s _setup
bra ReadLn
_Write:
movem.l d0-d7/a0-a6,-(sp)
bsr.s _setup
bra Write
_WriteLn:
movem.l d0-d7/a0-a6,-(sp)
bsr.s _setup
bra WriteLn
_Create:
_Open:
movem.l d0-d7/a0-a6,-(sp)
bsr.s _setup
bra Open
_GetStat:
movem.l d0-d7/a0-a6,-(sp)
bsr.s _setup
bra GetStat
_SetStat:
movem.l d0-d7/a0-a6,-(sp)
bsr.s _setup
bra SetStat
_Close:
movem.l d0-d7/a0-a6,-(sp)
bsr.s _setup
bra Close
_setup
move.l a6,PD_Sysglob(a1) ; System Globals
move.l a1,a6 ; Globals fuer C
move.l (sp)+,a0 ; Return-Adresse
move.l a4,d0 ; Process-Desciptor
move.l a5,d1 ; User Stack Frame
jsr (a0) ; Ruecksprung
tst.l d0
beq.s _setup90 ; kein Fehler!
movem.l (sp)+,d0-d7/a0-a6
move.l PD_Errno(a1),d1
ori.w #Carry,ccr
rts
_setup90
movem.l (sp)+,d0-d7/a0-a6
andi.w #NoCarry,ccr
rts
ends