annotate level2/modules/kernel/fldabx.asm @ 1345:1da8ab9ba433

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