Mercurial > hg > Members > kono > nitros9-code
view level2/modules/kernel/fgprocp.asm @ 3195:6eb2edad80d8
L2: Introduce symbol KrnBlk to define kernel block number
This is the block number that the kernel is loaded into. This is
platform-specific, a function of the behaviour of the platform MMU/DAT.
CRCs are unaffected by this change.
author | Neal Crook <foofoobedoo@gmail.com> |
---|---|
date | Thu, 01 Jun 2017 22:13:49 +0100 |
parents | 039ddb7c8ad7 |
children |
line wrap: on
line source
************************************************** * System Call: F$GProcP * * Function: Get process pointer * * Input: A = Process ID * * Output: Y = Pointer to process descriptor * * Error: CC = C bit set; B = error code * FGProcP lda R$A,u get process # bsr L0B2E Get ptr to process descriptor bcs L0B2D If error, exit with it sty R$Y,u Save ptr in caller's Y L0B2D rts Return * Entry: A=Process # * Exit: Y=Ptr to process descriptor * All others preserved L0B2E pshs d,x Preserve regs ldb ,s Get process # into B beq L0B40 0, skip ahead ldx <D.PrcDBT Get ptr to process descriptor block table abx Point to specific process' entry lda ,x Get MSB of process dsc. ptr beq L0B40 None there, exit with error clrb Clear LSB of process dsc. ptr (always fall on $200 tfr d,y boundaries) & move ptr to Y puls d,x,pc Restore regs & return L0B40 puls d,x Get regs back comb Exit with Bad process ID error ldb #E$BPrcID rts