0
|
1 ********************************************************************
|
|
2 * TSMon - Time sharing monitor
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
|
6 * Ed. Comments Who YY/MM/DD
|
|
7 * ------------------------------------------------------------------
|
|
8 * 8 Original Tandy distribution version
|
|
9
|
|
10 nam Tsmon
|
|
11 ttl Time sharing monitor
|
|
12
|
|
13 * Disassembled 98/09/14 23:52:10 by Disasm v1.6 (C) 1988 by RML
|
|
14
|
|
15 ifp1
|
|
16 use defsfile
|
|
17 endc
|
|
18
|
|
19 tylg set Prgrm+Objct
|
|
20 atrv set ReEnt+rev
|
|
21 rev set $01
|
|
22 edition set 8
|
|
23
|
|
24 mod eom,name,tylg,atrv,start,size
|
|
25
|
|
26 ChildPID rmb 1
|
|
27 DevName rmb 2
|
|
28 ParmArea rmb 2
|
|
29 u0005 rmb 451
|
|
30 size equ .
|
|
31
|
|
32 name fcs /Tsmon/
|
|
33 fcb edition
|
|
34
|
|
35 Login fcc "LOGIN"
|
|
36 Param fcb C$CR
|
|
37
|
|
38 * Intercept routine
|
|
39 IcptRtn rti
|
|
40
|
|
41 start stx <DevName store pointer to device name
|
|
42 std <ParmArea save parameter area size
|
|
43 leax <IcptRtn,pcr
|
|
44 os9 F$Icpt install interrupt svc rtn
|
|
45 L0024 ldx <DevName get device name pointer
|
|
46 ldd <ParmArea get parameter area size
|
|
47 cmpd #$0002 size is 2?
|
|
48 bcs L0052 if less than, just use stdin
|
|
49 lda ,x else get char at X
|
|
50 cmpa #C$CR carriage return?
|
|
51 beq L0052 yep, just use stdin
|
|
52 clra else set A to 0
|
|
53 os9 I$Close close stdin
|
|
54 lda #READ.!WRITE.
|
|
55 os9 I$Open open path to device (path 0 is used)
|
|
56 bcs Error branch if error
|
|
57 inca A = 1 (stdout)
|
|
58 os9 I$Close close stdout path
|
|
59 inca A = 2 (stderr)
|
|
60 os9 I$Close close stderr path
|
|
61 clra A = 0 (stdin)
|
|
62 os9 I$Dup duplicate to standard out
|
|
63 bcs Error branch if error
|
|
64 os9 I$Dup duplicate to standard error
|
|
65 bcs Error branch if error
|
|
66 L0052 clra A = 0 (stdin)
|
|
67 leax u0005,u X = buffer
|
|
68 ldy #$0001 character count
|
|
69 os9 I$ReadLn read
|
|
70 bcs L0024
|
|
71 lda #Objct
|
|
72 clrb size of data area
|
|
73 leax <Login,pcr point to Login name
|
|
74 leau <Param,pcr and parameter area
|
|
75 ldy #$0000 size of parameter area
|
|
76 os9 F$Fork fork it!
|
|
77 bcs L0024 branch if error
|
|
78 sta <ChildPID save PID of Login process
|
|
79 L0072 os9 F$Wait wait for it to die
|
|
80 cmpa <ChildPID A = PID of dead process.. same as our child?
|
|
81 bne L0072 if not, continue waiting
|
|
82 bra L0024 else restart procedure
|
|
83 Error os9 F$Exit
|
|
84
|
|
85 emod
|
|
86 eom equ *
|
|
87 end
|