Mercurial > hg > Members > kono > nitros9-code
view level2/modules/kernel/fldabx.asm @ 3165:2d22d31bc74b
L2 kernel: Minor comment tweaks
author | Neal Crook <foofoobedoo@gmail.com> |
---|---|
date | Thu, 06 Apr 2017 22:51:54 +0100 |
parents | 039ddb7c8ad7 |
children | 18306d646f71 |
line wrap: on
line source
************************************************** * System Call: F$LDABX * * Function: Load A from 0,X in task B * * Input: B = Task number * X = Data pointer * * Output: A = Data byte at 0,x in task's address space * * Error: CC = C bit set; B = error code * FLDABX ldb R$B,u Get task # to get byte from ldx R$X,u Get offset into task's DAT image to get byte from * Load a byte from another task * Entry: B=Task # * X=Pointer to data * Exit : B=Byte from other task L0C40 pshs cc,a,x,u bsr L0BF5 Calculate offset into DAT image (fmove.asm) ldd a,u orcc #IntMasks stb >DAT.Regs Map block into $0000-$1FFF ldb ,x clr >DAT.Regs Restore mapping at $0000-$1FFF puls cc,a,x,u stb R$A,u Save into caller's A & return clrb set to no errors rts * Get pointer to task DAT image * Entry: B=Task # * Exit : U=Pointer to task image *L0C09 ldu <D.TskIPt get pointer to task image table * lslb multiply task # by 2 * ldu b,u get pointer to task image (doesn't affect carry) * rts restore & return ************************************************** * System Call: F$STABX * * Function: Store A at 0,X in task B * * Input: A = Data byte to store in task's address space * B = Task number * X = Logical address in task's address space * * Output: None * * Error: CC = C bit set; B = error code * FSTABX ldd R$D,u ldx R$X,u * Store a byte in another task * Entry: A=Byte to store * B=Task # * X=Pointer to data L0C28 andcc #^Carry pshs cc,d,x,u bsr L0BF5 Calculate offset into DAT image (fmove.asm) ldd a,u Get memory block lda 1,s orcc #IntMasks stb >DAT.Regs Map selected block into $0000-$1FFF sta ,x clr >DAT.Regs Restore mapping at $0000-$1FFF puls cc,d,x,u,pc