annotate level1/cmds/tee.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/tee.a@aaba193af04f
children 28b6ec8a14d5
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
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
19 rev set $00
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
20 edition set 2
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
21
2782
aaba193af04f Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents: 1869
diff changeset
22 section data
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
23 u0000 rmb 1
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
24 parray rmb 13
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
25 pcount rmb 1
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
26 buff rmb 200
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
27 endsect
1758
a8bb0834424e commented backup
boisy
parents: 1755
diff changeset
28
2782
aaba193af04f Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents: 1869
diff changeset
29 * psect tee_a,Prgrm+Objct,ReEnt+rev,edition,200,start
aaba193af04f Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents: 1869
diff changeset
30 section text
aaba193af04f Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents: 1869
diff changeset
31
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
32 start clrb
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
33 clr pcount clear path counter
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
34 cmpy #$0000 any parameters?
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
35 lbeq exitok exit if none
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
36 leay parray else point Y to path array
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
37
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
38 * Walk the command line parameters
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
39 parse lda ,x+
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
40 cmpa #C$SPAC
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
41 beq parse
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
42 cmpa #C$COMA
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$CR
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
45 lbeq parsex
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
46 * We've found a file or device name
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
47 leax -1,x
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
48 lda #WRITE.
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
49 ldb #PREAD.+UPDAT.
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
50 os9 I$Create open a path to the device or file
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
51 bcs exit branch if error
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
52 ldb pcount else get path counter
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
53 sta b,y save new path in the array offset
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
54 incb increment counter
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
55 stb pcount and save
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
56 bra parse continue parsing command line
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
57 parsex stb pcount
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
58
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
59 * Devices on command line are open, start pumping data
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
60 L0044 clra
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
61 leax buff
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
62 ldy #256
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
63 os9 I$ReadLn
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
64 bcc L0057
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
65 cmpb #E$EOF
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
66 beq exitok
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
67 coma
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
68 bra exit
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
69 L0057 inca
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
70 os9 I$WritLn
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
71 tst pcount
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
72 beq L0044
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
73 clrb
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
74 L0060 leay parray
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
75 lda b,y
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
76 leax buff
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
77 ldy #256
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
78 os9 I$WritLn
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
79 bcs exit
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
80 incb
1868
cba8a54bc509 Slowly but surely
boisy
parents: 1863
diff changeset
81 cmpb pcount
1755
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
82 bne L0060
28d21787be81 test case for new as6809
boisy
parents:
diff changeset
83 bra L0044
1859
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
84 exitok clrb
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
85 exit os9 F$Exit
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
86
dc2597886264 rma/rlink compatible version of tee.asm
boisy
parents: 1758
diff changeset
87 endsect