annotate level1/cmds/deiniz.asm @ 924:c155aac72190

Made cosmetic changes
author boisy
date Sun, 19 Jan 2003 14:54:09 +0000
parents 80e125a9357d
children 84ea83668304
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
237
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
1 ********************************************************************
828
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
2 * DeIniz - Denitialize a device
237
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
3 *
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
4 * $Id$
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
5 *
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
6 * Ed. Comments Who YY/MM/DD
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
7 * ------------------------------------------------------------------
828
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
8 * 3 From Tandy OS-9 Level Two VR 02.00.01
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
9 * 4 Tightened code, changed behavior slightly BGP 03/01/13
237
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
10
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
11 nam DeIniz
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
12 ttl Deinitialize a device
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
13
828
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
14 * Disassembled 98/09/10 22:56:37 by Disasm v1.6 (C) 1988 by RML
237
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
15
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
16 ifp1
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
17 use defsfile
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
18 endc
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
19
924
c155aac72190 Made cosmetic changes
boisy
parents: 830
diff changeset
20 linebsiz equ 80
c155aac72190 Made cosmetic changes
boisy
parents: 830
diff changeset
21
237
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
22 tylg set Prgrm+Objct
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
23 atrv set ReEnt+rev
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
24 rev set $01
828
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
25 edition set 4
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
26
237
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
27 mod eom,name,tylg,atrv,start,size
828
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
28
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
29 org 0
830
80e125a9357d One more try to fix variable name collision
boisy
parents: 829
diff changeset
30 rbuffer rmb linebsiz+1
828
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
31 stack rmb 64
237
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
32 size equ .
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
33
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
34 name fcs /DeIniz/
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
35 fcb edition
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
36
828
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
37 start lda ,x get command line char
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
38 cmpa #C$CR CR?
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
39 beq ReadnDnz branch if so
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
40 DenizDev lda ,x+
237
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
41 cmpa #C$CR
828
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
42 beq ExitOk
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
43 cmpa #C$SPAC
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
44 beq DenizDev
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
45 cmpa #PDELIM pathlist?
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
46 beq DetachIt
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
47 leax -1,x else back up X
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
48 DetachIt clra
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
49 os9 I$Attach attach to the device at X
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
50 bcs Exit branch if error
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
51 os9 I$Detach now detatch from the device at U
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
52 bcs Exit branch if error
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
53 os9 I$Detach and detatch again from the device at U
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
54 bcs Exit branch if error
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
55 bra DenizDev
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
56
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
57 ReadnDnz clra from stdin
830
80e125a9357d One more try to fix variable name collision
boisy
parents: 829
diff changeset
58 leax rbuffer,u point to read buffer
829
a114971abd3b Changed the name of a def because it collided with Level 2
boisy
parents: 828
diff changeset
59 ldy #linebsiz get linebsiz bytes
828
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
60 os9 I$ReadLn read it!
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
61 bcc DenizDev branch if error
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
62 cmpb #E$EOF end of file?
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
63 bne Exit branch if not
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
64 ExitOk clrb
064244c52232 Tightened up code, made smaller
boisy
parents: 237
diff changeset
65 Exit os9 F$Exit
237
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
66
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
67 emod
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
68 eom equ *
6a8f855fb173 Moved from level2/CMDS
boisy
parents:
diff changeset
69 end