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