1145
|
1 * F$GProcP entry point
|
|
2 FGProcP lda R$A,u get process #
|
|
3 bsr L0B2E Get ptr to process descriptor
|
|
4 bcs L0B2D If error, exit with it
|
|
5 sty R$Y,u Save ptr in caller's Y
|
|
6 L0B2D rts Return
|
|
7
|
|
8 * Entry: A=Process #
|
|
9 * Exit: Y=Ptr to process descriptor
|
|
10 * All others preserved
|
|
11 L0B2E pshs d,x Preserve regs
|
|
12 ldb ,s Get process # into B
|
|
13 beq L0B40 0, skip ahead
|
|
14 ldx <D.PrcDBT Get ptr to process descriptor block table
|
|
15 abx Point to specific process' entry
|
|
16 lda ,x Get MSB of process dsc. ptr
|
|
17 beq L0B40 None there, exit with error
|
|
18 clrb Clear LSB of process dsc. ptr (always fall on $200
|
|
19 tfr d,y boundaries) & move ptr to Y
|
|
20 puls d,x,pc Restore regs & return
|
|
21
|
|
22 L0B40 puls d,x Get regs back
|
|
23 comb Exit with Bad process ID error
|
|
24 ldb #E$BPrcID
|
|
25 rts
|