annotate level1/cmds/tee.asm @ 1891:5f8822fb42e0

shortened H6309L2 code to fit within $1D0 bytes
author robert
date Fri, 14 Oct 2005 01:53:05 +0000
parents 585e04f3959d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
2 * Tee - Split output to multiple devices
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
3 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
4 * $Id$
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
5 *
1325
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 924
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 924
diff changeset
7 * Comment
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
1325
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 924
diff changeset
9 * 2 ????/??/??
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 924
diff changeset
10 * From Tandy OS-9 Level One VR 02.00.00.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12 nam Tee
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13 ttl Split output to multiple devices
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15 * Disassembled 98/09/14 23:50:52 by Disasm v1.6 (C) 1988 by RML
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 tylg set Prgrm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 atrv set ReEnt+rev
1325
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 924
diff changeset
23 rev set $00
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24 edition set 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
27
924
c155aac72190 Made cosmetic changes
boisy
parents: 200
diff changeset
28 org 0
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29 u0000 rmb 1
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
30 parray rmb 13
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
31 pcount rmb 1
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
32 buff rmb 256
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
33 rmb 450
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 name fcs /Tee/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 start clrb
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
40 clr pcount,u clear path counter
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
41 cmpy #$0000 any parameters?
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
42 lbeq exitok exit if none
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
43 leay parray,u else point Y to path array
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
44
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
45 * Walk the command line parameters
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
46 parse lda ,x+
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
47 cmpa #C$SPAC
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
48 beq parse
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
49 cmpa #C$COMA
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
50 beq parse
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
51 cmpa #C$CR
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
52 lbeq parsex
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
53 * We've found a file or device name
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
54 leax -1,x
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
55 lda #WRITE.
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
56 ldb #PREAD.+UPDAT.
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
57 os9 I$Create open a path to the device or file
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
58 bcs exit branch if error
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
59 ldb pcount,u else get path counter
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
60 sta b,y save new path in the array offset
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
61 incb increment counter
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
62 stb pcount,u and save
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
63 bra parse continue parsing command line
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
64 parsex stb pcount,u
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
65
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
66 * Devices on command line are open, start pumping data
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 L0044 clra
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
68 leax buff,u
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
69 ldy #256
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 os9 I$ReadLn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 bcc L0057
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
72 cmpb #E$EOF
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
73 beq exitok
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 coma
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
75 bra exit
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 L0057 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 os9 I$WritLn
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
78 tst pcount,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 beq L0044
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80 clrb
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
81 L0060 leay parray,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 lda b,y
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
83 leax buff,u
13
5a5574d54988 Touched up source comments, added mdir to Makefile
boisy
parents: 0
diff changeset
84 ldy #256
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 os9 I$WritLn
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
86 bcs exit
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87 incb
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
88 cmpb pcount,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 bne L0060
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90 bra L0044
1752
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
91 exitok clrb
585e04f3959d Start of some commenting
boisy
parents: 1325
diff changeset
92 exit os9 F$Exit
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96 end