482
|
1 ********************************************************************
|
|
2 * SysCall - system call subroutine module
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
|
6 * Ed. Comments Who YY/MM/DD
|
|
7 * ------------------------------------------------------------------
|
|
8 * 2 From OS-9 Level Two Vr. 2.00.01 Basic09 disk
|
|
9
|
|
10 nam SysCall
|
|
11 ttl system call subroutine module
|
|
12
|
|
13 * Disassembled 02/07/06 13:11:18 by Disasm v1.6 (C) 1988 by RML
|
|
14
|
|
15 ifp1
|
|
16 use defsfile
|
|
17 endc
|
|
18
|
|
19 tylg set Sbrtn+Objct
|
|
20 atrv set ReEnt+rev
|
|
21 rev set $01
|
|
22 edition set 2
|
|
23
|
|
24 mod eom,name,tylg,atrv,start,size
|
|
25
|
|
26 u0000 rmb 0
|
|
27 size equ .
|
|
28
|
|
29 name fcs /SysCall/
|
|
30 fcb edition
|
|
31
|
|
32 start ldd $02,s get number of parameters
|
|
33 cmpd #$0002 two?
|
|
34 bne L005C if not, error
|
|
35 ldd $0A,s get size of second parameter
|
|
36 cmpd #R$PC appropriate registers?
|
|
37 bne L005C branch if not
|
|
38 ldd [<$04,s] get address of first parameter
|
|
39 ldx $06,s get size of first parameter
|
|
40 leax -$01,x
|
|
41 beq L0034
|
|
42 leax -$01,x
|
|
43 bne L005C
|
|
44 tfr b,a
|
|
45 L0034 ldb #$39 get rts
|
|
46 pshs b,a put it and os9 func code on stack
|
|
47 ldd #$103F get SWI2 instruction
|
|
48 pshs b,a put on stack
|
|
49 ldu $0C,s get pointer to caller's registers on stack
|
|
50 ldd R$D,u
|
|
51 ldx R$X,u
|
|
52 ldy R$Y,u
|
|
53 ldu R$U,u
|
|
54 jsr ,s branch to subroutine
|
|
55 pshs u,cc
|
|
56 ldu $0F,s
|
|
57 leau R$U,u
|
|
58 pshu y,x,dp,b,a
|
|
59 puls x,a
|
|
60 sta ,-u
|
|
61 stx $08,u
|
|
62 leas $04,s
|
|
63 clrb
|
|
64 rts
|
|
65
|
|
66 L005C comb
|
|
67 ldb #E$ParmEr
|
|
68 rts
|
|
69
|
|
70 emod
|
|
71 eom equ *
|
|
72 end
|