annotate level1/cmds/tee.a @ 1868:cba8a54bc509

Slowly but surely
author boisy
date Fri, 29 Jul 2005 19:40:14 +0000
parents ebec41c32d7d
children a51439f6b206
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
1 ********************************************************************
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
2 * Tee - Split output to multiple devices
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
3 *
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
4 * $Id$
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
5 *
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
7 * Comment
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
8 * ------------------------------------------------------------------
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
9 * 2 ????/??/??
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
10 * From Tandy OS-9 Level One VR 02.00.00.
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
11
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
12 nam Tee
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
13 ttl Split output to multiple devices
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
14
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
15 * Disassembled 98/09/14 23:50:52 by Disasm v1.6 (C) 1988 by RML
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
16
1862
25d7f19ee2e8 To be tested later
boisy
parents: 1859
diff changeset
17 use defsfile.d
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
18
1863
ebec41c32d7d tylang problem fixed
boisy
parents: 1862
diff changeset
19 Prgrm set $10
ebec41c32d7d tylang problem fixed
boisy
parents: 1862
diff changeset
20 Objct set $01
ebec41c32d7d tylang problem fixed
boisy
parents: 1862
diff changeset
21 ReEnt set $80
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
22 rev set $00
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
23 edition set 2
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
24
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
25 psect tee_a,Prgrm+Objct,ReEnt+rev,edition,200,start
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
26
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
27 vsect dp
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
28 u0000 rmb 1
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
29 parray rmb 13
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
30 pcount rmb 1
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
31 buff rmb 200
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
32 endsect
1758
a8bb0834424e commented backup
boisy
parents: 1755
diff changeset
33
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
34 start clrb
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
35 clr pcount clear path counter
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
36 cmpy #$0000 any parameters?
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
37 lbeq exitok exit if none
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
38 leay parray else point Y to path array
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
39
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
40 * Walk the command line parameters
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
41 parse lda ,x+
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
42 cmpa #C$SPAC
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
43 beq parse
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
44 cmpa #C$COMA
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
45 beq parse
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
46 cmpa #C$CR
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
47 lbeq parsex
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
48 * We've found a file or device name
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
49 leax -1,x
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
50 lda #WRITE.
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
51 ldb #PREAD.+UPDAT.
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
52 os9 I$Create open a path to the device or file
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
53 bcs exit branch if error
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
54 ldb pcount else get path counter
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
55 sta b,y save new path in the array offset
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
56 incb increment counter
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
57 stb pcount and save
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
58 bra parse continue parsing command line
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
59 parsex stb pcount
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
60
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
61 * Devices on command line are open, start pumping data
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
62 L0044 clra
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
63 leax buff
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
64 ldy #256
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
65 os9 I$ReadLn
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
66 bcc L0057
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
67 cmpb #E$EOF
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
68 beq exitok
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
69 coma
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
70 bra exit
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
71 L0057 inca
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
72 os9 I$WritLn
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
73 tst pcount
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
74 beq L0044
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
75 clrb
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
76 L0060 leay parray
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
77 lda b,y
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
78 leax buff
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
79 ldy #256
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
80 os9 I$WritLn
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
81 bcs exit
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
82 incb
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
83 cmpb pcount
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
84 bne L0060
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
85 bra L0044
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
86 exitok clrb
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
87 exit os9 F$Exit
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
88
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
89 endsect