annotate level2/modules/kernel/fgprocp.asm @ 1344:dfd2e7080b4d

Added more comments
author boisy
date Wed, 17 Sep 2003 13:53:39 +0000
parents ca83286ded5b
children 1da8ab9ba433
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
1 * F$GProcP entry point
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
2 FGProcP lda R$A,u get process #
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
3 bsr L0B2E Get ptr to process descriptor
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
4 bcs L0B2D If error, exit with it
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
5 sty R$Y,u Save ptr in caller's Y
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
6 L0B2D rts Return
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
7
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
8 * Entry: A=Process #
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
9 * Exit: Y=Ptr to process descriptor
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
10 * All others preserved
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
11 L0B2E pshs d,x Preserve regs
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
12 ldb ,s Get process # into B
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
13 beq L0B40 0, skip ahead
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
14 ldx <D.PrcDBT Get ptr to process descriptor block table
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
15 abx Point to specific process' entry
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
16 lda ,x Get MSB of process dsc. ptr
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
17 beq L0B40 None there, exit with error
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
18 clrb Clear LSB of process dsc. ptr (always fall on $200
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
19 tfr d,y boundaries) & move ptr to Y
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
20 puls d,x,pc Restore regs & return
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
21
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
22 L0B40 puls d,x Get regs back
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
23 comb Exit with Bad process ID error
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
24 ldb #E$BPrcID
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
25 rts