Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/tsmon.asm @ 1020:c1a5613ffe7b
changes
author | boisy |
---|---|
date | Thu, 06 Mar 2003 01:41:03 +0000 |
parents | 06b4b630cbaf |
children | 84ea83668304 |
rev | line source |
---|---|
191 | 1 ******************************************************************* |
0 | 2 * Tsmon - Timesharing monitor |
3 * | |
4 * $Id$ | |
5 * | |
6 * Ed. Comments Who YY/MM/DD | |
7 * ------------------------------------------------------------------ | |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
191
diff
changeset
|
8 * 8 From Tandy OS-9 Level Two VR 02.00.01 |
0 | 9 |
10 nam Tsmon | |
11 ttl Timesharing monitor | |
12 | |
191 | 13 * Disassembled 02/07/13 23:44:55 by Disasm v1.6 (C) 1988 by RML |
0 | 14 |
15 ifp1 | |
129 | 16 use defsfile |
0 | 17 endc |
129 | 18 |
0 | 19 tylg set Prgrm+Objct |
20 atrv set ReEnt+rev | |
21 rev set $01 | |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
191
diff
changeset
|
22 edition set 8 |
129 | 23 |
0 | 24 mod eom,name,tylg,atrv,start,size |
129 | 25 |
917 | 26 org 0 |
27 childid rmb 1 | |
28 parmptr rmb 2 | |
29 parmlen rmb 2 | |
30 inbuff rmb 451 | |
0 | 31 size equ . |
129 | 32 |
33 name fcs /Tsmon/ | |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
191
diff
changeset
|
34 fcb edition |
129 | 35 |
917 | 36 Login fcc "LOGIN" |
37 LoginPrm fcb C$CR | |
129 | 38 |
917 | 39 IcptRtn rti |
129 | 40 |
917 | 41 start stx <parmptr save parameter pointer |
42 std <parmlen save parameter length | |
43 leax <IcptRtn,pcr point to intercept routine | |
44 os9 F$Icpt and set it | |
45 L0024 ldx <parmptr get pointer to parameter | |
46 ldd <parmlen and length | |
47 cmpd #$0002 | |
191 | 48 bcs L0052 |
917 | 49 lda ,x get byte at command line |
50 cmpa #C$CR cr? | |
51 beq L0052 if so, branch | |
52 clra stdin | |
53 os9 I$Close close it | |
191 | 54 lda #UPDAT. |
917 | 55 os9 I$Open open device on command line |
56 bcs Exit branch if error | |
57 inca A = 1 | |
58 os9 I$Close close stdout | |
59 inca A = 2 | |
60 os9 I$Close close stderr | |
61 clra stdin path | |
62 os9 I$Dup dup to stdout | |
63 bcs Exit branch if error | |
64 os9 I$Dup dup to stderr | |
65 bcs Exit branch if error | |
66 L0052 clra stdin | |
67 leax inbuff,u point to buffer | |
68 ldy #$0001 read 1 byte | |
69 os9 I$ReadLn read line | |
70 bcs L0024 branch if error | |
71 lda #Objct object | |
72 clrb no additional mem | |
73 leax <Login,pcr point to login | |
74 leau <LoginPrm,pcr and to parameters | |
75 ldy #$0000 parameter size | |
76 os9 F$Fork fork program | |
77 bcs L0024 branch if error | |
78 sta <childid else save process ID of child | |
79 L0072 os9 F$Wait wait for it to finish | |
80 cmpa <childid same as PID we forked? | |
81 bne L0072 if not, wait more | |
82 bra L0024 else go back | |
83 Exit os9 F$Exit exit | |
129 | 84 |
0 | 85 emod |
86 eom equ * | |
129 | 87 end |