annotate level2/modules/kernel/fgmoddr.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$GModDr
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: Get copy of module directory
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: X = 2048 byte buffer pointer
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
7 *
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
8 * Output: None
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
9 *
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
10 * Error: CC = C bit set; B = error code
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1145
diff changeset
11 *
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
12 FGModDr ldd <D.ModDir+2 Get end ptr of module directory
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
13 subd <D.ModDir Calculate maximum size of module directory
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
14 tfr d,y Put max. size in Y
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
15 ldd <D.ModEnd Get real end ptr of module dir
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
16 subd <D.ModDir Calculate real size of module dir
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
17 ldx R$X,u Get requested buffer ptr to put it from caller
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
18 IFNE H6309
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
19 addr d,x Calculate end addr. of directory after its copied
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
20 ELSE
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
21 leax d,x
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
22 ENDC
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
23 stx R$Y,u Preserve in caller's Y register
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
24 ldx <D.ModDir Get start ptr of module directory
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
25 stx R$U,u Preserve in caller's U register
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
26
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
27 lda <D.SysTsk Get system task #
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
28 ldx <D.Proc Get current process task #
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
29 ldb P$Task,x
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
30 ldx <D.ModDir Get start ptr of module directory
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
31 bra L0978 --- saves 4 bytes, adds 3 cycles
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
32 *** ldu R$X,u Get caller's buffer ptr
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
33 *** os9 F$Move Copy module directory in caller's buffer
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
34 *** rts