annotate 3rdparty/packages/basic09/syscall.asm @ 482:e4b03c2a7bec

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