Annotation of sys/dev/microcode/siop/oosiop.ss, Revision 1.1
1.1 ! nbrk 1: ; $OpenBSD: oosiop.ss,v 1.2 2004/10/01 04:08:45 jsg Exp $
! 2: ; $NetBSD: oosiop.ss,v 1.2 2003/04/06 09:48:42 tsutsui Exp $
! 3:
! 4: ;
! 5: ; Copyright (c) 2001 Shuichiro URATA. All rights reserved.
! 6: ;
! 7: ; Redistribution and use in source and binary forms, with or without
! 8: ; modification, are permitted provided that the following conditions
! 9: ; are met:
! 10: ; 1. Redistributions of source code must retain the above copyright
! 11: ; notice, this list of conditions and the following disclaimer.
! 12: ; 2. Redistributions in binary form must reproduce the above copyright
! 13: ; notice, this list of conditions and the following disclaimer in the
! 14: ; documentation and/or other materials provided with the distribution.
! 15: ; 3. The name of the author may not be used to endorse or promote products
! 16: ; derived from this software without specific prior written permission.
! 17: ;
! 18: ; THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
! 19: ; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
! 20: ; OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
! 21: ; IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
! 22: ; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
! 23: ; NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
! 24: ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
! 25: ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
! 26: ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
! 27: ; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! 28: ;
! 29:
! 30: ; NCR 53c700 script
! 31: ;
! 32:
! 33: ARCH 700
! 34:
! 35: ; interrupt codes
! 36: ABSOLUTE int_done = 0xbeef0000
! 37: ABSOLUTE int_msgin = 0xbeef0001
! 38: ABSOLUTE int_extmsg = 0xbeef0002
! 39: ABSOLUTE int_resel = 0xbeef0003
! 40: ABSOLUTE int_res_id = 0xbeef0004
! 41: ABSOLUTE int_resfail = 0xbeef0005
! 42: ABSOLUTE int_disc = 0xbeef0006
! 43: ABSOLUTE int_err = 0xdeadbeef
! 44:
! 45: ; patch entries
! 46: ENTRY p_resel_msgin_move
! 47: ENTRY p_select
! 48: ENTRY p_datain_jump
! 49: ENTRY p_dataout_jump
! 50: ENTRY p_msgin_move
! 51: ENTRY p_msgout_move
! 52: ENTRY p_cmdout_move
! 53: ENTRY p_status_move
! 54: ENTRY p_extmsglen_move
! 55: ENTRY p_extmsgin_move
! 56:
! 57:
! 58: PROC oosiop_script:
! 59:
! 60: ENTRY wait_reselect
! 61: wait_reselect:
! 62: WAIT RESELECT REL(reselect_fail)
! 63: INT int_resel
! 64: reselect_fail:
! 65: INT int_resfail
! 66:
! 67: ENTRY wait_resel_identify
! 68: wait_resel_identify:
! 69: INT int_err, WHEN NOT MSG_IN
! 70: p_resel_msgin_move:
! 71: MOVE 0, 0, WHEN MSG_IN
! 72: INT int_res_id
! 73:
! 74: ENTRY start_select
! 75: start_select:
! 76: p_select:
! 77: SELECT ATN 0, REL(wait_reselect)
! 78:
! 79: ENTRY phasedispatch
! 80: phasedispatch:
! 81: JUMP REL(msgin), WHEN MSG_IN
! 82: JUMP REL(msgout), WHEN MSG_OUT
! 83: JUMP REL(status), WHEN STATUS
! 84: JUMP REL(cmdout), WHEN CMD
! 85: p_datain_jump:
! 86: JUMP 0, WHEN DATA_IN
! 87: p_dataout_jump:
! 88: JUMP 0, WHEN DATA_OUT
! 89: INT int_err
! 90:
! 91: msgin:
! 92: CLEAR ATN
! 93: p_msgin_move:
! 94: MOVE 0, 0, WHEN MSG_IN
! 95: JUMP REL(complete), IF 0x00
! 96: JUMP REL(extmsgsetup), IF 0x01
! 97: JUMP REL(disconnect), IF 0x04
! 98: INT int_msgin
! 99:
! 100: ENTRY ack_msgin
! 101: ack_msgin:
! 102: CLEAR ACK
! 103: JUMP REL(phasedispatch)
! 104:
! 105: ENTRY sendmsg
! 106: sendmsg:
! 107: SET ATN
! 108: CLEAR ACK
! 109: msgout:
! 110: p_msgout_move:
! 111: MOVE 0, 0, WHEN MSG_OUT
! 112: CLEAR ATN
! 113: JUMP REL(phasedispatch)
! 114:
! 115: cmdout:
! 116: CLEAR ATN
! 117: p_cmdout_move:
! 118: MOVE 0, 0, WHEN CMD
! 119: JUMP REL(phasedispatch)
! 120:
! 121: status:
! 122: p_status_move:
! 123: MOVE 0, 0, WHEN STATUS
! 124: JUMP REL(phasedispatch)
! 125:
! 126: disconnect:
! 127: CLEAR ACK
! 128: WAIT DISCONNECT
! 129: INT int_disc
! 130:
! 131: complete:
! 132: CLEAR ACK
! 133: WAIT DISCONNECT
! 134: INT int_done
! 135:
! 136: ; receive extended message length
! 137: extmsgsetup:
! 138: CLEAR ACK
! 139: INT int_err, IF NOT MSG_IN
! 140: p_extmsglen_move:
! 141: MOVE 0, 0, WHEN MSG_IN
! 142: INT int_extmsg
! 143:
! 144: ; receive extended message
! 145: ENTRY rcv_extmsg
! 146: rcv_extmsg:
! 147: CLEAR ACK
! 148: INT int_err, IF NOT MSG_IN
! 149: p_extmsgin_move:
! 150: MOVE 0, 0, WHEN MSG_IN
! 151: INT int_msgin
CVSweb