annotate level2/modules/kernel/fdatlog.asm @ 1624:bb75784a1ec5

Minor source change by Rodney H.
author boisy
date Wed, 30 Jun 2004 01:07:36 +0000
parents 1da8ab9ba433
children 039ddb7c8ad7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1345
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
1 **************************************************
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
2 * System Call: F$DATLog
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
3 *
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
4 * Function: Convert DAT block/offset to logical address
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
5 *
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
6 * Input: B = DAT image offset
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
7 * X = Block offset
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
8 *
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
9 * Output: X = Logical address
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
10 *
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
11 * Error: CC = C bit set; B = error code
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
12 *
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
13 FDATLog ldb R$B,u Get logical Block #
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
14 ldx R$X,u Get offset into block
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
15 bsr CmpLBlk Go modify X to be Logical address
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
16 stx R$X,u Save in callers X register
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
17 clrb No error & return
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
18 rts
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
19
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
20 * Compute logical address given B=Logical Block # & X=offset into block
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
21 * Exits with B being logical block & X=logical address
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
22 CmpLBlk pshs b Preserve logical block #
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
23 tfr b,a Move log. block # to A
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
24 lsla Multiply logical block by 32
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
25 lsla
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
26 lsla
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
27 lsla
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
28 lsla
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
29 clrb D=8k offset value
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
30 IFNE H6309
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
31 addr d,x X=logical address in 64k workspace
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
32 ELSE
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
33 leax d,x
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
34 ENDC
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
35 puls b,pc Restore A, block # & return