Mercurial > hg > Members > kono > nitros9-code
comparison level1/cmds/tsmon.as @ 2783:03f26e88b809 lwtools-port
Renamed files and setup for lwasm/lwlink work
author | Boisy Pitre <boisy.pitre@nuance.com> |
---|---|
date | Sat, 26 Jan 2013 17:18:24 -0600 |
parents | level1/cmds/tsmon.a@aaba193af04f |
children | 28b6ec8a14d5 |
comparison
equal
deleted
inserted
replaced
2782:aaba193af04f | 2783:03f26e88b809 |
---|---|
1 ******************************************************************* | |
2 * Tsmon - Timesharing monitor | |
3 * | |
4 * $Id$ | |
5 * | |
6 * Edt/Rev YYYY/MM/DD Modified by | |
7 * Comment | |
8 * ------------------------------------------------------------------ | |
9 * 6 ????/??/?? | |
10 * From Tandy OS-9 Level Two VR 02.00.01. | |
11 | |
12 nam Tsmon | |
13 ttl Timesharing monitor | |
14 | |
15 use defsfile.d | |
16 | |
17 rev set $00 | |
18 edition set 2 | |
19 | |
20 section data | |
21 childid rmb 1 | |
22 parmptr rmb 2 | |
23 parmlen rmb 2 | |
24 inbuff rmb 128 | |
25 endsect | |
26 | |
27 * psect tsmon_a,Prgrm+Objct,ReEnt+rev,edition,200,start | |
28 section text | |
29 | |
30 Login fcc "LOGIN" | |
31 LoginPrm fcb C$CR | |
32 | |
33 IcptRtn rti | |
34 | |
35 start stx parmptr save parameter pointer | |
36 std parmlen save parameter length | |
37 leax IcptRtn,pcr point to intercept routine | |
38 os9 F$Icpt and set it | |
39 L0024 ldx parmptr get pointer to parameter | |
40 ldd parmlen and length | |
41 cmpd #$0002 | |
42 bcs L0052 | |
43 lda ,x get byte at command line | |
44 cmpa #C$CR cr? | |
45 beq L0052 if so, branch | |
46 clra stdin | |
47 os9 I$Close close it | |
48 lda #UPDAT. | |
49 os9 I$Open open device on command line | |
50 bcs Exit branch if error | |
51 inca A = 1 | |
52 os9 I$Close close stdout | |
53 inca A = 2 | |
54 os9 I$Close close stderr | |
55 clra stdin path | |
56 os9 I$Dup dup to stdout | |
57 bcs Exit branch if error | |
58 os9 I$Dup dup to stderr | |
59 bcs Exit branch if error | |
60 L0052 clra stdin | |
61 leax inbuff point to buffer | |
62 ldy #$0001 read 1 byte | |
63 os9 I$ReadLn read line | |
64 bcs L0024 branch if error | |
65 lda #Objct object | |
66 clrb no additional mem | |
67 leax <Login,pcr point to login | |
68 leau <LoginPrm,pcr and to parameters | |
69 ldy #$0000 parameter size | |
70 os9 F$Fork fork program | |
71 bcs L0024 branch if error | |
72 sta childid else save process ID of child | |
73 L0072 os9 F$Wait wait for it to finish | |
74 cmpa childid same as PID we forked? | |
75 bne L0072 if not, wait more | |
76 bra L0024 else go back | |
77 Exit os9 F$Exit exit | |
78 | |
79 endsect |