Mercurial > hg > Members > kono > nitros9-code
changeset 227:c9803b86c85a
Added syscall
author | boisy |
---|---|
date | Tue, 16 Jul 2002 02:14:55 +0000 |
parents | 1659ca4836e7 |
children | a7d1dd92b04f |
files | level1/cmds/makefile level1/cmds/syscall.asm |
diffstat | 2 files changed, 75 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/level1/cmds/makefile Tue Jul 16 02:04:08 2002 +0000 +++ b/level1/cmds/makefile Tue Jul 16 02:14:55 2002 +0000 @@ -4,12 +4,12 @@ CMDS = asm attr backup binex build cobbler cobbler_d64 copy date \ dcheck debug deiniz del deldir dir display dsave dump \ - echo edit exbin format format_d64 free grfo ident iniz link list \ - load login makdir mdir merge mfree os9gen os9gen_d64 \ + echo edit exbin format format_d64 free grfo ident iniz link \ + list load login makdir mdir merge mfree os9gen os9gen_d64 \ park printerr procs pwd pxd \ rename save setime shell sleep tee tmode tsmon \ tuneport unlink verify xmode -SUBRTNS = inkey +SUBRTNS = inkey syscall ALLOBJS = $(CMDS) $(SUBRTNS) all: $(ALLOBJS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/cmds/syscall.asm Tue Jul 16 02:14:55 2002 +0000 @@ -0,0 +1,72 @@ +******************************************************************** +* SysCall - system call subroutine module +* +* $Id$ +* +* Ed. Comments Who YY/MM/DD +* ------------------------------------------------------------------ +* 2 From OS-9 Level Two Vr. 2.00.01 Basic09 disk + + nam SysCall + ttl system call subroutine module + +* Disassembled 02/07/06 13:11:18 by Disasm v1.6 (C) 1988 by RML + + ifp1 + use defsfile + endc + +tylg set Sbrtn+Objct +atrv set ReEnt+rev +rev set $01 +edition set 2 + + mod eom,name,tylg,atrv,start,size + +u0000 rmb 0 +size equ . + +name fcs /SysCall/ + fcb edition + +start ldd $02,s get number of parameters + cmpd #$0002 two? + bne L005C if not, error + ldd $0A,s get size of second parameter + cmpd #R$PC appropriate registers? + bne L005C branch if not + ldd [<$04,s] get address of first parameter + ldx $06,s get size of first parameter + leax -$01,x + beq L0034 + leax -$01,x + bne L005C + tfr b,a +L0034 ldb #$39 get rts + pshs b,a put it and os9 func code on stack + ldd #$103F get SWI2 instruction + pshs b,a put on stack + ldu $0C,s get pointer to caller's registers on stack + ldd R$D,u + ldx R$X,u + ldy R$Y,u + ldu R$U,u + jsr ,s branch to subroutine + pshs u,cc + ldu $0F,s + leau R$U,u + pshu y,x,dp,b,a + puls x,a + sta ,-u + stx $08,u + leas $04,s + clrb + rts + +L005C comb + ldb #E$ParmEr + rts + + emod +eom equ * + end