Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/save.asm @ 1287:10957d54bf16
Made all modules rev 0
author | boisy |
---|---|
date | Sat, 30 Aug 2003 20:16:51 +0000 |
parents | c155aac72190 |
children | 84ea83668304 |
rev | line source |
---|---|
0 | 1 ******************************************************************** |
2 * Save - Save module from memory to disk | |
3 * | |
4 * $Id$ | |
5 * | |
6 * Ed. Comments Who YY/MM/DD | |
7 * ------------------------------------------------------------------ | |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
0
diff
changeset
|
8 * 3 From Tandy OS-9 Level One VR 02.00.00 |
0 | 9 |
10 nam Save | |
11 ttl Save module from memory to disk | |
12 | |
13 * Disassembled 98/09/14 23:45:22 by Disasm v1.6 (C) 1988 by RML | |
14 | |
15 ifp1 | |
16 use defsfile | |
17 endc | |
18 | |
19 tylg set Prgrm+Objct | |
20 atrv set ReEnt+rev | |
21 rev set $01 | |
22 edition set 3 | |
23 | |
24 mod eom,name,tylg,atrv,start,size | |
25 | |
924 | 26 org 0 |
904 | 27 fpath rmb 451 |
0 | 28 size equ . |
29 | |
30 name fcs /Save/ | |
31 fcb edition | |
32 | |
904 | 33 start leay -1,y back up Y by one |
34 pshs y,x save X Y on stack | |
35 cmpx $02,s one byte on command line? (CR) | |
36 bcc ExitOk branch if so | |
37 ldd #WRITE.*256+PEXEC.+PREAD.+EXEC.+UPDAT. | |
38 os9 I$Create create file of same name as arg | |
39 bcs Exit branch if error | |
40 sta <fpath save path | |
41 lda ,x get char after arg | |
42 cmpa #C$CR CR? | |
43 bne NextMod branch if not | |
44 ldx ,s else get ptr to start of cmd line | |
45 NextMod lda ,x+ get char | |
46 cmpa #C$SPAC space? | |
47 beq NextMod branch if so | |
48 cmpa #C$COMA coma? | |
49 beq NextMod branch if so | |
50 leax -$01,x else backup 1 | |
51 clra clear ty/lang | |
52 os9 F$Link link to module | |
53 bcs Exit branch if error | |
54 stx ,s save X | |
55 leax ,u point to start of module | |
56 ldy M$Size,x get module size in y | |
57 lda <fpath get path to file | |
58 os9 I$Write write module to file | |
0 | 59 pshs b,cc |
904 | 60 os9 F$UnLink unlink module |
0 | 61 ror ,s+ |
62 puls b | |
904 | 63 bcs Exit |
64 ldx ,s get param pointer | |
65 cmpx $02,s end of param? | |
66 bcs NextMod branch of not | |
67 os9 I$Close else close path | |
68 bcs Exit branch if error | |
69 ExitOk clrb | |
70 Exit os9 F$Exit | |
0 | 71 |
72 emod | |
73 eom equ * | |
74 end |