Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/save.asm @ 2879:531841047512 lwtools-port
boot_scsi.asm: Fix SCSI ID when booting from SCSI
Due to a typo it would probe for SCSI ID 4 instead
of default 0 (or 8 for HDBDOS/SuperDriver).
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Sun, 24 Nov 2013 16:08:53 +0100 |
parents | 84ea83668304 |
children |
rev | line source |
---|---|
0 | 1 ******************************************************************** |
2 * Save - Save module from memory to disk | |
3 * | |
4 * $Id$ | |
5 * | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
6 * Edt/Rev YYYY/MM/DD Modified by |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
7 * Comment |
0 | 8 * ------------------------------------------------------------------ |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
9 * 3 ????/??/?? |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
10 * From Tandy OS-9 Level One VR 02.00.00. |
0 | 11 |
12 nam Save | |
13 ttl Save module from memory to disk | |
14 | |
15 * Disassembled 98/09/14 23:45:22 by Disasm v1.6 (C) 1988 by RML | |
16 | |
17 ifp1 | |
18 use defsfile | |
19 endc | |
20 | |
21 tylg set Prgrm+Objct | |
22 atrv set ReEnt+rev | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
23 rev set $00 |
0 | 24 edition set 3 |
25 | |
26 mod eom,name,tylg,atrv,start,size | |
27 | |
924 | 28 org 0 |
904 | 29 fpath rmb 451 |
0 | 30 size equ . |
31 | |
32 name fcs /Save/ | |
33 fcb edition | |
34 | |
904 | 35 start leay -1,y back up Y by one |
36 pshs y,x save X Y on stack | |
37 cmpx $02,s one byte on command line? (CR) | |
38 bcc ExitOk branch if so | |
39 ldd #WRITE.*256+PEXEC.+PREAD.+EXEC.+UPDAT. | |
40 os9 I$Create create file of same name as arg | |
41 bcs Exit branch if error | |
42 sta <fpath save path | |
43 lda ,x get char after arg | |
44 cmpa #C$CR CR? | |
45 bne NextMod branch if not | |
46 ldx ,s else get ptr to start of cmd line | |
47 NextMod lda ,x+ get char | |
48 cmpa #C$SPAC space? | |
49 beq NextMod branch if so | |
50 cmpa #C$COMA coma? | |
51 beq NextMod branch if so | |
52 leax -$01,x else backup 1 | |
53 clra clear ty/lang | |
54 os9 F$Link link to module | |
55 bcs Exit branch if error | |
56 stx ,s save X | |
57 leax ,u point to start of module | |
58 ldy M$Size,x get module size in y | |
59 lda <fpath get path to file | |
60 os9 I$Write write module to file | |
0 | 61 pshs b,cc |
904 | 62 os9 F$UnLink unlink module |
0 | 63 ror ,s+ |
64 puls b | |
904 | 65 bcs Exit |
66 ldx ,s get param pointer | |
67 cmpx $02,s end of param? | |
68 bcs NextMod branch of not | |
69 os9 I$Close else close path | |
70 bcs Exit branch if error | |
71 ExitOk clrb | |
72 Exit os9 F$Exit | |
0 | 73 |
74 emod | |
75 eom equ * | |
76 end |