Mercurial > hg > Members > kono > nitros9-code
annotate level2/modules/scf.asm @ 1099:b77631456f91
Change to makefile
author | roug |
---|---|
date | Wed, 09 Apr 2003 19:02:19 +0000 |
parents | 8f1263d3e3d5 |
children | a3d0ac951684 |
rev | line source |
---|---|
0 | 1 ******************************************************************** |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
2 * SCF - OS-9 Level Two Sequential Character File Manager |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
3 * |
939 | 4 * $Id$ |
5 * | |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
6 * This contains an added SetStat call to allow placing prearranged data |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
7 * into the keyboard buffer of ANY SCF related device. |
0 | 8 * |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
9 * Usage: |
0 | 10 * |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
11 * Entry: X = Pointer to the string |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
12 * Y = Length of the string |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
13 * A = Path number |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
14 * B = SS.Fill ($A0) (syscall SETSTAT function call number) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
15 * NOTE: If high bit of Y is set, no carriage return will be appended to |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
16 * the read buffer (used in Shellplus V2.2 history) |
0 | 17 * |
18 * This also includes Kevin Darlings SCF Editor patches. | |
19 * | |
20 * Ed. Comments Who YY/MM/DD | |
21 * ------------------------------------------------------------------ | |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
22 * Merged NitrOS-9 and TuneUp versions for BGP 02/10/11 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
23 * single-source maintenance. Note that |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
24 * the 6809 version of TuneUp never seemed |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
25 * to call GrfDrv directly to do fast screen |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
26 * writes (see note around g.done label) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
27 * |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
28 * NitrOS9 V1.09 Additions: |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
29 * 04/20/93: Speeded up L05CC (write char to device) routine by a few cycles |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
30 * : Slightly optomized Insert char |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
31 * : Move branch table so Read & ReadLn are 1 cycle faster each |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
32 * : Fixed SS.Fill so size is truncated @ 256 bytes |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
33 * : Added NO CR option to SS.Fill (for use with modified |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
34 * Shellplus V2.2 command history) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
35 * 04/21/93: Slight speedup to some of ReadLn parsing, TFM's in Open/Close |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
36 * : More optomization to read/write driver calls |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
37 * : Got rid of branch table @ L05E3 for speed |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
38 * NitrOS9 V1.10 Additions: |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
39 * 05/25/93: Added Boisy Pitre's patch for non-sharable devices |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
40 * 05/27/93: Saved 4 cycles in routine @ L042B |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
41 * : Modified Boisy's routine to not pshs/puls B (saves 2 cycles) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
42 * : Changed buffer prefill of CR's to save 1 byte |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
43 * NitrOS9 V1.11 Additions: |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
44 * 07/27/93: Changed a BRA to a LBRA to a straight LBRA in L0322 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
45 * : Optomized path option character routine @ L032C |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
46 * 08/03/93: Modified vector table @ L033F to save 1 cycle on PD.PSC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
47 * : Sped up uppercase conversion checks for ReadLn & WritLn |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
48 * : Changed 2 BRA's to L02F9 to do an LBRA straight to L05F8 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
49 * (ReadLn loop) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
50 * : Moved L0565 routine so Reprint line, Insert & Delete char (on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
51 * ReadLn) are 1 cycle faster / char printed |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
52 * : Changed 2 references to L0420 to go straight to L0565 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
53 * : Sped up ReadLn loop by 2 or 3 cycles per char read |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
54 * NitrOS9 V1.20 Additions: |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
55 * 09/21/93: Sped up L0435 by 1 or 2 cycles (depending on branch) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
56 * : Changed LDD ,S to TFR X,D (saves 1 cycle) @ L04F1 (Write & WritLn) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
57 * : Modified L04F1 to use W without TFR (+1 byte, -3 cycles) (Write) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
58 * 11/09/93: Took LDX #0/LDU PD.BUF,y from L03B5 & merged in @ L028A, L02EF & |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
59 * L0381. Also changed BEQ @ L03A5 to skip re-loading X with 0. |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
60 * 11/10/93: Moved L04B2 routine to allow a couple of BSR's instead of LBSR's |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
61 * In READ. |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
62 * : Moved driver call right into READ loop (should save 25 cycles/char |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
63 * read) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
64 * : Moved driver call right into L0565 (should save 12 cycles/char |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
65 * written on echo, line editing, etc.) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
66 * 11/26/93: Moved L02FE (ReadLn parsing) to end where ReadLn routine is |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
67 * Moved L03E2 so Read loop would be optomized for it (read char |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
68 * from driver) instead of L042B (write filled buffer to caller) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
69 * Changed LDA #C$NULL to CLRA |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
70 * 12/01/93: Modified device write call (L056F) to preserve Y as well, to cut |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
71 * down on PSHS/PULS |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
72 * Changed L03E2 & L03DA to exit immediately if PD.DEV or PD.DV2 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
73 * (depending on which routine) is empty (eliminated redundant |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
74 * LEAX ,X) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
75 * 05/31/94: Attempted mode to L03F1 to eliminate LDW #D$READ, changed |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
76 * LDX V$DRIV,x/ADDW M$Exec,x/JSR w,x to LDW V$DRIV,x/ADDW M$Exec,w/ |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
77 * jsr D$READ,w |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
78 * Did same to L05C9 & L056F (should speed up each by 1 cycle) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
79 * 06/07/94: Attempted to modify all M$Exec calls to use new V$DRIVEX |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
80 * (REQUIRES NEW IOMAN) - L01FA (Get/SetStat), L03F1 (Read), L05C9 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
81 * (Write), L056F (Write) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
82 * Changed L046A to use LDB V.BUSY,x...CMPB ,s...TFR B,A |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
83 * 06/08/94: Changed TST <PD.EKO,y in read loop (L02BC) to LDB PD.EKO,y |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
84 * Changed LEAX 1,X to LDB #1/ABX @ L02C4 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
85 * Changed LEAX >L033F,pc @ L032C to use < (8 bit) version |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
86 * Modified L02E5 to use D instead of X, allowing TSTA, and faster |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
87 * exit on 0 byte just BRAnching to L0453 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
88 * 06/09/94: Changed LEAX 1,X to LDB #1/ABX @ L053D, L05F8, L0312, L0351, |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
89 * L03B8 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
90 * Changed to L0573: All TST's changed to LDB's |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
91 * Changed Open/Create init to use LEAX ,pc instead of BSR/PULS X |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
92 * Changed TST PD.CNT,y to LDA PD.CNT,y @ close |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
93 * Eliminated L010D, changed references to it to go to L0129 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
94 * Eliminated useless LEAX ,X @ L0182, and changed BEQ @ L0182 to go |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
95 * to L012A instead of L0129 (speeds CLOSE by 5 or 10 cycles) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
96 * Moved L06B9 into L012B, eliminate BSR/RTS, plus |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
97 * Changed TST V.TYPE,x to LDB V.TYPE,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
98 * Moved L0624 to just before L05F8 to eliminate BRA L05F8 (ReadLn) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
99 * Changed TST PD.EKO,y @ L0413 to LDB PD.EKO,y |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
100 * Moved L0413-L0423 routines to later in code to allow short branches |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
101 * As result of above, changed 6 LBxx to Bxx |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
102 * Changed TST PD.MIN,y @ L04BB to LDA PD.MIN,y |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
103 * Changed TST PD.RAW,y/TST PD.UPC,y @ L0523 to LDB's |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
104 * Changed TST PD.ALF,y @ L052A to LDB |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
105 * L053D: Moved TST PD.RAW,y to before LDA -1,u to speed up WRITE, |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
106 * changed it to LDB |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
107 * 06/10/94: Changed TST PD.ALF,y to LDB @ L052A |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
108 * Changed CLR V.WAKE,u to CLRA/STA V.WAKE,u @ L03F1 (Read) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
109 * Changed CLR V.BUSY,u to CLRA/STA V.BUSY,u @ L045D |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
110 * Changed CLR PD.MIN,y to CLRA/STA PD.MIN,y, moved before LDA |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
111 * P$ID,x @ L04A7 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
112 * Changed CLR PD.RAW,y @ L04BB to STA PD.RAW, since A already 0 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
113 * to get there |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
114 * Changed CLR V.PAUS,u to CLRA/STA V.PAUS,u @ L05A2 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
115 * Changed TST PD.RAW,y to LDA PD.RAW,y @ L05A2 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
116 * Changed TST PD.ALF,y to LDA PD.ALF,y @ L05A2 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
117 * Changed CLR V.WAKE,u to CLRB/STB V.WAKE,u @ L05C9 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
118 * Changed CLR V.WAKE,u to CLRB/STB V.WAKE,u @ L056F |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
119 * Changed TST PD.UPC,y to LDB PD.UPC,y @ L0322 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
120 * Changed TST PD.DLO,y/TST PD.EKO,y to LDB's @ L03A5 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
121 * 06/16/94: Changed TST PD.UPC,y to LDB PD.UPC,y @ L0322 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
122 * Changed TST PD.BSO,y to LDB PD.BSO,y @ L03BF |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
123 * Changed TST PD.EKO,y to LDB PD.EKO,y @ L03BF |
0 | 124 |
125 nam SCF | |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
126 ttl OS-9 Level Two Sequential Character File Manager |
0 | 127 |
939 | 128 IFP1 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
129 use defsfile |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
130 use scfdefs |
939 | 131 ENDC |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
132 |
939 | 133 tylg set FlMgr+Objct |
134 atrv set ReEnt+rev | |
135 rev set 1 | |
136 edition equ 16 | |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
137 |
939 | 138 mod eom,SCFName,tylg,atrv,SCFEnt,0 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
139 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
140 SCFName fcs /SCF/ |
939 | 141 fcb edition |
0 | 142 |
143 | |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
144 * Default input buffer setting for SCF devices when Opened/Created |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
145 * 123456789!123456789!1234567890 |
697 | 146 *msg fcc 'by B.Nobel,C.Boyle,W.Gale-1993' |
147 msg fcc 'OS-9 Rocks!' | |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
148 msgsize equ *-msg Size of default input buffer message |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
149 fcb C$CR 2nd CR for buffer pad fill |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
150 blksize equ 256-msgsize Size of blank space after it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
151 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
152 * Return bad pathname error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
153 opbpnam puls y |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
154 bpnam comb Set carry for error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
155 ldb #E$BPNam Get error code |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
156 openerr rts Return to caller |
0 | 157 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
158 * I$Create/I$Open entry point |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
159 * Entry: Y= Path dsc. ptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
160 open ldx PD.DEV,y Get device table pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
161 stx PD.TBL,y Save it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
162 ldu PD.RGS,y Get callers register stack pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
163 pshs y Save path descriptor pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
164 ldx R$X,u Get pointer to device pathname |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
165 os9 F$PrsNam Parse it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
166 bcs opbpnam Error, exit |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
167 tsta End of pathname? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
168 bmi open1 Yes, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
169 leax ,y Point to actual device name |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
170 os9 F$PrsNam Parse it again |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
171 bcc opbpnam Return to caller with bad path name if more |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
172 open1 sty R$X,u Save updated name pointer to caller |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
173 puls y Restore path descriptor pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
174 ldd #256 Get size of input buffer in bytes |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
175 os9 F$SRqMem Allocate it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
176 bcs openerr Can't allocate it return with error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
177 stu PD.BUF,y Save buffer address to path descriptor |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
178 leax <msg,pc Get ptr to init string |
0 | 179 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
180 IFNE H6309 |
0 | 181 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
182 ldw #msgsize get size of default message |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
183 tfm x+,u+ Copy it into buffer (leaves X pointing to 2nd CR) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
184 ldw #blksize Size of rest of buffer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
185 tfm x,u+ Fill rest of buffer with CR's |
0 | 186 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
187 ELSE |
0 | 188 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
189 CopyMsg lda ,x+ |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
190 sta ,u+ |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
191 decb |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
192 cmpa #C$CR |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
193 bne CopyMsg |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
194 CopyCR sta ,u+ |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
195 decb |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
196 bne CopyCR |
0 | 197 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
198 ENDC |
0 | 199 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
200 ldu PD.DEV,y Get device table entry address |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
201 beq bpnam Doesn't exist, exit with bad pathname error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
202 ldx V$STAT,u Get devices' static storage address |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
203 lda PD.PAG,y Get devices page length |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
204 sta V.LINE,x Save it to devices static storage |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
205 ldx V$DESC,u Get descriptor address |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
206 ldd PD.D2P,y Get offset to device name (duplicate from dev dsc) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
207 beq L00CF None, skip ahead |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
208 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
209 IFNE H6309 |
0 | 210 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
211 addr d,x Point to device name in descriptor |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
212 lda PD.MOD,y Get device mode (Read/Write/Update) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
213 lsrd ??? (swap Read/Write bits around in A?) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
214 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
215 ELSE |
0 | 216 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
217 leax d,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
218 lda PD.MOD,y Get device mode (Read/Write/Update) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
219 lsra |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
220 rorb |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
221 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
222 ENDC |
0 | 223 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
224 lsra |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
225 rolb |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
226 rola |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
227 rorb |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
228 rola |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
229 pshs y Save path descriptor pointer temporarily |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
230 ldy <D.Proc Get current process pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
231 ldu <D.SysPrc Get system process descriptor pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
232 stu <D.Proc Make system current process |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
233 os9 I$Attach Attempt to attach to device name in device desc. |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
234 sty <D.Proc Restore old current process pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
235 puls y Restore path descriptor pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
236 bcs L0111 Couldn't attach to device, detach & exit with error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
237 stu PD.DV2,y Save new output (echo) device table pointer |
697 | 238 * ldu PD.DEV,y Get device table pointer |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
239 L00CF ldu V$STAT,u Point to it's static storage |
0 | 240 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
241 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
242 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
243 clrd |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
244 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
245 ELSE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
246 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
247 clra |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
248 clrb |
0 | 249 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
250 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
251 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
252 std PD.PLP,y Clear out path descriptor list pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
253 sta PD.PST,y Clear path status: Carrier not lost |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
254 pshs d Save 0 on stack |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
255 ldx V.PDLHd,u Get path descriptor list header pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
256 * 05/25/93 mod - Boisy Pitre's non-sharable device patches |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
257 beq Yespath No path's open, so we know we can open it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
258 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
259 IFNE H6309 |
0 | 260 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
261 pshs u,x Preserve static mem & path dsc. hdr ptrs & 0 byte? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
262 ldu PD.DEV,y Get device table ptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
263 ldx V$DRIV,u Get ptr to device driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
264 tim #SHARE.,M$Mode,x Non-sharable driver? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
265 bne NoShare Yes, driver busy |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
266 ldx V$DESC,u Get ptr to device descriptor |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
267 tim #SHARE.,M$Mode,x Non-sharable device? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
268 beq Shrble No, check for carrier status |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
269 NoShare puls u,x Restore regs |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
270 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
271 ELSE |
0 | 272 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
273 pshs u,x,b Preserve static mem & path dsc. hdr ptrs & 0 byte? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
274 ldu PD.DEV,y Get device table ptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
275 ldx V$DRIV,u Get ptr to device driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
276 ldb M$Mode,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
277 bitb #SHARE. |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
278 bne NoShare |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
279 ldx V$DESC,u Get ptr to device driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
280 ldb M$Mode,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
281 bitb #SHARE. |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
282 beq Shrble |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
283 NoShare puls u,x,b Restore regs |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
284 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
285 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
286 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
287 leas 2,s Eat extra stack (including good path count) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
288 comb |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
289 ldb #E$DevBsy Non-sharable device busy error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
290 bra L0111 Go detach device & exit with error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
291 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
292 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
293 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
294 Shrble puls u,x Restore Static mem & path dsc. ptrs |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
295 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
296 ELSE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
297 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
298 Shrble puls u,x,b Restore Static mem & path dsc. ptrs |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
299 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
300 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
301 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
302 bra L00E8 Check carrier status |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
303 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
304 Yespath sty V.PDLHd,u Save path descriptor ptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
305 bra L00F8 Go open the path |
0 | 306 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
307 L00E6 tfr d,x Change to PD.PLP path descriptor |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
308 L00E8 ldb PD.PST,x Get Carrier status |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
309 bne L00EF Carrier was lost, don't update count |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
310 inc 1,s Carrier not lost, bump up count of good paths |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
311 L00EF ldd PD.PLP,x Get path descriptor list pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
312 bne L00E6 There is one, go make it the current one |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
313 sty PD.PLP,x Save path descriptor ptr as path dsc. list ptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
314 L00F8 lda #SS.Open Internal open call |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
315 pshs a Save it on the stack |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
316 inc 2,s Bump counter of good paths up by 1 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
317 lbsr L025B Do the SS.Open call to the driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
318 lda 2,s Get counter of good paths |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
319 leas 3,s Eat stack |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
320 deca Bump down good path count |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
321 bne L0129 If more still open, exit without error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
322 blo L010F If negative, something went wrong |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
323 lbra L0250 Set parity/baud & return |
0 | 324 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
325 L010F bsr L0149 Error, go clear stuff out |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
326 L0111 pshs b,cc Preserve error status |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
327 bsr L0136 Detach device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
328 puls pc,b,cc Restore error status & return |
0 | 329 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
330 * I$Close entry point |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
331 close pshs cc Preserve interrupt status |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
332 orcc #IntMasks Disable interrupts |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
333 ldx PD.DEV,y Get device table pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
334 bsr L0182 Check it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
335 ldx PD.DV2,y Get output device table pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
336 bsr L0182 Check it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
337 puls cc Restore interrupts |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
338 lda PD.CNT,y Any open images? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
339 beq L012B No, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
340 L0129 clra Clear carry |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
341 L012A rts Return |
0 | 342 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
343 * Detach device & return buffer memory |
0 | 344 L012B bsr L0149 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
345 lda #SS.Close Get setstat code for close |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
346 ldx PD.DEV,y get pointer to device table |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
347 ldx V$STAT,x get static mem ptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
348 ldb V.TYPE,x Get device type \ WON'T THIS SCREW UP WITH |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
349 bmi L0136 Window, skip ahead / MARK OR SPACE PARITY??? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
350 pshs x,a Save close code & X for SS.Close calling routine |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
351 lbsr L025B Not window, go call driver's SS.Close routine |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
352 leas 3,s Purge stack |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
353 L0136 ldu PD.DV2,y Get output device pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
354 beq L013D Nothing there, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
355 os9 I$Detach Detach it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
356 L013D ldu PD.BUF,y Get buffer pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
357 beq L0147 None defined go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
358 ldd #256 Get buffer size |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
359 os9 F$SRtMem Return buffer memory to system |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
360 L0147 clra Clear carry |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
361 rts Return |
0 | 362 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
363 L0149 ldx #1 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
364 pshs cc,d,x,y,u |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
365 ldu PD.DEV,y Get device table pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
366 beq L017B None, skip ahead |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
367 ldu V$STAT,u Get static storage pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
368 beq L017B None, skip ahead |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
369 ldx V.PDLHd,u Get path descriptor list header |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
370 beq L017B None, skip ahead |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
371 ldd PD.PLP,y Get path descriptor list pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
372 cmpy V.PDLHd,u |
0 | 373 bne L0172 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
374 std V.PDLHd,u |
0 | 375 bne L017B |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
376 clr 4,s Clear LSB of X on stack |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
377 bra L017B Return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
378 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
379 L016D ldx PD.PLP,x |
0 | 380 beq L0180 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
381 L0172 cmpy PD.PLP,x |
0 | 382 bne L016D |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
383 std PD.PLP,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
384 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
385 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
386 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
387 L017B clrd |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
388 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
389 ELSE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
390 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
391 L017B clra |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
392 clrb |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
393 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
394 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
395 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
396 std PD.PLP,y |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
397 L0180 puls cc,d,x,y,u,pc |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
398 |
0 | 399 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
400 * Check path number? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
401 * Entry: X=Ptr to device table (just LDX'd) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
402 * Y=Path dsc. ptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
403 L0182 beq L012A No device table, return to caller |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
404 ldx V$STAT,x Get static storage pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
405 ldb PD.PD,y Get system path number from path dsc. |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
406 lda PD.CPR,y Get ID # of process currently using path |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
407 pshs d,x,y Save everything |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
408 cmpa V.LPRC,x Current process same as last process using path? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
409 bne L01CA No, return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
410 ldx <D.Proc Get current process pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
411 leax P$Path,x Point to local path table |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
412 clra Start path # = 0 (Std In) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
413 L0198 cmpb a,x Same path as one is process' local path list? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
414 beq L01CA Yes, return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
415 inca Move to next path |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
416 cmpa #NumPaths Done all paths? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
417 blo L0198 No, keep going |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
418 pshs y Preserve path descriptor pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
419 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
420 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
421 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
422 lda #SS.Relea Release signals SetStat |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
423 ldf #D$PSTA Get Setstat offset |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
424 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
425 ELSE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
426 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
427 ldd #SS.Relea*256+D$PSTA |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
428 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
429 ENDC |
0 | 430 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
431 bsr L01FA Execute driver setstat routine |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
432 puls y Restore path pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
433 ldx <D.Proc Get current process pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
434 lda P$PID,x Get parent process ID |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
435 sta ,s Save it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
436 os9 F$GProcP Get pointer to parent process descriptor |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
437 leax P$Path,y Point to local path table |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
438 ldb 1,s Get path number |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
439 clra Get starting path number |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
440 L01B9 cmpb a,x Same path? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
441 beq L01C4 Yes, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
442 inca Move to next path |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
443 cmpa #NumPaths Done all paths? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
444 blo L01B9 No, keep checking |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
445 clr ,s Clear process ID |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
446 L01C4 lda ,s Get process ID |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
447 ldx 2,s Get static storage pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
448 sta V.LPRC,x Store it as last process |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
449 L01CA puls d,x,y,pc Restore & return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
450 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
451 * I$GetStt entry point |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
452 getstt lda PD.PST,y Path status ok? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
453 lbne L04C6 No, terminate process |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
454 ldx PD.RGS,y Get register stack pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
455 lda R$B,x Get function code |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
456 bne L01F8 If not SS.Opt, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
457 * SS.Opt Getstat |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
458 pshs a,x,y Preserve registers |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
459 lda #SS.ComSt Get code for Comstat |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
460 sta R$B,x Save it in callers B |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
461 ldu R$Y,x Preserve callers Y |
0 | 462 pshs u |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
463 bsr L01F8 Send it to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
464 puls u Restore callers Y |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
465 puls a,x,y Restore registers |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
466 sta R$B,x Do SS.OPT |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
467 ldd R$Y,x Get com stat |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
468 stu R$Y,x Put original callers Y back |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
469 bcs L01F6 Return if error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
470 std PD.PAR,y Update path descriptor |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
471 L01F6 clrb Clear carry |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
472 L01F7 rts Return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
473 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
474 * Execute device driver Get/Set Status routine |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
475 * Entry: A=GetStat/SetStat code |
0 | 476 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
477 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
478 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
479 L01F8 ldf #D$GSTA Get Getstat driver entry offset |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
480 L01FA ldx PD.DEV,y Get device table pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
481 ldu V$STAT,x Get static storage pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
482 ldx V$DRIVEX,x get execution pointer of driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
483 pshs y,u Preserve registers |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
484 jsr f,x Execute driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
485 puls y,u,pc Restore & return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
486 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
487 ELSE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
488 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
489 L01F8 ldb #D$GSTA |
0 | 490 L01FA pshs a |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
491 clra |
0 | 492 ldx PD.DEV,y |
493 ldu V$STAT,x | |
494 ldx V$DRIV,x | |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
495 addd M$Exec,x |
0 | 496 leax d,x |
497 puls a | |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
498 pshs u,y |
0 | 499 jsr ,x |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
500 puls y,u,pc |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
501 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
502 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
503 |
0 | 504 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
505 * I$SetStt entry point |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
506 setstt lbsr L04A2 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
507 L0212 bsr L021B Check codes |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
508 pshs cc,b Preserve registers |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
509 lbsr L0453 Wait for device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
510 puls cc,b,pc Restore & return |
0 | 511 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
512 putkey cmpa #SS.Fill Buffer preload? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
513 bne L01FA No, go execute driver setstat |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
514 IFEQ H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
515 pshs u,y,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
516 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
517 ldx <D.Proc Get current process pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
518 lda R$Y,u Get flag byte for CR/NO CR |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
519 pshs a Save it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
520 lda P$Task,x Get task number |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
521 ldb <D.SysTsk Get system task |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
522 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
523 ldx R$X,u Get pointer to data to move |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
524 ldf R$Y+1,u Get number of bytes (max size of 256 bytes) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
525 ldu PD.BUF,y Get input buffer pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
526 clre High byte of Y |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
527 tfr w,y Move size into proper register for F$Move |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
528 ELSE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
529 pshs d |
525 | 530 clra |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
531 ldb R$Y+1,u |
0 | 532 ldx R$X,u |
533 ldu PD.BUF,y | |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
534 tfr d,y |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
535 puls d |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
536 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
537 * X=Source ptr from caller, Y=# bytes to move, U=Input buffer ptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
538 os9 F$Move Move it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
539 bcs putkey1 Exit if error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
540 tfr y,d Move number of bytes to D |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
541 lda ,s Get CR flag |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
542 bmi putkey1 Don't want CR appended, exit |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
543 lda #C$CR Get code for carriage return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
544 sta b,u Put it in buffer to terminate string |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
545 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
546 putkey1 puls a,pc Eat stack & return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
547 L021B ldf #D$PSTA Get driver entry offset for setstat |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
548 ELSE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
549 putkey1 puls a,x,y,u,pc Eat stack & return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
550 L021B ldb #D$PSTA Get driver entry offset for setstat |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
551 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
552 lda R$B,u Get function code from caller |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
553 bne putkey Not SS.OPT, go check buffer load |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
554 * SS.OPT SETSTAT |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
555 ldx PD.PAU,y Get current pause & page |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
556 pshs y,x Preserve Path pointer & pause/page |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
557 ldx <D.Proc Get current process pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
558 lda P$Task,x Get task number |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
559 ldb <D.SysTsk Get system task number |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
560 ldx R$X,u Get callers destination pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
561 leau PD.OPT,y Point to path options |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
562 ldy #OPTCNT Get option length |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
563 os9 F$Move Move it to caller |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
564 puls y,x Restore Path pointer & page/pause status |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
565 bcs L01F7 Return if error from move |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
566 IFEQ H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
567 pshs x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
568 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
569 ldd PD.PAU,y Get new page/pause status |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
570 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
571 cmpr d,x Same as old? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
572 ELSE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
573 cmpd ,s++ |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
574 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
575 beq L0250 Yes, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
576 ldu PD.DEV,y Get device table pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
577 ldu V$STAT,u Get static storage pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
578 beq L0250 Go on if none |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
579 stb V.LINE,u Update new line count |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
580 L0250 ldx PD.PAR,y Get parity/baud |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
581 lda #SS.ComSt Get code for ComSt |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
582 pshs a,x Preserve them |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
583 bsr L025B Update parity & baud |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
584 puls a,x,pc Restore & return |
0 | 585 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
586 * Update path Parity & baud |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
587 L025B pshs x,y,u Preserve everything |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
588 ldx PD.RGS,y Get callers register pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
589 ldu R$Y,x Get his Y |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
590 lda R$B,x Get his B |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
591 pshs a,x,y,u Preserve it all |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
592 ldd $10,s Get current parity/baud |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
593 std R$Y,x Put it in callers Y |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
594 lda $0F,s Get function code |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
595 sta R$B,x Put it in callers B |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
596 IFEQ H6309 |
0 | 597 ldb #$0C |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
598 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
599 lbsr L04A7 Wait for device to be ready |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
600 lbsr L0212 Send it to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
601 puls a,x,y,u Restore callers registers |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
602 stu R$Y,x Put back his Y |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
603 sta R$B,x Put back his B |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
604 bcc L0282 Return if no error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
605 cmpb #E$UnkSvc Unknown service request? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
606 beq L0282 Yes, return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
607 coma Set carry |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
608 L0282 puls x,y,u,pc Restore & return |
0 | 609 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
610 * I$Read entry point |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
611 read lbsr L04A2 Go wait for device to be ready for us |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
612 bcc L028A No error, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
613 L0289 rts Return with error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
614 L028A inc PD.RAW,y Make sure we do Raw read |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
615 ldx R$Y,u Get number of characters to read |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
616 beq L02DC Return if zero |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
617 pshs x Save character count |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
618 ldx #0 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
619 ldu PD.BUF,y Get buffer address |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
620 bsr L03E2 Read 1 character from device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
621 bcs L02A4 Return if error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
622 tsta Character read zero? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
623 beq L02C4 Yes, go try again |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
624 cmpa PD.EOF,y End of file character? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
625 bne L02BC No, keep checking |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
626 L02A2 ldb #E$EOF Get EOF error code |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
627 L02A4 leas 2,s Purge stack |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
628 pshs b Save error code |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
629 bsr L02D5 Return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
630 comb Set carry |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
631 puls b,pc Restore & return |
0 | 632 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
633 ****************************** |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
634 * |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
635 * SCF file manager entry point |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
636 * |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
637 * Entry: Y = Path descriptor pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
638 * U = Callers register stack pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
639 * |
0 | 640 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
641 SCFEnt lbra open Create path |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
642 lbra open Open path |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
643 lbra bpnam Makdir |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
644 lbra bpnam Chgdir |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
645 lbra L0129 Delete (return no error) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
646 lbra L0129 Seek (return no error) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
647 bra read Read character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
648 nop |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
649 lbra write Write character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
650 lbra readln ReadLn |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
651 lbra writln WriteLn |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
652 lbra getstt Get Status |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
653 lbra setstt Set Status |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
654 lbra close Close path |
0 | 655 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
656 * MAIN READ LOOP (no editing) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
657 L02AD tfr x,d move character count to D |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
658 tstb past buffer end? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
659 bne L02B7 no, go get character from device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
660 * Not often used: only when buffer is full |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
661 bsr L042B move buffer to caller's buffer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
662 ldu PD.BUF,y reset buffer pointer back to start |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
663 * Main char by char read loop |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
664 L02B7 bsr L03E2 get a character from device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
665 bcs L02A4 exit if error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
666 L02BC ldb PD.EKO,y echo turned on? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
667 beq L02C4 no, don't write it to device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
668 lbsr L0565 send it to device write |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
669 L02C4 ldb #1 Bump up char count |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
670 abx |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
671 sta ,u+ save character in local buffer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
672 beq L02CF go try again if it was a null |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
673 cmpa PD.EOR,y end of record charcter? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
674 beq L02D3 yes, return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
675 L02CF cmpx ,s done read? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
676 blo L02AD no, keep going till we are |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
677 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
678 L02D3 leas 2,s purge stack |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
679 L02D5 bsr L042B move local buffer to caller |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
680 ldu PD.RGS,y get register stack pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
681 stx R$Y,u save number of characters read |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
682 L02DC bra L0453 update path descriptor and return |
0 | 683 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
684 * Read character from device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
685 L03E2 pshs u,y,x Preserve regs |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
686 ldx PD.DEV,y Get device table pointer for input |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
687 beq L0401 None, exit |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
688 ldu PD.DV2,y Get device table pointer for echoed output |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
689 beq L03F1 No echoed output device, skip ahead |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
690 L03EA ldu V$STAT,u Get device static storage ptr for echo device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
691 ldb PD.PAG,y Get lines per page |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
692 stb V.Line,u Store it in device static |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
693 L03F1 tfr u,d Yes, move echo device' static storage to D |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
694 ldu V$STAT,x Get static storage ptr for input |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
695 std V.DEV2,u Save echo device's static storage into input device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
696 clra |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
697 sta V.WAKE,u Flag input device to be awake |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
698 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
699 ldx V$DRIVEX,x Get driver execution pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
700 ELSE |
0 | 701 ldx PD.DEV,y |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
702 ldx V$DRIV,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
703 ldd M$Exec,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
704 leax d,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
705 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
706 jsr D$READ,x Execute READ routine in driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
707 L0401 puls pc,u,y,x Restore regs & return |
0 | 708 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
709 * Move buffer to caller |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
710 * Entry: Y=Path dsc. ptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
711 * X=# chars to move |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
712 L042B pshs y,x Preserve path dsc. ptr & char. count |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
713 ldd ,s Get # bytes to move |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
714 beq L0451 Exit if none |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
715 tstb Uneven # bytes (not even page of 256)? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
716 bne L0435 Yes, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
717 deca >256, so bump MSB down |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
718 L0435 clrb Force to even page |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
719 ldu PD.RGS,y Get callers register stack pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
720 ldu R$X,u Get ptr to caller's buffer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
721 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
722 addr d,u Offset to even page into buffer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
723 clre Clear MSB of count |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
724 ldf 1,s LSB of count on even page? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
725 bne L0442 No, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
726 ince Make it even 256 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
727 L0442 lda <D.SysTsk Get source task number |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
728 ELSE |
0 | 729 leau d,u |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
730 clra |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
731 ldb 1,s |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
732 bne L0442 No, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
733 inca |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
734 L0442 pshs d |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
735 lda <D.SysTsk Get source task number |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
736 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
737 ldx <D.Proc Get destination task number |
0 | 738 ldb P$Task,x |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
739 ldx PD.BUF,y Get buffer pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
740 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
741 tfr w,y Put count into proper register |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
742 ELSE |
0 | 743 puls y |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
744 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
745 os9 F$Move Move it to caller |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
746 L0451 puls pc,y,x Restore & return |
0 | 747 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
748 * I$ReadLn entry point |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
749 readln bsr L04A2 Go wait for device to be ready for us |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
750 bcc L02E5 No error, continue |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
751 rts Error, exit with it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
752 L02E5 ldd R$Y,u Get character count |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
753 beq L0453 If none, mark device as un-busy |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
754 tsta Past 256 bytes? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
755 beq L02EF No, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
756 ldd #$0100 Get new character count |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
757 L02EF pshs d Save character count |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
758 ldd #$FFFF Get maximum character count |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
759 std PD.MAX,y Store it in path descriptor |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
760 ldx #0 Set character count so far to 0 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
761 ldu PD.BUF,y Get buffer ptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
762 lbra L05F8 Go process readln |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
763 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
764 * Wait for device - Clears out V.BUSY if either Default or output devices are |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
765 * no longer busy |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
766 * Modifies X and A |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
767 L0453 ldx <D.Proc Get current process |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
768 lda P$ID,x Get it's process ID |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
769 ldx PD.DEV,y Get device table pointer from our path dsc. |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
770 bsr L045D Check if it's busy |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
771 ldx PD.DV2,y Get output device table pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
772 L045D beq L0467 Doesn't exist, exit |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
773 ldx V$STAT,x Get static storage pointer for our device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
774 cmpa V.BUSY,x Same process as current process? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
775 bne L0467 No, device busy return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
776 clra |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
777 sta V.BUSY,x Yes, mark device as free for use |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
778 L0467 rts Return |
0 | 779 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
780 L0468 pshs x,a Preserve device table entry pointer & process ID |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
781 L046A ldx V$STAT,x Get device static storage address |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
782 ldb V.BUSY,x Get active process ID |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
783 beq L048A No active process, device not busy go reserve it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
784 cmpb ,s Is it our own process? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
785 beq L049F Yes, return without error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
786 bsr L0453 Go wait for device to no longer be busy |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
787 tfr b,a Get process # busy using device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
788 os9 F$IOQu Put our process into the IO Queue |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
789 inc PD.MIN,y Mark device as not mine |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
790 ldx <D.Proc Get current process |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
791 ldb P$Signal,x Get signal code |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
792 lda ,s Get our process id # again for L046A |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
793 beq L046A No signal go try again |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
794 coma Set carry |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
795 puls x,a,pc Restore device table ptr (eat a) & return |
0 | 796 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
797 * Mark device as busy;copy pause/interrupt/quit/xon/xoff chars into static mem |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
798 L048A sta V.BUSY,x Make it as process # busy on this device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
799 sta V.LPRC,x Save it as the last process to use device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
800 lda PD.PSC,y Get pause character from path dsc. |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
801 sta V.PCHR,x Save copy in static storage (faster later) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
802 ldd PD.INT,y Get keyboard interrupt & quit chars |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
803 std V.INTR,x Save copies in static mem |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
804 ldd PD.XON,y Get XON/XOFF chars |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
805 std V.XON,x Save them in static mem too |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
806 L049F clra No error & return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
807 puls pc,x,a Restore A=Process #,X=Dev table entry ptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
808 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
809 * Wait for device? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
810 L04A2 lda PD.PST,y Get path status (carrier) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
811 bne L04C4 If carrier was lost, hang up process |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
812 L04A7 ldx <D.Proc Get current process ID |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
813 clra |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
814 sta PD.MIN,y Flag device is mine |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
815 lda P$ID,x Get process ID # |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
816 ldx PD.DEV,y Get device table pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
817 bsr L0468 Busy? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
818 bcs L04C1 No, return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
819 ldx PD.DV2,y Get output device table pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
820 beq L04BB Go on if it doesn't exist |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
821 bsr L0468 Busy? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
822 bcs L04C1 No, return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
823 L04BB lda PD.MIN,y Device mine? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
824 bne L04A2 No, go wait for it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
825 sta PD.RAW,y Mark device with editing |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
826 L04C1 ldu PD.RGS,y Get register stack pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
827 rts Return |
0 | 828 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
829 * Hangup process |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
830 L04C4 leas 2,s Purge return address |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
831 L04C6 ldb #E$HangUp Get hangup error code |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
832 cmpa #S$Abort Termination signal (or carrier lost)? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
833 blo L04D3 Yes, increment status flag & return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
834 lda PD.CPR,y Get current process ID # using path |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
835 ldb #S$Kill Get kill signal |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
836 os9 F$Send Send it to process |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
837 L04D3 inc PD.PST,y Set path status |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
838 orcc #Carry Set carry |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
839 rts Return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
840 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
841 * I$WritLn entry point |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
842 writln bsr L04A2 Go wait for device to be ready for us |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
843 bra L04E1 Go write |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
844 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
845 * I$Write entry point |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
846 write bsr L04A2 Go wait for device to be ready for us |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
847 inc PD.RAW,y Mark device for raw write |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
848 L04E1 ldx R$Y,u Get number of characters to write |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
849 lbeq L055A Zero so return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
850 pshs x Save character count |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
851 ldx #$0000 Get write data offset |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
852 bra L04F1 Go write data |
0 | 853 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
854 L04EC tfr u,d Move current position in PD.BUF to D |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
855 tstb At 256 (end of PD.BUF)? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
856 bne L0523 No, keep writing from current PD.BUF |
0 | 857 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
858 * Get new block of data to write into [PD.BUF] |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
859 * Only allows up to 32 bytes at a time, and puts them in the last 32 bytes of |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
860 * the 256 byte [PD.BUF] buffer. This way, can use TFR U,D/TSTB to see if fin- |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
861 * inshed |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
862 L04F1 pshs y,x Save write offset & path descriptor pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
863 tfr x,d Move data offset to D |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
864 ldu PD.RGS,y Get register stack pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
865 ldx R$X,u Get pointer to users's WRITE string |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
866 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
867 addr d,x Point to where we are in it now |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
868 ldw R$Y,u Get # chars of original write |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
869 subr d,w Calculate # chars we have left to write |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
870 cmpw #64 More than 64? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
871 bls L0508 No, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
872 ldw #64 Max size per chunk=64 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
873 L0508 ldd PD.BUF,y Get buffer ptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
874 inca Point to PD.BUF+256 (1 byte past end |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
875 subr w,d Subtract data size |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
876 ELSE |
0 | 877 leax d,x |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
878 ldd R$Y,u |
0 | 879 subd ,s |
880 cmpd #$0020 | |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
881 bls L0508 |
0 | 882 ldd #$0020 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
883 L0508 pshs d |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
884 ldd PD.BUF,y |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
885 inca |
0 | 886 subd ,s |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
887 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
888 tfr d,u Move it to U |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
889 lda #C$CR Put a carriage return 1 byte before start |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
890 sta -1,u of write portion of buffer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
891 ldy <D.Proc Get current process pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
892 lda P$Task,y Get the task number |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
893 ldb <D.SysTsk Get system task number |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
894 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
895 tfr w,y Get number of bytes to move |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
896 ELSE |
0 | 897 puls y |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
898 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
899 os9 F$Move Move data to buffer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
900 puls y,x Restore path descriptor pointer and data offset |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
901 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
902 * at this point, we have |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
903 * 0,s = end address of characters to write |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
904 * X = number of characters written |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
905 * Y = PD pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
906 * U = pointer to data buffer to write |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
907 * Use callcode $06 to call grfdrv (old DWProtSW from previous versions, |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
908 * now unused by GrfDrv |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
909 L0523 ldb PD.PAR,y get device parity: bit 7 set = window |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
910 cmpb #$80 is it even potentially a WindInt window? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
911 bne L0524 no, skip the rest of the crap |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
912 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
913 clrb set to no uppercase conversion |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
914 lda PD.RAW,y get raw output flag |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
915 bne g.raw if non-zero, we do raw writes: no conversion |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
916 ldb PD.UPC,y get uppercase conversion flag: 1 = do uppercase |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
917 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
918 g.raw pshs b,x,y,u save length, PD, data buffer pointers |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
919 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
920 lbsr get.wptr get window table ptr into Y |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
921 bcs no.wptr do old method on error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
922 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
923 * now we find out the number of non-control characters to write... |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
924 g.fast lda 5,s grab page number |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
925 inca go to the next page |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
926 clrb at the top of it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
927 subd 5,s take out number of bytes left to write |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
928 pshs b max. number of characters |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
929 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
930 clrb always <256 characters to write |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
931 g.loop lda ,u+ get a character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
932 cmpa #$20 is it a control character? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
933 blo g.done yes, we're done this stint |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
934 tst 1,s get uppercase conversion flag |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
935 beq g.loop1 don't convert |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
936 lbsr L0403 do a lower-uppercase conversion, if necessary |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
937 sta -1,u save again |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
938 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
939 g.loop1 incb done one more character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
940 cmpb ,s done as many as we can? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
941 bne g.loop |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
942 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
943 g.done leas 1,s kill max. count of characters to use |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
944 cmpb #1 one or fewer characters? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
945 bls no.wptr yes, go use old method |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
946 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
947 IFEQ H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
948 * Note: this was present in the TuneUp version of SCF, and seems to |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
949 * never allow grfdrv to be called directly, so did fast text screens |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
950 * ever work in TuneUp??? - BGP |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
951 bra no.wptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
952 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
953 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
954 * now we call grfdrv... |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
955 ldu 5,s get start pointer again |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
956 abx done B more characters... |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
957 stx 1,s save on-stack |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
958 lbsr call.grf go call grfdrv: no error possible on return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
959 leau b,u go up B characters in U, too |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
960 stu 5,s save old U, too |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
961 puls b,x,y,u restore registers |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
962 bra L0544 do end-buffer checks and continue |
0 | 963 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
964 no.wptr puls b,x,y,u restore all registers |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
965 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
966 L0524 lda ,u+ Get character to write |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
967 ldb PD.RAW,y Raw mode? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
968 bne L053D Yes, go write it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
969 ldb PD.UPC,y Force uppercase? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
970 beq L052A No, continue |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
971 bsr L0403 Make it uppercase |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
972 L052A cmpa #C$LF Is it a Line feed? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
973 bne L053D No, go print it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
974 lda #C$CR Get code for carriage return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
975 ldb PD.ALF,y Auto Line feed? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
976 bne L053D Yes, go print carriage return first |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
977 bsr L0573 Print carriage return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
978 bcs L055D If error, go wait for device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
979 lda #C$LF Now, print the line feed |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
980 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
981 * Write character to device (call driver) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
982 L053D bsr L0573 Go write it to device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
983 bcs L055D If error, go wait for device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
984 ldb #1 Bump up # chars we have written |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
985 abx |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
986 L0544 cmpx ,s Done whole WRITE call? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
987 bhs L0554 Yes, go save # chars written & exit |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
988 ldb PD.RAW,y Raw mode? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
989 lbne L04EC Yes, keep writing |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
990 lda -1,u Get the char we wrote |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
991 lbeq L04EC NUL, keep writing |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
992 cmpa PD.EOR,y End of record? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
993 lbne L04EC No, keep writing |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
994 L0554 leas 2,s Eof record, stop & Eat end of buffer ptr??? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
995 L0556 ldu PD.RGS,y Get callers register pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
996 stx R$Y,u Save character count to callers Y |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
997 L055A lbra L0453 Mark device write clear and return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
998 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
999 * Check for forced uppercase |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1000 L0403 cmpa #'a Less then 'a'? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1001 blo L0412 Yes, leave it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1002 cmpa #'z Higher than 'z'? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1003 bhi L0412 Yes, leave it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1004 suba #$20 Make it uppercase |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1005 L0412 rts Return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1006 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1007 L055D leas 2,s Purge stack |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1008 pshs b,cc Preserve registers |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1009 bsr L0556 Wait for device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1010 puls pc,b,cc Restore & return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1011 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1012 * Check for end of page (part of send char to driver) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1013 L0573 pshs u,y,x,a Preserve registers |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1014 ldx PD.DEV,y Get device table pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1015 cmpa #C$CR Carriage return? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1016 bne L056F No, go print it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1017 ldu V$STAT,x Get pointer to device stactic storage |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1018 ldb V.PAUS,u Pause request? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1019 bne L0590 Yes, go pause device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1020 ldb PD.RAW,y Raw output mode? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1021 bne L05A2 Yes, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1022 ldb PD.PAU,y End of page pause enabled? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1023 beq L05A2 No, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1024 dec V.LINE,u Subtract a line |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1025 bne L05A2 Not done, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1026 ldb #$ff do a immediate pause request |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1027 stb V.PAUS,u |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1028 bra L059A Go read next character |
0 | 1029 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1030 L03DA pshs u,y,x Preserve registers |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1031 ldx PD.DV2,y Get output device table pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1032 beq NoOut None, exit |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1033 ldu PD.DEV,y Get device table pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1034 lbra L03EA Process & return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1035 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1036 NoOut puls pc,u,y,x No output device so exit |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1037 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1038 * Wait for pause release |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1039 L0590 bsr L03DA Read next character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1040 bcs L059A Error, try again |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1041 cmpa PD.PSC,y Pause char? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1042 bne L0590 No, try again |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1043 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1044 L059A bsr L03DA Reset line count and read a character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1045 cmpa PD.PSC,y Pause character? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1046 beq L059A Yes, go read again |
0 | 1047 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1048 * Process Carriage return - do auto linefeed & Null's if necessary |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1049 * Entry: A=CHR$($0D) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1050 L05A2 ldu V$STAT,x Get static storage pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1051 clra |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1052 sta V.PAUS,u Clear pause request |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1053 lda #C$CR Carriage return (in cases from pause) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1054 bsr L05C9 Send it to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1055 lda PD.RAW,y Raw mode? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1056 bne L05C7 Yes, return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1057 ldb PD.NUL,y Get end of line null count |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1058 pshs b Save it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1059 lda PD.ALF,y Auto line feed enabled? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1060 beq L05BE No, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1061 lda #C$LF Get line feed code |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1062 L05BA bsr L05C9 Execute driver write routine |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1063 bcs L05C5 Error, purge stack and return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1064 L05BE clra Get null character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1065 dec ,s Done null count? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1066 bpl L05BA No, go send it to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1067 clra Clear carry |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1068 L05C5 leas 1,s Purge stack |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1069 L05C7 puls pc,u,y,x,a Restore & return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1070 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1071 * Execute device driver write routine |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1072 * Entry: A=Character to write |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1073 * Execute device driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1074 * Entry: W=Entry offset (for type of function, ex. Write, Read) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1075 * A=Code to send to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1076 L05C9 ldu V$STAT,x Get device static storage pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1077 pshs y,x Preserve registers |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1078 clrb |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1079 stb V.WAKE,u Wake it up |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1080 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1081 ldx V$DRIVEX,x Get driver execution pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1082 ELSE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1083 pshs a |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1084 ldx V$DRIV,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1085 ldd M$Exec,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1086 leax d,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1087 puls a |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1088 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1089 jsr D$WRIT,x Execute driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1090 puls pc,y,x Restore & return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1091 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1092 * Send character to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1093 L0565 pshs u,y,x,a Preserve registers |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1094 ldx PD.DV2,y Get output device table pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1095 beq L0571 Return if none |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1096 cmpa #C$CR Carriage return? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1097 beq L05A2 Yes, go process it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1098 L056F ldu V$STAT,x Get device static storage pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1099 clrb |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1100 stb V.WAKE,u Wake it up |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1101 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1102 ldx V$DRIVEX,x Get driver execution pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1103 ELSE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1104 ldx V$DRIV,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1105 pshs a |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1106 ldd M$Exec,x |
0 | 1107 leax d,x |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1108 puls a |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1109 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1110 jsr D$WRIT,x Execute driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1111 L0571 puls pc,u,y,x,a Restore & return |
0 | 1112 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1113 * Check for printable character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1114 L0413 ldb PD.EKO,y Echo turned on? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1115 beq NoEcho No, return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1116 L0418 cmpa #C$SPAC CHR$(32) or higher? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1117 bhs L0565 Yes, go send to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1118 cmpa #C$CR Carriage return? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1119 bne L0423 No, change it to a period |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1120 bra L0565 Anything else output to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1121 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1122 NoEcho rts |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1123 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1124 L0423 pshs a Save code |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1125 lda #'. Get code for period |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1126 bsr L0565 Output it to device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1127 puls pc,a Restore & return |
0 | 1128 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1129 L0624 bsr L0418 check if it's printable and send it to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1130 * Process ReadLn |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1131 L05F8 lbsr L03E2 get a character from device |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1132 lbcs L0370 return if error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1133 tsta usable character? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1134 lbeq L02FE no, check path descriptor special characters |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1135 ldb PD.RPR,y get reprint line code |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1136 cmpb #C$RPRT cntrl D? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1137 lbeq L02FE yes, check path descriptor special characters |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1138 cmpa PD.RPR,y reprint line? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1139 bne L0629 no, Check line editor keys |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1140 cmpx PD.MAX,y character count at maximum? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1141 beq L05F8 yes, go read next character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1142 ldb #1 Bump char count up by 1 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1143 abx |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1144 cmpx ,s done? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1145 bhs L0620 yes, exit |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1146 lda ,u+ get character read |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1147 beq L0624 null, go send it to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1148 cmpa PD.EOR,y end of record character? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1149 bne L0624 no, go send it to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1150 leau -1,u bump buffer pointer back 1 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1151 L0620 leax -1,x bump character count back 1 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1152 bra L05F8 go read next character |
0 | 1153 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1154 * Process print rest of line |
939 | 1155 L0629 cmpa #C$PLINE Print rest of line code? |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1156 bne L0647 No, check insert |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1157 L062D pshs u Save buffer pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1158 lbsr L038B Go print rest of line |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1159 lda PD.BSE,y Get backspace echo character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1160 L0634 cmpu ,s Beginning of buffer? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1161 beq L0642 Yes, exit |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1162 leau -1,u Bump buffer pointer back 1 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1163 leax -1,x Bump character count back 1 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1164 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1165 bsr L0565 Print it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1166 ELSE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1167 lbsr L0565 Print it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1168 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1169 bra L0634 Keep going |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1170 L0642 leas 2,s Purge buffer pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1171 bra L05F8 Return |
0 | 1172 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1173 * Process Insert character (NOTE:Currently destroys W) |
939 | 1174 L0647 cmpa #C$INSERT Insert character code? |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1175 bne L0664 No, check delete |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1176 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1177 pshs x,y Preserve x&y a moment |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1178 tfr u,w Dupe buffer pointer into w |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1179 ldf #$fe End of buffer -1 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1180 tfr w,x Source copy address |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1181 incw Include char we are on & dest address is+1 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1182 tfr w,y Destination copy address |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1183 subr u,w w=w-u (Size of copy) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1184 tfm x-,y- Move buffer up one |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1185 puls y,x Get back original y & x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1186 lda #C$SPAC Get code for space |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1187 sta ,u Save it there |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1188 ELSE |
0 | 1189 pshs u |
1190 tfr u,d | |
1191 ldb #$FF | |
1192 tfr d,u | |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1193 L06DE lda ,-u |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1194 sta 1,u |
0 | 1195 cmpu ,s |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1196 bne L06DE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1197 lda #C$SPAC |
0 | 1198 sta ,u |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1199 leas 2,s |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1200 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1201 bra L062D Go print rest of line |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1202 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1203 * Process delete line |
939 | 1204 L0664 cmpa #C$DELETE Delete character code? |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1205 bne L068B No, check end of line |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1206 pshs u Save buffer pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1207 lda ,u Get character there |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1208 cmpa PD.EOR,y End of record? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1209 beq L0687 Yes, don't bother to delete it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1210 L0671 lda 1,u Get character beside it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1211 cmpa PD.EOR,y This an end of record? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1212 beq L067C Yes, delete it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1213 sta ,u+ Bump character back |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1214 bra L0671 Go do next character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1215 L067C lda #C$SPAC Get code for space |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1216 cmpa ,u Already there? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1217 bne L0685 No, put it in |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1218 lda PD.EOR,y Get end of record code |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1219 L0685 sta ,u Put it there |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1220 L0687 puls u Restore buffer pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1221 bra L062D Go print rest of line |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1222 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1223 * Delete rest of buffer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1224 L068B cmpa PD.EOR,y End of record code? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1225 bne L02FE No, check for special path dsc. chars |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1226 pshs u Save buffer pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1227 bra L069F Go erase rest of buffer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1228 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1229 L0696 pshs a Save code |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1230 lda #C$SPAC Get code for space |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1231 lbsr L0565 Print it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1232 puls a Restore code |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1233 L069F cmpa ,u+ End of record? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1234 bne L0696 No, go print a space |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1235 puls u Restore buffer pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1236 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1237 * Check character read against path descriptor |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1238 L02FE tsta Usable character? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1239 beq L030C No, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1240 ldb #PD.BSP Get start point in path descriptor |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1241 L0303 cmpa b,y Match code in descriptor? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1242 beq L032C Yes, go process it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1243 incb Move to next one |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1244 cmpb #PD.QUT Done check? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1245 bls L0303 No, keep going |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1246 L030C cmpx PD.MAX,y Past maximum character count? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1247 bls L0312 No, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1248 stx PD.MAX,y Update maximum character count |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1249 L0312 ldb #1 Add 1 char |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1250 abx |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1251 cmpx ,s Past requested amount? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1252 blo L0322 No, go on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1253 lda PD.OVF,y Get overflow character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1254 lbsr L0565 Send it to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1255 leax -1,x Subtract a character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1256 lbra L05F8 Go try again |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1257 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1258 L0322 ldb PD.UPC,y Force uppercase? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1259 beq L0328 No, put char in buffer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1260 lbsr L0403 Make character uppercase |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1261 L0328 sta ,u+ Put character in buffer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1262 lbsr L0413 Check for printable |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1263 lbra L05F8 Go try again |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1264 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1265 * Process path option characters |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1266 L032C pshs x,pc Preserve character count & PC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1267 leax <L033F,pc Point to branch table |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1268 subb #PD.BSP Subtract off first code |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1269 lslb Account for 2 bytes a entry |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1270 abx Point to entry point |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1271 stx 2,s Save it in PC on stack |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1272 puls x Restore X |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1273 jsr [,s++] Execute routine |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1274 lbra L05F8 Continue on |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1275 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1276 * Vector points for PD.BSP-PD.QUT |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1277 L033F bra L03BB Process PD.BSP |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1278 bra L03A5 Process PD.DEL |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1279 bra L0351 Process PD.EOR |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1280 bra L0366 Process PD.EOF |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1281 bra L0381 Process PD.RPR |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1282 bra L038B Process PD.DUP |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1283 rts PD.PSC we don't worry about |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1284 nop |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1285 bra L03A5 Process PD.INT |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1286 bra L03A5 Process PD.QUT |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1287 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1288 * Process PD.EOR character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1289 L0351 leas 2,s Purge return address |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1290 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1291 sta ,u Save character in buffer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1292 lbsr L0413 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1293 ldu PD.RGS,y Get callers register stack pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1294 ldb #1 Bump up char count by 1 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1295 abx |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1296 stx R$Y,u Store it in callers Y |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1297 lbsr L042B |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1298 leas 2,s |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1299 lbra L0453 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1300 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1301 * Process PD.EOF |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1302 L0366 leas 2,s Purge return address |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1303 leax ,x read anything? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1304 lbeq L02A2 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1305 bra L030C |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1306 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1307 L0370 pshs b |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1308 lda #C$CR |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1309 sta ,u |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1310 lbsr L0565 Send it to the driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1311 puls b |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1312 lbra L02A4 |
0 | 1313 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1314 * Process PD.RPR |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1315 L0381 lda PD.EOR,y Get end of record character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1316 sta ,u Put it in buffer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1317 ldx #0 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1318 ldu PD.BUF,y Get buffer ptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1319 L0388 lbsr L0418 Send it to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1320 L038B cmpx PD.MAX,y Character maximum? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1321 beq L03A2 Yes, return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1322 ldb #1 Bump char count up by 1 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1323 abx |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1324 cmpx 2,s Done count? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1325 bhs L03A0 Yes, exit |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1326 lda ,u+ Get character from buffer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1327 beq L0388 Null, go send it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1328 cmpa PD.EOR,y Done line? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1329 bne L0388 No go send it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1330 leau -1,u Move back a character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1331 L03A0 leax -1,x Move character count back |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1332 L03A2 rts Return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1333 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1334 L03A3 bsr L03BF |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1335 * PD.DEL/PD.QUT/PD.INT processing |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1336 L03A5 leax ,x Any characters? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1337 beq L03B8 No, reset buffer ptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1338 ldb PD.DLO,y Backspace over line? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1339 beq L03A3 Yes, go do it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1340 ldb PD.EKO,y Echo character? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1341 beq L03B5 No, zero out buffer pointers & return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1342 lda #C$CR Send CR to the driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1343 lbsr L0565 send it to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1344 L03B5 ldx #0 zero out count |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1345 L03B8 ldu PD.BUF,y reset buffer pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1346 L03BA rts return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1347 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1348 * Process PD.BSP |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1349 L03BB leax ,x Any characters? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1350 beq L03A2 No, return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1351 L03BF leau -1,u Mover buffer pointer back 1 character |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1352 leax -1,x Move character count back 1 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1353 ldb PD.EKO,y Echoing characters? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1354 beq L03BA No, return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1355 ldb PD.BSO,y Which backspace method? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1356 beq L03D4 Use BSE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1357 bsr L03D4 Do a BSE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1358 lda #C$SPAC Get code for space |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1359 lbsr L0565 Send it to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1360 L03D4 lda PD.BSE,y Get BSE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1361 lbra L0565 Send it to driver |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1362 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1363 * check PD.DTP,y and update PD.WPTR,y if it's device type $10 (grfdrv) |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1364 get.wptr pshs x,u |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1365 ldu PD.DEV,y get device table entry |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1366 ldx V$DRIV,u get device driver module |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1367 ldd M$Name,x offset to name |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1368 ldd d,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1369 * cmpd #"CC is it CC3IO? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1370 cmpd #$4343 is it CC3IO? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1371 bne no.fast no, don't do the fast stuff |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1372 ldd >$106E does GrfDrv have an entry address? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1373 beq no.fast nope, don't bother calling it. |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1374 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1375 ldu V$STAT,u and device static storage |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1376 tst ParmCnt,u are we busy getting more parameters? |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1377 bne no.fast yes, don't do buffered writes |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1378 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1379 * Get window table pointer & verify it: copied from WindInt and modified |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1380 ldb WinNum,u Get window # from device mem |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1381 lda #Wt.Siz Size of each entry |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1382 mul Calculate window table offset |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1383 addd #WinBase Point to specific window table entry |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1384 tfr d,y Move to y, the register we want |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1385 lda Wt.STbl,y Get MSB of scrn tbl ptr |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1386 bgt VerExit If $01-$7f, should be ok |
0 | 1387 |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1388 * Return illegal window definition error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1389 no.fast comb set carry: no error code, it's an internal routine |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1390 puls x,u,pc |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1391 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1392 VerExit clra No error |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1393 puls x,u,pc |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1394 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1395 IFNE H6309 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1396 call.grf pshs d,x,y,u save registers |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1397 pshs cc save old CC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1398 orcc #IntMasks+Entire shut everything else off |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1399 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1400 ldx #$0180 where to put the text |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1401 clra make sure high byte=0 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1402 tfr d,w |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1403 tfm u+,x+ move the data into low memory |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1404 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1405 ldb #6 alpha put |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1406 stb >$1002 flag grfdrv busy |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1407 lde ,s+ grab old CC off of the stack |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1408 lda 1,s get the number of characters to write |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1409 * A = number of bytes at $0580 to write out... |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1410 bsr do.grf do the call |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1411 * ignore errors : none possible from this particular call |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1412 call.out puls d,x,y,u,pc and return |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1413 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1414 * this routine should always be called by a BSR, and grfdrv will use the |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1415 * PC saved on-stack to return to the calling routine. |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1416 * ALL REGISTERS WILL BE TRASHED |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1417 do.grf sts >$1007 stack pointer for GrfDrv |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1418 lds <D.CCStk get new stack pointer |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1419 pshs dp,x,y,u,pc |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1420 pshsw |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1421 pshs cc,d save all registers |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1422 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1423 ldx >$106E get GrfDrv entry address |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1424 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1425 stx R$PC,s save grfdrv entry address as PC on the stack |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1426 ste R$CC,s save CC onto CC on the stack |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1427 jmp [>D.FLip1] flip to grfdrv and execute it |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1428 * GrfDrv will execute function, and then call [D.Flip0] to return here. It |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1429 * will use an RTS to return to the code that called here in the first place |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1430 * Only SP, PC & CC are set up - ALL OTHER REGISTERS MAY BE MODIFIED |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1431 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1432 ELSE |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1433 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1434 call.grf pshs u,y,x,d |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1435 tfr cc,a |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1436 orcc #IntMasks+Entire |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1437 ldx #$0180 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1438 sta -2,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1439 call.lp lda ,u+ |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1440 sta ,x+ |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1441 decb |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1442 bne call.lp |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1443 stb ,x |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1444 lda 1,s |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1445 bsr do.grf |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1446 puls u,y,x,d,pc |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1447 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1448 do.grf sts >$1007 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1449 lds <D.CCStk |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1450 ldu #$1100 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1451 ldb #$3A |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1452 stb >$1002 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1453 stb >$017F |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1454 pshs pc,u,y,x,dp,b,a,cc |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1455 ldx >$106E |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1456 stx R$PC,s |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1457 ldb >$107E |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1458 stb ,s |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1459 jmp [>D.Flip1] |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1460 ENDC |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1461 |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1462 emod |
0 | 1463 eom equ * |
536
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1464 end |
631cd5e95ee7
Merged NitrOS-9 and OS-9 Level Two sources into one file
boisy
parents:
525
diff
changeset
|
1465 |