annotate level1/cmds/tee.a @ 2695:c321d41cd8d3 lwtools-port

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