annotate level2/modules/kernel/fgprocp.asm @ 1631:ec6fb5543b22

Robert Gault's modifications for correcting timing errors
author boisy
date Mon, 12 Jul 2004 01:38:08 +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$GProcP
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 process pointer
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: A = Process ID
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: Y = Pointer to process descriptor
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 FGProcP lda R$A,u get process #
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
13 bsr L0B2E Get ptr to process descriptor
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
14 bcs L0B2D If error, exit with it
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
15 sty R$Y,u Save ptr in caller's Y
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
16 L0B2D rts Return
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
17
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
18 * Entry: A=Process #
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
19 * Exit: Y=Ptr to process descriptor
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
20 * All others preserved
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
21 L0B2E pshs d,x Preserve regs
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
22 ldb ,s Get process # into B
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
23 beq L0B40 0, skip ahead
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
24 ldx <D.PrcDBT Get ptr to process descriptor block table
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
25 abx Point to specific process' entry
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
26 lda ,x Get MSB of process dsc. ptr
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
27 beq L0B40 None there, exit with error
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
28 clrb Clear LSB of process dsc. ptr (always fall on $200
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
29 tfr d,y boundaries) & move ptr to Y
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
30 puls d,x,pc Restore regs & return
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
31
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
32 L0B40 puls d,x Get regs back
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
33 comb Exit with Bad process ID error
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
34 ldb #E$BPrcID
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
35 rts