1345
|
1 **************************************************
|
|
2 * System Call: F$LDABX
|
|
3 *
|
|
4 * Function: Load A from 0,X in task B
|
|
5 *
|
|
6 * Input: B = Task number
|
|
7 * X = Data pointer
|
|
8 *
|
|
9 * Output: A = Data byte at 0,x in task's address space
|
|
10 *
|
|
11 * Error: CC = C bit set; B = error code
|
|
12 *
|
1145
|
13 FLDABX ldb R$B,u Get task # to get byte from
|
|
14 ldx R$X,u Get offset into task's DAT image to get byte from
|
|
15 *** bsr L0C40 Go get the byte into B
|
|
16 * Load a byte from another task
|
|
17 * Entry: B=Task #
|
|
18 * X=Pointer to data
|
|
19 * Exit : B=Byte from other task
|
|
20 L0C40 pshs cc,a,x,u
|
|
21 bsr L0BF5
|
|
22 ldd a,u
|
|
23 orcc #IntMasks
|
1241
|
24 stb >DAT.Regs
|
1145
|
25 ldb ,x
|
1241
|
26 clr >DAT.Regs
|
1145
|
27 puls cc,a,x,u
|
|
28
|
|
29 stb R$A,u Save into caller's A & return
|
|
30 clrb set to no errors
|
|
31 rts
|
|
32
|
|
33 * Get pointer to task DAT image
|
|
34 * Entry: B=Task #
|
|
35 * Exit : U=Pointer to task image
|
|
36 *L0C09 ldu <D.TskIPt get pointer to task image table
|
|
37 * lslb multiply task # by 2
|
|
38 * ldu b,u get pointer to task image (doesn't affect carry)
|
|
39 * rts restore & return
|
|
40
|
1345
|
41
|
|
42 **************************************************
|
|
43 * System Call: F$STABX
|
|
44 *
|
|
45 * Function: Store A at 0,X in task B
|
|
46 *
|
|
47 * Input: A = Data byte to store in task's address space
|
|
48 * B = Task number
|
|
49 * X = Logical address in task's address space
|
|
50 *
|
|
51 * Output: None
|
|
52 *
|
|
53 * Error: CC = C bit set; B = error code
|
|
54 *
|
1145
|
55 FSTABX ldd R$D,u
|
|
56 ldx R$X,u
|
|
57 * Store a byte in another task
|
|
58 * Entry: A=Byte to store
|
|
59 * B=Task #
|
|
60
|
|
61 * X=Pointer to data
|
|
62 L0C28 andcc #^Carry
|
|
63 pshs cc,d,x,u
|
|
64 bsr L0BF5 calculate offset into DAT image
|
|
65 ldd a,u get memory block
|
|
66 lda 1,s
|
|
67 orcc #IntMasks
|
1241
|
68 stb >DAT.Regs
|
1145
|
69 sta ,x
|
1241
|
70 clr >DAT.Regs
|
1145
|
71 puls cc,d,x,u,pc
|