Mercurial > hg > Members > kono > nitros9-code
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 |
rev | line source |
---|---|
237 | 1 ******************************************************************** |
828 | 2 * DeIniz - Denitialize a device |
237 | 3 * |
4 * $Id$ | |
5 * | |
6 * Ed. Comments Who YY/MM/DD | |
7 * ------------------------------------------------------------------ | |
828 | 8 * 3 From Tandy OS-9 Level Two VR 02.00.01 |
9 * 4 Tightened code, changed behavior slightly BGP 03/01/13 | |
237 | 10 |
11 nam DeIniz | |
12 ttl Deinitialize a device | |
13 | |
828 | 14 * Disassembled 98/09/10 22:56:37 by Disasm v1.6 (C) 1988 by RML |
237 | 15 |
16 ifp1 | |
17 use defsfile | |
18 endc | |
19 | |
924 | 20 linebsiz equ 80 |
21 | |
237 | 22 tylg set Prgrm+Objct |
23 atrv set ReEnt+rev | |
24 rev set $01 | |
828 | 25 edition set 4 |
26 | |
237 | 27 mod eom,name,tylg,atrv,start,size |
828 | 28 |
29 org 0 | |
830 | 30 rbuffer rmb linebsiz+1 |
828 | 31 stack rmb 64 |
237 | 32 size equ . |
33 | |
34 name fcs /DeIniz/ | |
35 fcb edition | |
36 | |
828 | 37 start lda ,x get command line char |
38 cmpa #C$CR CR? | |
39 beq ReadnDnz branch if so | |
40 DenizDev lda ,x+ | |
237 | 41 cmpa #C$CR |
828 | 42 beq ExitOk |
43 cmpa #C$SPAC | |
44 beq DenizDev | |
45 cmpa #PDELIM pathlist? | |
46 beq DetachIt | |
47 leax -1,x else back up X | |
48 DetachIt clra | |
49 os9 I$Attach attach to the device at X | |
50 bcs Exit branch if error | |
51 os9 I$Detach now detatch from the device at U | |
52 bcs Exit branch if error | |
53 os9 I$Detach and detatch again from the device at U | |
54 bcs Exit branch if error | |
55 bra DenizDev | |
56 | |
57 ReadnDnz clra from stdin | |
830 | 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 | 60 os9 I$ReadLn read it! |
61 bcc DenizDev branch if error | |
62 cmpb #E$EOF end of file? | |
63 bne Exit branch if not | |
64 ExitOk clrb | |
65 Exit os9 F$Exit | |
237 | 66 |
67 emod | |
68 eom equ * | |
69 end |