Mercurial > hg > Members > kono > nitros9-code
annotate level2/modules/kernel/fdatlog.asm @ 3295:6b7a7b233925 default tip
makefile: Allow PORTS with level1/2 mix
https://sourceforge.net/p/nitros9/feature-requests/10/
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Tue, 19 Apr 2022 18:12:17 +0200 |
parents | 039ddb7c8ad7 |
children |
rev | line source |
---|---|
1345 | 1 ************************************************** |
2 * System Call: F$DATLog | |
3 * | |
4 * Function: Convert DAT block/offset to logical address | |
5 * | |
6 * Input: B = DAT image offset | |
7 * X = Block offset | |
8 * | |
9 * Output: X = Logical address | |
10 * | |
11 * Error: CC = C bit set; B = error code | |
12 * | |
1145 | 13 FDATLog ldb R$B,u Get logical Block # |
14 ldx R$X,u Get offset into block | |
15 bsr CmpLBlk Go modify X to be Logical address | |
16 stx R$X,u Save in callers X register | |
17 clrb No error & return | |
3123
039ddb7c8ad7
l2 kernel: Remove tabs and trailing whitespace, align comments
Neal Crook <foofoobedoo@gmail.com>
parents:
1345
diff
changeset
|
18 rts |
1145 | 19 |
20 * Compute logical address given B=Logical Block # & X=offset into block | |
21 * Exits with B being logical block & X=logical address | |
22 CmpLBlk pshs b Preserve logical block # | |
23 tfr b,a Move log. block # to A | |
24 lsla Multiply logical block by 32 | |
3123
039ddb7c8ad7
l2 kernel: Remove tabs and trailing whitespace, align comments
Neal Crook <foofoobedoo@gmail.com>
parents:
1345
diff
changeset
|
25 lsla |
039ddb7c8ad7
l2 kernel: Remove tabs and trailing whitespace, align comments
Neal Crook <foofoobedoo@gmail.com>
parents:
1345
diff
changeset
|
26 lsla |
039ddb7c8ad7
l2 kernel: Remove tabs and trailing whitespace, align comments
Neal Crook <foofoobedoo@gmail.com>
parents:
1345
diff
changeset
|
27 lsla |
039ddb7c8ad7
l2 kernel: Remove tabs and trailing whitespace, align comments
Neal Crook <foofoobedoo@gmail.com>
parents:
1345
diff
changeset
|
28 lsla |
1145 | 29 clrb D=8k offset value |
30 IFNE H6309 | |
31 addr d,x X=logical address in 64k workspace | |
32 ELSE | |
33 leax d,x | |
34 ENDC | |
35 puls b,pc Restore A, block # & return |