4 ; Copyright (c) 2001 Shuichiro URATA. All rights reserved.
6 ; Redistribution and use in source and binary forms, with or without
7 ; modification, are permitted provided that the following conditions
9 ; 1. Redistributions of source code must retain the above copyright
10 ; notice, this list of conditions and the following disclaimer.
11 ; 2. Redistributions in binary form must reproduce the above copyright
12 ; notice, this list of conditions and the following disclaimer in the
13 ; documentation and/or other materials provided with the distribution.
14 ; 3. The name of the author may not be used to endorse or promote products
15 ; derived from this software without specific prior written permission.
17 ; THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 ; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 ; OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 ; IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 ; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 ; NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 ; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 ABSOLUTE int_done = 0xbeef0000
36 ABSOLUTE int_msgin = 0xbeef0001
37 ABSOLUTE int_extmsg = 0xbeef0002
38 ABSOLUTE int_resel = 0xbeef0003
39 ABSOLUTE int_res_id = 0xbeef0004
40 ABSOLUTE int_resfail = 0xbeef0005
41 ABSOLUTE int_disc = 0xbeef0006
42 ABSOLUTE int_err = 0xdeadbeef
45 ENTRY p_resel_msgin_move
53 ENTRY p_extmsglen_move
61 WAIT RESELECT REL(reselect_fail)
66 ENTRY wait_resel_identify
68 INT int_err, WHEN NOT MSG_IN
70 MOVE 0, 0, WHEN MSG_IN
76 SELECT ATN 0, REL(wait_reselect)
80 JUMP REL(msgin), WHEN MSG_IN
81 JUMP REL(msgout), WHEN MSG_OUT
82 JUMP REL(status), WHEN STATUS
83 JUMP REL(cmdout), WHEN CMD
93 MOVE 0, 0, WHEN MSG_IN
94 JUMP REL(complete), IF 0x00
95 JUMP REL(extmsgsetup), IF 0x01
96 JUMP REL(disconnect), IF 0x04
102 JUMP REL(phasedispatch)
110 MOVE 0, 0, WHEN MSG_OUT
112 JUMP REL(phasedispatch)
118 JUMP REL(phasedispatch)
122 MOVE 0, 0, WHEN STATUS
123 JUMP REL(phasedispatch)
135 ; receive extended message length
138 INT int_err, IF NOT MSG_IN
140 MOVE 0, 0, WHEN MSG_IN
143 ; receive extended message
147 INT int_err, IF NOT MSG_IN
149 MOVE 0, 0, WHEN MSG_IN