Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/list.asm @ 2017:f273e28ea8d0
Breaking kernel down into individual files... added comments
author | boisy |
---|---|
date | Tue, 07 Mar 2006 12:20:16 +0000 |
parents | 84ea83668304 |
children |
rev | line source |
---|---|
0 | 1 ******************************************************************** |
2 * List - List a text file | |
3 * | |
4 * $Id$ | |
5 * | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
824
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:
824
diff
changeset
|
7 * Comment |
0 | 8 * ------------------------------------------------------------------ |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
824
diff
changeset
|
9 * 5 ????/??/?? |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
824
diff
changeset
|
10 * From Tandy OS-9 Level One VR 02.00.00. |
0 | 11 |
12 nam List | |
13 ttl List a text file | |
14 | |
15 * Disassembled 98/09/10 23:16:25 by Disasm v1.6 (C) 1988 by RML | |
16 | |
17 ifp1 | |
18 use defsfile | |
19 endc | |
20 | |
21 tylg set Prgrm+Objct | |
22 atrv set ReEnt+rev | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
824
diff
changeset
|
23 rev set $00 |
0 | 24 edition set 5 |
25 | |
26 mod eom,name,tylg,atrv,start,size | |
824 | 27 |
28 org 0 | |
29 filepath rmb 1 | |
30 parmptr rmb 2 | |
31 readbuff rmb 650 | |
0 | 32 size equ . |
33 | |
34 name fcs /List/ | |
35 fcb edition | |
36 | |
824 | 37 start stx <parmptr save parameter pointer |
38 lda #READ. read access mode | |
39 os9 I$Open open file | |
40 bcs L0049 branch if error | |
41 sta <filepath else save path to file | |
42 stx <parmptr and updated parm pointer | |
43 L001F lda <filepath get path | |
44 leax readbuff,u point X to read buffer | |
45 ldy #200 read up to 200 bytes | |
46 os9 I$ReadLn read it! | |
47 bcs L0035 branch if error | |
48 lda #1 standard output | |
49 os9 I$WritLn write line to stdout | |
50 bcc L001F branch if ok | |
51 bra L0049 else exit | |
52 L0035 cmpb #E$EOF did we get an EOF error? | |
53 bne L0049 exit if not | |
54 lda <filepath else get path | |
55 os9 I$Close and close it | |
56 bcs L0049 branch if error | |
57 ldx <parmptr get param pointer | |
58 lda ,x get char | |
59 cmpa #C$CR end of command line? | |
60 bne start branch if not | |
61 clrb else clear carry | |
62 L0049 os9 F$Exit and exit | |
0 | 63 |
64 emod | |
65 eom equ * | |
66 end |