diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/level2/modules/kernel/fsswi.asm	Tue Apr 22 19:35:48 2003 +0000
@@ -0,0 +1,26 @@
+**************************************************
+* System Call: F$SSWI
+*
+* Function: Sets the SWI vector specified for the calling process.
+*
+* Input:  B = SWI vector (1-3) to modify
+*         U = Address of new SWI vector for process
+*
+* Output: None
+*
+* Error:  CC = C bit set; B = error code
+*
+FSSWI    ldx   <D.Proc      get current process
+         ldb   R$A,u        get type code
+         decb               adjust for offset
+         cmpb  #3           legal value?
+         bcc   BadSWI       no, return error
+         lslb               account for 2 bytes entry
+         addb  #P$SWI       go to start of P$SWI pointers
+         ldu   R$X,u        get address
+         stu   b,x          save to descriptor
+         rts                return
+
+BadSWI   comb
+         ldb   #E$ISWI
+         rts