Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/tsmon.as @ 2787:28b6ec8a14d5 lwtools-port
Added 'extern' pragam, fixed up rules.mak, changed 'section text' to 'section code' in sources
author | Boisy Pitre <boisy.pitre@nuance.com> |
---|---|
date | Sun, 27 Jan 2013 07:54:07 -0600 |
parents | 03f26e88b809 |
children | 19517af71188 |
rev | line source |
---|---|
1862 | 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 | |
1868 | 18 edition set 2 |
1862 | 19 |
2782
aaba193af04f
Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents:
1869
diff
changeset
|
20 section data |
1862 | 21 childid rmb 1 |
22 parmptr rmb 2 | |
23 parmlen rmb 2 | |
24 inbuff rmb 128 | |
25 endsect | |
26 | |
2782
aaba193af04f
Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents:
1869
diff
changeset
|
27 * psect tsmon_a,Prgrm+Objct,ReEnt+rev,edition,200,start |
2787
28b6ec8a14d5
Added 'extern' pragam, fixed up rules.mak, changed 'section text' to 'section code' in sources
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2783
diff
changeset
|
28 section code |
2782
aaba193af04f
Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents:
1869
diff
changeset
|
29 |
1862 | 30 Login fcc "LOGIN" |
31 LoginPrm fcb C$CR | |
32 | |
33 IcptRtn rti | |
34 | |
1868 | 35 start stx parmptr save parameter pointer |
36 std parmlen save parameter length | |
1862 | 37 leax IcptRtn,pcr point to intercept routine |
38 os9 F$Icpt and set it | |
1868 | 39 L0024 ldx parmptr get pointer to parameter |
40 ldd parmlen and length | |
1862 | 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 | |
1868 | 61 leax inbuff point to buffer |
1862 | 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 | |
1868 | 72 sta childid else save process ID of child |
1862 | 73 L0072 os9 F$Wait wait for it to finish |
1868 | 74 cmpa childid same as PID we forked? |
1862 | 75 bne L0072 if not, wait more |
76 bra L0024 else go back | |
77 Exit os9 F$Exit exit | |
78 | |
79 endsect |