annotate level1/cmds/dmode.asm @ 2798:b70d93f8d7ce lwtools-port

Updated coco1/modules/makefile and coco3/modules/makefile to help resolve issues with i(x) and s(x) descriptors. Updated level1/coco1/modules/makefile & level2/coco3/modules/makefile so that correct values would be sent to assembler when building superdesc.asm for s(x).dd and i(x).dd descriptors.
author drencor-xeen
date Mon, 28 Jan 2013 16:13:05 -0600
parents e6cc61505ca7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1524
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
1 ********************************************************************
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
2 * DMode - Disk descriptor utility
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
3 *
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
4 * $Id$
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
5 *
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
6 * RBF descriptor utility similar to xmode.
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
7 * Use: dmode </devicename> [options]
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
8 * dmode -<filename> [options]
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
9 * (allows dmode use on a saved desc)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
10 * (-filename will use data dir for default)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
11 * dmode -? will give bit definitions
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
12 * If no options given, just returns desc info.
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
13 * All numbers must be in HEX.
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
14 * dmode
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
15 * dmode /h0 cyl=0200 sas=8 ilv=4
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
16 * dmode /d0
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
17 * dmode -?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
18 * dmode -/d1/modules/d2.dd cyl=0028
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
19 *
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
20 * Edt/Rev YYYY/MM/DD Modified by
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
21 * Comment
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
22 * ------------------------------------------------------------------
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
23 * 1986/09/23 Kevin Darling
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
24 * Oversized and kludgy, but works.
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
25 * Apologies for lack of comments.
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
26 *
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
27 * 1986/10/01 Kevin Darling
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
28 *
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
29 * 1986/10/02 Kevin Darling
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
30 * This version will do desc file on disk also.
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
31 *
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
32 * 1989/08/24 Roger A. Krupski (HARDWAREHACK)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
33 * Fixed "lower case bug", allowed "$" prefix for hex
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
34 *
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
35 * -------- NitrOS9 DMODE HISTORY -----------------------------------
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
36 * 8 / 1 2003/01/31 Boisy G Pitre
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
37 * Initial import - added to standard CMDS distribution
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
38 *
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
39 * 8 / 1 2003/09/04 Boisy G Pitre
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
40 * Redid history comments to new format
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
41 *
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
42 * 1 / 4 2004/02/19 Boisy G Pitre
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
43 * Old source replaced by fcb hex dump of new dmode.bin
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
44 * May be a back-port from Carl Kreider's dmode for OSK
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
45 *
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
46 * 2 / 4 2004/02/28 Rodney V. Hamilton
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
47 * Disassembled new dmode, added comments and KD/RAK mods.
963
7cecd837bcab Added new commands as part of standard CMDS distribution
boisy
parents:
diff changeset
48
1524
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
49 nam DMode
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
50 ttl program module
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
51
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
52 * Disassembled 2004/02/21 08:59:24 by Disasm v1.5 (C) 1988 by RML
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
53
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
54 IFP1
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
55 use defsfile
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
56 ENDC
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
57
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
58 tylg set Prgrm+Objct
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
59 atrv set ReEnt+rev
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
60 rev set $04
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
61
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
62 mod eom,name,tylg,atrv,start,size
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
63
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
64 OLDMODS equ 1 enable KD/RAK dmode mods if >0
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
65
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
66 hexcnt rmb 1 number of option bytes
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
67 dataptr rmb 2 current option ptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
68 hexin rmb 2 2 byte hex number
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
69 module rmb 2 desc address
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
70 msize rmb 2 module total size (including CRC)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
71 dsize rmb 2 descriptor size (hdrs + init tbl)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
72 parmptr rmb 2 next name dataptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
73 path rmb 1 file path
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
74 txtptr rmb 2 option name ptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
75 buffer rmb 10 output buffer
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
76 buflen equ .-buffer
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
77 desc rmb 80
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
78 descmax equ .-desc
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
79 rmb 512 stack+params
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
80 size equ .
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
81
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
82 name fcs /DMode/
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
83 fcb $02
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
84
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
85 ** Options Table for RBF Device Driver Modules
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
86 * entry format: NAME[4] + OFFSET[1] + COUNT[1]
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
87 * NAME: leading space plus 3-char field name
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
88 * OFFSET: byte offset to option field in module
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
89 * COUNT: size of option field in bytes
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
90 ** (if offset bit.7 set, field is ptr to string of length COUNT)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
91 otable fcc " nam"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
92 fcb M$Name!$80 ($84) ptr to name of module
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
93 fcb 3 max name length=3
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
94 nxtopt equ *-otable offset to next option (=6)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
95 optlen equ nxtopt-2 length of option name (=4)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
96 optoff equ nxtopt-2 offset to option offset (=4)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
97 optsiz equ nxtopt-1 offset to option byte count (-5)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
98 fcc " mgr"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
99 fcb M$FMgr+$80,0 ($89) ptr to name of file manager
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
100 fcc " ddr"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
101 fcb M$PDev-$80,0 ($8B) ptr to name of device driver
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
102 fcc " hpn"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
103 fcb M$Port,1 ($0E) extended port address
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
104 fcc " hpa"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
105 fcb M$Port+1,2 ($0F) base port address
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
106 fcc " drv"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
107 fcb IT.DRV,1 ($13) drive number
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
108 fcc " stp"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
109 fcb IT.STP,1 ($14) step rate
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
110 fcc " typ"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
111 fcb IT.TYP,1 ($15) device type
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
112 fcc " dns"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
113 fcb IT.DNS,1 ($16) media density
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
114 fcc " cyl"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
115 fcb IT.CYL,2 ($17) number of cylinders (tracks)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
116 fcc " sid"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
117 fcb IT.SID,1 ($19) number of sides
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
118 fcc " vfy"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
119 fcb IT.VFY,1 ($1A) verify writes (0-yes)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
120 fcc " sct"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
121 fcb IT.SCT,2 ($1B) default sectors/track
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
122 fcc " t0s"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
123 fcb IT.T0S,2 ($1D) default sect/trk for track 0
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
124 fcc " ilv"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
125 fcb IT.ILV,1 ($1F) sector interleave factor
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
126 fcc " sas"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
127 fcb IT.SAS,1 ($20) minimum segment allocation (sectors)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
128 fcc " wpc"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
129 fcb $25,1 (offset unnamed) write precomp cylinder (HD)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
130 fcc " ofs"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
131 fcb $26,2 (offset unnamed) starting cylinder offset (HD)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
132 fcc " rwc"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
133 fcb $28,2 (offset unnamed) reduced write current cylinder (HD)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
134 otblsiz equ (*-otable)/nxtopt
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
135 * number of DISPLAYED options - remainder are accepted but not printed
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
136 IFNE OLDMODS compatibility
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
137 fcc " tos" alias for t0s (old DMODE compatibility)
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
138 fcb IT.T0S,2
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
139 ENDC
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
140 fcb $80 end of table
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
141
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
142 usage fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
143 fcc "Usage: DMode [/<device> || -<pathlist> || -?] [option] [option] [...]"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
144 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
145 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
146 fcc "Purpose: To report or alter current option settings of RBF device"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
147 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
148 fcc " descriptors in memory or on disk in single module files."
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
149 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
150 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
151 fcc "Options: nam, mgr, ddr, hpn, hpa, drv, stp, typ, dns, cyl, sid, vfy,"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
152 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
153 fcc " sct, t0s, ilv, sas, wpc, ofs, rwc."
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
154 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
155 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
156 fcc "Examples: dmode /dd"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
157 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
158 fcc " Prints the current option settings of the /DD descriptor"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
159 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
160 fcc " in memory."
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
161 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
162 fcc " dmode -modules/h0.dd nam=H1 drv=1 cyl=03FF rwc=ffff"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
163 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
164 fcc " Changes the module name in the MODULES/H0.dd file to H1,"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
165 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
166 fcc " sets the physical drive number to 1, cylinders to $03FF,"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
167 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
168 fcc " and the Reduced Write Current cylinder to $FFFF."
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
169 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
170 fcc " dmode -?"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
171 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
172 fcc " Prints more complete information on all of the options."
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
173 fcb C$CR
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
174 uselen equ *-usage
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
175
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
176 infomsg fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
177 fcc "The NAM option accepts only a legal OS-9 module name with a maximum of"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
178 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
179 fcc "3 characters. It is up to the user to ensure that there is adequate"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
180 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
181 fcc "room for the module name, and if required to rename the disk file to"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
182 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
183 fcc "suit the new module name. The MGR and DDR options can't be changed."
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
184 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
185 fcc "All other options require hexadecimal numbers (0 through FFFF). The"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
186 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
187 fcc "WPC, OFS, and RWC options are for WDDisk descriptors only."
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
188 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
189 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
190 fcc "nam Device Descriptor Name "
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
191 fcc "mgr File Manager Name"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
192 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
193 fcc "ddr Device Driver Name "
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
194 fcc "hpn Hardware Page Number"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
195 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
196 fcc "hpa Hardware Port Address "
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
197 fcc "drv Physical Drive Number"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
198 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
199 fcc "stp Step Rate Code "
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
200 fcc "typ Drive Type"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
201 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
202 fcc "dns Drive/Disk Density "
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
203 fcc "cyl Drive Cylinders"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
204 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
205 fcc "sid Drive Sides (Heads) "
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
206 fcc "vfy Write Verify Flag"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
207 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
208 fcc "sct Sectors Per Track "
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
209 fcc "t0s Sectors On Track Zero"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
210 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
211 fcc "ilv Sector Interleave Factor "
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
212 fcc "sas Segment Allocation Size"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
213 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
214 fcc "wpc Write Precompensation Code "
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
215 fcc "ofs Partition Offset Cylinder"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
216 fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
217 fcc "rwc Reduced Write Current Cylinder"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
218 fcb C$CR
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
219 infolen equ *-infomsg
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
220
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
221 equal fcb $3D "="
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
222
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
223 rbfmsg fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
224 fcc "Not an RBF descriptor!"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
225 cr fcb C$CR
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
226 rbflen equ *-rbfmsg
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
227
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
228 sizmsg fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
229 fcc "Module size out of range!"
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
230 fcb C$CR
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
231 sizlen equ *-sizmsg
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
232
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
233 synmsg fcb C$LF
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
234 fcc "Syntax error: "
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
235 synlen equ *-synmsg
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
236
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
237 *NOTE: --the code begins here--
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
238
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
239 morehelp leax >infomsg,pcr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
240 ldy #infolen
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
241 bra helpprnt
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
242
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
243 toobig leax >sizmsg,pcr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
244 ldy #sizlen
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
245 bra errprnt
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
246
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
247 notrbf leax >rbfmsg,pcr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
248 ldy #rbflen
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
249
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
250 errprnt lda #2
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
251 os9 I$WritLn
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
252
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
253 help leax >usage,pcr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
254 ldy #uselen
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
255
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
256 helpprnt lda #2
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
257 os9 I$WritLn
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
258 lbra okayend2
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
259
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
260 start equ *
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
261 ldd #0
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
262 std <module zero mod flag
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
263 sta <path zero file flag
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
264 ldd ,x+ check for device name
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
265 cmpa #'- file option?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
266 bne link
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
267 cmpb #'? help option?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
268 beq morehelp
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
269
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
270 * read descriptor from file
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
271 lda #UPDAT. open path to desc file
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
272 os9 I$Open
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
273 bcs help
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
274 stx <parmptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
275 sta <path save path number
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
276 ldy #descmax max size
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
277 leax <desc,u desc buff
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
278 os9 I$Read read the file
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
279 lbcs error
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
280 ldb <M$Opt,x init table size
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
281 clra
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
282 addd #M$DTyp add size of headers
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
283 std <dsize save desc size less CRC
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
284 ldd M$Size,x module size incl CRC
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
285 cmpd #descmax too big for desc buffer?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
286 bhi toobig ..yes, size error
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
287 std <msize save module size
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
288 bra gotit
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
289
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
290 * read descriptor from memory
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
291 link cmpa #PDELIM else must be /<devicename>
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
292 bne help
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
293 pshs u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
294 lda #Devic type=device descriptor
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
295 os9 F$Link link to descriptor
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
296 bcs help
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
297 stx <parmptr update after name
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
298 tfr u,x
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
299 puls u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
300 stx <module
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
301 ldb <M$Opt,x get desc init table size
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
302 clra
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
303 addd #M$DTyp add desc header size
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
304 std <dsize save desc size less CRC
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
305 ldd M$Size,x get current module size
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
306 cmpd #descmax too big for desc buffer?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
307 lbhi toobig ..yes, size error
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
308 std <msize save module size
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
309 tfr d,y
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
310 pshs u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
311 leau <desc,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
312 mloop lda ,x+ copy in-memory data
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
313 sta ,u+ to descriptor buffer
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
314 leay -1,y
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
315 bne mloop
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
316 puls u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
317 gotit ldd <dsize
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
318 cmpd <msize
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
319 lbcc toobig
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
320 leax <desc,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
321 lda <IT.DTP,x test device type
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
322 cmpa #1 RBF?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
323 lbne notrbf .. no, non-RBF error
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
324 ldx <parmptr reload input parms ptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
325 lbsr skipspc skip blanks
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
326 cmpa #C$CR any options?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
327 lbeq info ..no, give current info
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
328 leax -1,x else find options
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
329
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
330 * Find and Set Options
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
331 * X=param ptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
332 findopt lbsr skipspc get next input param
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
333 stx <parmptr save for syntax error use
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
334 cmpa #C$CR end?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
335 lbeq verify ..yes, update desc CRC
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
336 leay >(otable-nxtopt),pcr init option table ptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
337 pshs u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
338 ldu ,x++ get next two chars
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
339 ora #'a-'A force lowercase char 1
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
340 exg d,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
341 ora #'a-'A -ditto for chars 2&3
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
342 orb #'a-'A
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
343 exg d,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
344 flup20 leay nxtopt,y next option entry
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
345 tst ,y end of table?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
346 bmi syntax ..yes, bad option
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
347 cmpa 1,y
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
348 bne flup20 option name match?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
349 cmpu 2,y
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
350 bne flup20 ..no, try next
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
351 * option found
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
352 puls u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
353 sty <txtptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
354 ldd ,x+
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
355 cmpa #'= must be followed by "="
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
356 bne syntax
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
357 cmpb #C$CR
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
358 beq syntax
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
359 cmpb #C$SPAC
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
360 beq syntax
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
361 ldb optsiz,y get # of bytes
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
362 beq syntax cannot modify if length=0
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
363 stb <hexcnt
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
364 ldb optoff,y get option size/type
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
365 bpl setnum hi-bit clear, do numeric
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
366 * process string option change
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
367 andb #$7F get string ptr offset
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
368 clra
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
369 cmpd <msize within module?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
370 bcc syntax
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
371 leay <desc,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
372 ldd b,y read string ptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
373 cmpd <msize within module?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
374 bcc syntax
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
375 leay d,y point to string field
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
376 pshs y
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
377 os9 F$PrsNam parse user's input for valid OS9 name
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
378 puls y
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
379 bcs syntax bad name syntax
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
380 cmpa #C$SPAC name's trailing delimiter..
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
381 beq nameok must be space
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
382 cmpa #C$CR or end of line
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
383 bne syntax
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
384 nameok cmpb <hexcnt new name longer than field size?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
385 bhi syntax
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
386 ncopy lda ,x+ copy new name to desc
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
387 sta ,y+
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
388 decb
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
389 bne ncopy
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
390 lda -1,y
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
391 ora #$80 and flag last char
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
392 sta -1,y
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
393 lbra findopt
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
394
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
395 syntax leax >synmsg,pcr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
396 ldy #synlen
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
397 lda #2
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
398 os9 I$Write print syntax err msg to stderr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
399 ldx <parmptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
400 leax -1,x rewind to start of arg
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
401 pshs x
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
402 ldy #0 set arg len to 0
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
403 slup leay 1,y ..count chars
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
404 lda ,x+
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
405 cmpa #C$CR ..until EOL
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
406 beq synsay
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
407 cmpa #C$SPAC ..or space
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
408 bne slup
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
409 synsay puls x X=arg ptr, Y=arg len
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
410 lda #2
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
411 os9 I$Write print name of bad arg to stderr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
412 lbra okayend
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
413
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
414 * process numeric option change
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
415 setnum clra
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
416 cmpd <dsize option within current descriptor?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
417 bcc syntax
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
418 clr <hexin zero hex input field
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
419 clr <hexin+1
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
420
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
421 setloop lda ,x+ get next #
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
422 IFNE OLDMODS compatibility
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
423 cmpa #'$ optional hex $?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
424 beq setloop yes, ignore
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
425 ENDC
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
426 cmpa #C$SPAC end of number?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
427 beq setnum2 ..yes, set option, rts
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
428 cmpa #C$CR end of line?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
429 beq setnum1
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
430 * hex conversion - inlined code
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
431 suba #'0 make number from ASCII
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
432 bmi syntax
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
433 cmpa #10 is it number?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
434 bcs num
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
435 anda #$5F make uppercase
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
436 suba #'A-'0-10 make hex $A-$F
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
437 cmpa #10 not hex char?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
438 bcs syntax
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
439 cmpa #16 not hex char?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
440 bcc syntax
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
441 num ldb #16 fancy asl *4
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
442 mul
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
443 pshs b save top 4 bits
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
444 ldd <hexin
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
445 rol ,s
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
446 rolb
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
447 rola
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
448 rol ,s
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
449 rolb
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
450 rola
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
451 rol ,s
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
452 rolb
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
453 rola
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
454 rol ,s
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
455 rolb
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
456 rola
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
457 std <hexin
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
458 puls b
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
459 bra setloop ..loop
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
460
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
461 setnum1 leax -1,x reset so can find <cr>
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
462 setnum2 ldb optoff,y get option offset
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
463 leay <desc,u point to desc
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
464 leay b,y point to option
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
465 ldd <hexin pick up hex input
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
466 dec <hexcnt
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
467 beq setone
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
468 std ,y set two byte option
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
469 lbra findopt
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
470
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
471 setone tsta
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
472 lbne syntax
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
473 stb ,y set one byte option
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
474 lbra findopt
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
475
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
476 skipspc lda ,x+
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
477 cmpa #C$SPAC
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
478 beq skipspc
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
479 rts
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
480
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
481 * Update Descriptor's CRC
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
482 verify pshs u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
483 leau <desc,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
484 tfr u,x X is module addr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
485 ldy M$Size,x Y is module size
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
486 leay -3,y offset of CRC
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
487 tfr y,d Y is byte count
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
488 leau d,u U is ptr to CRC
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
489 lda #$FF init CRC value
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
490 sta 0,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
491 sta 1,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
492 sta 2,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
493 pshs u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
494 os9 F$CRC calc new CRC
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
495 puls u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
496 com ,u+ store as complement
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
497 com ,u+
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
498 com ,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
499 lda <path was it a file?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
500 beq memmod ..no, in memory
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
501 ldx #0
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
502 tfr x,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
503 os9 I$Seek go back to file begin
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
504 bcs error
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
505 puls u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
506 leax <desc,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
507 ldy <msize
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
508 os9 I$Write update desc file
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
509 bra okayend
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
510
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
511 memmod ldu ,s
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
512 leax <desc,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
513 ldy <msize
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
514 ldu <module
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
515 move lda ,x+
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
516 sta ,u+
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
517 leay -1,y
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
518 bne move
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
519 puls u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
520 bra okayend2
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
521
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
522 okayend bsr outcr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
523 okayend2 clrb
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
524 error pshs b,cc
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
525 ldu <module
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
526 beq bye
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
527 os9 F$UnLink
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
528 bye puls b,cc
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
529 os9 F$Exit end dmode.
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
530
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
531 outcr leax >cr,pcr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
532 ldy #1
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
533 lda #1
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
534 os9 I$WritLn
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
535 rts
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
536
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
537 * Output Current Desc Info
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
538 info bsr outcr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
539 ldb #otblsiz printable entry count
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
540 pshs b
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
541 leax >otable,pcr point to option table
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
542 stx <txtptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
543 ilup ldx <txtptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
544 ldy #optlen
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
545 lbsr output print option name
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
546 leax >equal,pcr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
547 ldy #1
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
548 lbsr output and '='
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
549 ldx <txtptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
550 ldb optoff,x get option type & size
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
551 bpl outnum if numeric, print hex value
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
552 * Print String Option Field
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
553 andb #$7F else get string ptr offset
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
554 clra
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
555 cmpd <msize within module?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
556 bcc inext ..no, skip to next option
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
557 leay <desc,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
558 ldd b,y read string ptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
559 cmpd <msize within module?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
560 bcc inext ..no, skip to next option
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
561 leay d,y point to string field
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
562 lda #buflen
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
563 leax <buffer,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
564 clr <hexcnt
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
565 sloop ldb ,y+ copy string chars
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
566 bpl scopy last char?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
567 andb #$7F ..yes, make printable
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
568 lda #1 ..and set exit count
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
569 scopy stb ,x+ to output buffer
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
570 inc <hexcnt counting as we go
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
571 deca
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
572 bne sloop until buffer full
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
573 ldb <hexcnt get length copied
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
574 tfr d,y
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
575 leax <buffer,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
576 bsr output print the string
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
577 bra inext goto next option
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
578
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
579 * Print Numeric Option Value
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
580 outnum ldx <txtptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
581 ldb optsiz,x get # of bytes
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
582 stb <hexcnt
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
583 ldb optoff,x get field offset
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
584 clra
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
585 cmpd <dsize within descriptor?
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
586 bcc inext no, skip to next
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
587 leax <desc,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
588 abx point to number
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
589 stx <dataptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
590 * print <hexcnt> bytes starting at [x] as ASCII Hex
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
591 outhex ldx <dataptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
592 lda ,x+ get next byte
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
593 stx <dataptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
594 pshs a print as 2 hex digits
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
595 lsra
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
596 lsra
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
597 lsra
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
598 lsra
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
599 bsr outone print upper
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
600 puls a
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
601 anda #$0F
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
602 bsr outone print lower
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
603 dec <hexcnt
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
604 bne outhex
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
605 inext ldx <txtptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
606 leax nxtopt,x point to next option
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
607 stx <txtptr
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
608 dec ,s continue until
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
609 lbeq okayend ..end of printable info
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
610 ldb ,s if option counter
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
611 bitb #$07 ..is a multiple of 8
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
612 lbne ilup
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
613 lbsr outcr do a <cr>
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
614 lbra ilup ..and continue
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
615
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
616 outone cmpa #10 Print 1/2 Byte Hex Char:
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
617 bcs number
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
618 adda #$11-10 make alpha
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
619 number adda #'0 make ASCII
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
620 sta <buffer
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
621 leax <buffer,u
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
622 ldy #1 print one digit
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
623 output lda #1
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
624 os9 I$Write print the output buffer
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
625 lbcs error
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
626 rts
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
627
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
628 emod
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
629 eom equ *
98b6eddbf729 ccide.asm: removed superIDE specific code, obsolete
boisy
parents: 1521
diff changeset
630 end