annotate level2/modules/kernel/fsswi.asm @ 1145:ca83286ded5b

Start of new OS-9 L2 Kernel
author boisy
date Tue, 22 Apr 2003 19:35:48 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
1 **************************************************
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
2 * System Call: F$SSWI
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
3 *
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
4 * Function: Sets the SWI vector specified for the calling process.
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
5 *
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
6 * Input: B = SWI vector (1-3) to modify
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
7 * U = Address of new SWI vector for process
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
8 *
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
9 * Output: None
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
10 *
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
11 * Error: CC = C bit set; B = error code
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
12 *
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
13 FSSWI ldx <D.Proc get current process
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
14 ldb R$A,u get type code
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
15 decb adjust for offset
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
16 cmpb #3 legal value?
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
17 bcc BadSWI no, return error
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
18 lslb account for 2 bytes entry
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
19 addb #P$SWI go to start of P$SWI pointers
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
20 ldu R$X,u get address
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
21 stu b,x save to descriptor
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
22 rts return
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
23
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
24 BadSWI comb
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
25 ldb #E$ISWI
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
26 rts