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