diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-01-08 02:11:39 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-01-08 02:11:39 +0000 |
commit | a3e988bf5abac645f9e20ebce4dea1643712d2bf (patch) | |
tree | 9897618ae028053895d2c2a6f09729ba224bf8db /sys/dev/microcode | |
parent | 5b2a1b9dd89678c855fd966ab513be82848ba61b (diff) |
Merry Christmas Mickey!
First cut at osiop driver (LSI Logic/Symbios/NCR 53C710). For hppa
only at the moment.
Functional for the most part, but there are known problems:
1) SCSI_CHECK/REQUEST_SENSE not handled at all - simply returns a
zero'ed scsi_sense_data buffer. As a result all osiop sc_link's are
created with the ADEV_NODOORLOCK quirk to suppress PREVENT_ALLOW
commands from being issued (and failing) during probe.
2) Sync negotiation (wide is not supported on this chip) needs to be
validated due to some ominous comments in the source about being valid
only for the 33Mhz Zeus board.
3) Probe message needs fixing/completion to issue useful info. See 2).
4) Timeout/hangs occur under heavy load, e.g. make builds.
From NetBSD.
ok mickey@
Diffstat (limited to 'sys/dev/microcode')
-rw-r--r-- | sys/dev/microcode/siop/Makefile | 12 | ||||
-rw-r--r-- | sys/dev/microcode/siop/osiop.out | 181 | ||||
-rw-r--r-- | sys/dev/microcode/siop/osiop.ss | 256 |
3 files changed, 444 insertions, 5 deletions
diff --git a/sys/dev/microcode/siop/Makefile b/sys/dev/microcode/siop/Makefile index 39dfe3d8df8..db8a569b205 100644 --- a/sys/dev/microcode/siop/Makefile +++ b/sys/dev/microcode/siop/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.1 2001/02/15 04:07:59 krw Exp $ +# $OpenBSD: Makefile,v 1.2 2003/01/08 02:11:38 krw Exp $ # $NetBSD: Makefile,v 1.1 2000/04/21 17:57:01 bouyer Exp $ -all: siop.out +all: siop.out osiop.out PROG= ncr53cxxx MKSHARE=no @@ -9,9 +9,11 @@ MAN= .include <bsd.prog.mk> -regen: siop.out -headers: siop.out +regen: siop.out osiop.out +headers: siop.out osiop.out siop.out: siop.ss ${PROG} - ./${PROG} siop.ss -o siop.out + ./${PROG} siop.ss -p siop.out +osiop.out: osiop.ss ${PROG} + ./${PROG} osiop.ss -p osiop.out diff --git a/sys/dev/microcode/siop/osiop.out b/sys/dev/microcode/siop/osiop.out new file mode 100644 index 00000000000..c1deafa2f0a --- /dev/null +++ b/sys/dev/microcode/siop/osiop.out @@ -0,0 +1,181 @@ +/* $NetBSD: ncr53cxxx.c,v 1.10 2002/04/21 22:40:10 bouyer Exp $ */ +/* + * DO NOT EDIT - this file is automatically generated. + * created from osiop.ss on Sat Oct 19 20:16:28 2002 + */ +const u_int32_t osiop_script[] = { + 0x47000000, 0x00000128, /* 000 - 0 */ + 0x878b0000, 0x00000030, /* 008 - 8 */ + 0x868a0000, 0x00000178, /* 010 - 16 */ + 0x828a0000, 0x00000180, /* 018 - 24 */ + 0x808a0000, 0x00000190, /* 020 - 32 */ + 0x818a0000, 0x00000298, /* 028 - 40 */ + 0x838a0000, 0x000003a0, /* 030 - 48 */ + 0x98080000, 0x0000ff05, /* 038 - 56 */ + 0x1f000028, 0x00000028, /* 040 - 64 */ + 0x808c0001, 0x00000040, /* 048 - 72 */ + 0x808c0004, 0x00000088, /* 050 - 80 */ + 0x808c0002, 0x00000098, /* 058 - 88 */ + 0x808c0007, 0x00000010, /* 060 - 96 */ + 0x808c0003, 0x00000008, /* 068 - 104 */ + 0x98080000, 0x0000ff06, /* 070 - 112 */ + 0x60000040, 0x00000000, /* 078 - 120 */ + 0x60000008, 0x00000000, /* 080 - 128 */ + 0x80880000, 0xffffff78, /* 088 - 136 */ + 0x60000040, 0x00000000, /* 090 - 144 */ + 0x1f000030, 0x00000030, /* 098 - 152 */ + 0x808c0003, 0x00000008, /* 0a0 - 160 */ + 0x98080000, 0x0000ff07, /* 0a8 - 168 */ + 0x60000040, 0x00000000, /* 0b0 - 176 */ + 0x1f000038, 0x00000038, /* 0b8 - 184 */ + 0x98080000, 0x0000ff0b, /* 0c0 - 192 */ + 0x58000008, 0x00000000, /* 0c8 - 200 */ + 0x60000040, 0x00000000, /* 0d0 - 208 */ + 0x80880000, 0xffffff28, /* 0d8 - 216 */ + 0x60000040, 0x00000000, /* 0e0 - 224 */ + 0x48000000, 0x00000000, /* 0e8 - 232 */ + 0x98080000, 0x0000ff02, /* 0f0 - 240 */ + 0x60000040, 0x00000000, /* 0f8 - 248 */ + 0x87830000, 0xffffff00, /* 100 - 256 */ + 0x1f000030, 0x00000030, /* 108 - 264 */ + 0x98040004, 0x0000ff08, /* 110 - 272 */ + 0x60000040, 0x00000000, /* 118 - 280 */ + 0x48000000, 0x00000000, /* 120 - 288 */ + 0x98080000, 0x0000ff01, /* 128 - 296 */ + 0x54000000, 0x00000038, /* 130 - 304 */ + 0x72230000, 0x00000000, /* 138 - 312 */ + 0x6a340000, 0x00000000, /* 140 - 320 */ + 0x9f030000, 0x0000ff09, /* 148 - 328 */ + 0x1f000020, 0x00000020, /* 150 - 336 */ + 0x98080000, 0x0000ff03, /* 158 - 344 */ + 0x60000040, 0x00000000, /* 160 - 352 */ + 0x80880000, 0xfffffe98, /* 168 - 360 */ + 0x74011000, 0x00000000, /* 170 - 368 */ + 0x980c0000, 0x0000ff04, /* 178 - 376 */ + 0x74164000, 0x00000000, /* 180 - 384 */ + 0x80880000, 0xffffffa0, /* 188 - 392 */ + 0x1e000008, 0x00000008, /* 190 - 400 */ + 0x80880000, 0xfffffe68, /* 198 - 408 */ + 0x60000008, 0x00000000, /* 1a0 - 416 */ + 0x1a000010, 0x00000010, /* 1a8 - 424 */ + 0x80880000, 0xfffffe50, /* 1b0 - 432 */ + 0x18000040, 0x00000040, /* 1b8 - 440 */ + 0x88830000, 0xfffffe40, /* 1c0 - 448 */ + 0x18000048, 0x00000048, /* 1c8 - 456 */ + 0x88830000, 0xfffffe30, /* 1d0 - 464 */ + 0x18000050, 0x00000050, /* 1d8 - 472 */ + 0x88830000, 0xfffffe20, /* 1e0 - 480 */ + 0x18000058, 0x00000058, /* 1e8 - 488 */ + 0x88830000, 0xfffffe10, /* 1f0 - 496 */ + 0x18000060, 0x00000060, /* 1f8 - 504 */ + 0x88830000, 0xfffffe00, /* 200 - 512 */ + 0x18000068, 0x00000068, /* 208 - 520 */ + 0x88830000, 0xfffffdf0, /* 210 - 528 */ + 0x18000070, 0x00000070, /* 218 - 536 */ + 0x88830000, 0xfffffde0, /* 220 - 544 */ + 0x18000078, 0x00000078, /* 228 - 552 */ + 0x88830000, 0xfffffdd0, /* 230 - 560 */ + 0x18000080, 0x00000080, /* 238 - 568 */ + 0x88830000, 0xfffffdc0, /* 240 - 576 */ + 0x18000088, 0x00000088, /* 248 - 584 */ + 0x88830000, 0xfffffdb0, /* 250 - 592 */ + 0x18000090, 0x00000090, /* 258 - 600 */ + 0x88830000, 0xfffffda0, /* 260 - 608 */ + 0x18000098, 0x00000098, /* 268 - 616 */ + 0x88830000, 0xfffffd90, /* 270 - 624 */ + 0x180000a0, 0x000000a0, /* 278 - 632 */ + 0x88830000, 0xfffffd80, /* 280 - 640 */ + 0x180000a8, 0x000000a8, /* 288 - 648 */ + 0x88830000, 0xfffffd70, /* 290 - 656 */ + 0x180000b0, 0x000000b0, /* 298 - 664 */ + 0x88830000, 0xfffffd60, /* 2a0 - 672 */ + 0x180000b8, 0x000000b8, /* 2a8 - 680 */ + 0x88830000, 0xfffffd50, /* 2b0 - 688 */ + 0x180000c0, 0x000000c0, /* 2b8 - 696 */ + 0x88880000, 0xfffffd40, /* 2c0 - 704 */ + 0x19000040, 0x00000040, /* 2c8 - 712 */ + 0x89830000, 0xfffffd30, /* 2d0 - 720 */ + 0x19000048, 0x00000048, /* 2d8 - 728 */ + 0x89830000, 0xfffffd20, /* 2e0 - 736 */ + 0x19000050, 0x00000050, /* 2e8 - 744 */ + 0x89830000, 0xfffffd10, /* 2f0 - 752 */ + 0x19000058, 0x00000058, /* 2f8 - 760 */ + 0x89830000, 0xfffffd00, /* 300 - 768 */ + 0x19000060, 0x00000060, /* 308 - 776 */ + 0x89830000, 0xfffffcf0, /* 310 - 784 */ + 0x19000068, 0x00000068, /* 318 - 792 */ + 0x89830000, 0xfffffce0, /* 320 - 800 */ + 0x19000070, 0x00000070, /* 328 - 808 */ + 0x89830000, 0xfffffcd0, /* 330 - 816 */ + 0x19000078, 0x00000078, /* 338 - 824 */ + 0x89830000, 0xfffffcc0, /* 340 - 832 */ + 0x19000080, 0x00000080, /* 348 - 840 */ + 0x89830000, 0xfffffcb0, /* 350 - 848 */ + 0x19000088, 0x00000088, /* 358 - 856 */ + 0x89830000, 0xfffffca0, /* 360 - 864 */ + 0x19000090, 0x00000090, /* 368 - 872 */ + 0x89830000, 0xfffffc90, /* 370 - 880 */ + 0x19000098, 0x00000098, /* 378 - 888 */ + 0x89830000, 0xfffffc80, /* 380 - 896 */ + 0x190000a0, 0x000000a0, /* 388 - 904 */ + 0x89830000, 0xfffffc70, /* 390 - 912 */ + 0x190000a8, 0x000000a8, /* 398 - 920 */ + 0x89830000, 0xfffffc60, /* 3a0 - 928 */ + 0x190000b0, 0x000000b0, /* 3a8 - 936 */ + 0x89830000, 0xfffffc50, /* 3b0 - 944 */ + 0x190000b8, 0x000000b8, /* 3b8 - 952 */ + 0x89830000, 0xfffffc40, /* 3c0 - 960 */ + 0x190000c0, 0x000000c0, /* 3c8 - 968 */ + 0x88880000, 0xfffffc30, /* 3d0 - 976 */ + 0x1b000018, 0x00000018, /* 3d8 - 984 */ + 0x9f030000, 0x0000ff0a, /* 3e0 - 992 */ + 0x1f000020, 0x00000020, /* 3e8 - 1000 */ + 0x60000040, 0x00000000, /* 3f0 - 1008 */ + 0x48000000, 0x00000000, /* 3f8 - 1016 */ + 0x98080000, 0x0000ff00, /* 400 - 1024 */ + 0x80880000, 0xfffffd20, /* 408 - 1032 */ +}; + +#define A_ds_Device 0x00000000 +#define A_ds_MsgOut 0x00000008 +#define A_ds_Cmd 0x00000010 +#define A_ds_Status 0x00000018 +#define A_ds_Msg 0x00000020 +#define A_ds_MsgIn 0x00000028 +#define A_ds_ExtMsg 0x00000030 +#define A_ds_SyncMsg 0x00000038 +#define A_ds_Data1 0x00000040 +#define A_ds_Data2 0x00000048 +#define A_ds_Data3 0x00000050 +#define A_ds_Data4 0x00000058 +#define A_ds_Data5 0x00000060 +#define A_ds_Data6 0x00000068 +#define A_ds_Data7 0x00000070 +#define A_ds_Data8 0x00000078 +#define A_ds_Data9 0x00000080 +#define A_ds_Data10 0x00000088 +#define A_ds_Data11 0x00000090 +#define A_ds_Data12 0x00000098 +#define A_ds_Data13 0x000000a0 +#define A_ds_Data14 0x000000a8 +#define A_ds_Data15 0x000000b0 +#define A_ds_Data16 0x000000b8 +#define A_ds_Data17 0x000000c0 +#define A_ok 0x0000ff00 +#define A_int_disc 0x0000ff01 +#define A_int_disc_wodp 0x0000ff02 +#define A_int_reconnect 0x0000ff03 +#define A_int_connect 0x0000ff04 +#define A_int_phase 0x0000ff05 +#define A_int_msgin 0x0000ff06 +#define A_int_extmsg 0x0000ff07 +#define A_int_msgsdp 0x0000ff08 +#define A_int_identify 0x0000ff09 +#define A_int_status 0x0000ff0a +#define A_int_syncmsg 0x0000ff0b +#define Ent_scripts 0x00000000 +#define Ent_switch 0x00000008 +#define Ent_wait_reselect 0x00000130 +#define Ent_dataout 0x000001b8 +#define Ent_datain 0x000002c8 +#define Ent_clear_ack 0x00000078 diff --git a/sys/dev/microcode/siop/osiop.ss b/sys/dev/microcode/siop/osiop.ss new file mode 100644 index 00000000000..5c6511bcd5b --- /dev/null +++ b/sys/dev/microcode/siop/osiop.ss @@ -0,0 +1,256 @@ +; $OpenBSD: osiop.ss,v 1.1 2003/01/08 02:11:38 krw Exp $ +; $NetBSD: osiop.ss,v 1.1 2001/04/30 04:47:51 tsutsui Exp $ + +; +; Copyright (c) 1995 Michael L. Hitch +; All rights reserved. +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; 1. Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; 2. Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in the +; documentation and/or other materials provided with the distribution. +; 3. All advertising materials mentioning features or use of this software +; must display the following acknowledgement: +; This product includes software developed by Michael L. Hitch. +; 4. The name of the author may not be used to endorse or promote products +; derived from this software without specific prior written permission +; +; THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +; OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +; IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +; NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +; + +; NCR 53c710 script +; +ARCH 710 +; +ABSOLUTE ds_Device = 0 +ABSOLUTE ds_MsgOut = ds_Device + 8 +ABSOLUTE ds_Cmd = ds_MsgOut + 8 +ABSOLUTE ds_Status = ds_Cmd + 8 +ABSOLUTE ds_Msg = ds_Status + 8 +ABSOLUTE ds_MsgIn = ds_Msg + 8 +ABSOLUTE ds_ExtMsg = ds_MsgIn + 8 +ABSOLUTE ds_SyncMsg = ds_ExtMsg + 8 +ABSOLUTE ds_Data1 = ds_SyncMsg + 8 +ABSOLUTE ds_Data2 = ds_Data1 + 8 +ABSOLUTE ds_Data3 = ds_Data2 + 8 +ABSOLUTE ds_Data4 = ds_Data3 + 8 +ABSOLUTE ds_Data5 = ds_Data4 + 8 +ABSOLUTE ds_Data6 = ds_Data5 + 8 +ABSOLUTE ds_Data7 = ds_Data6 + 8 +ABSOLUTE ds_Data8 = ds_Data7 + 8 +ABSOLUTE ds_Data9 = ds_Data8 + 8 +ABSOLUTE ds_Data10 = ds_Data9 + 8 +ABSOLUTE ds_Data11 = ds_Data10 + 8 +ABSOLUTE ds_Data12 = ds_Data11 + 8 +ABSOLUTE ds_Data13 = ds_Data12 + 8 +ABSOLUTE ds_Data14 = ds_Data13 + 8 +ABSOLUTE ds_Data15 = ds_Data14 + 8 +ABSOLUTE ds_Data16 = ds_Data15 + 8 +ABSOLUTE ds_Data17 = ds_Data16 + 8 + + +ABSOLUTE ok = 0xff00 +ABSOLUTE int_disc = 0xff01 +ABSOLUTE int_disc_wodp = 0xff02 +ABSOLUTE int_reconnect = 0xff03 +ABSOLUTE int_connect = 0xff04 +ABSOLUTE int_phase = 0xff05 +ABSOLUTE int_msgin = 0xff06 +ABSOLUTE int_extmsg = 0xff07 +ABSOLUTE int_msgsdp = 0xff08 +ABSOLUTE int_identify = 0xff09 +ABSOLUTE int_status = 0xff0a +ABSOLUTE int_syncmsg = 0xff0b + +ENTRY scripts +ENTRY switch +ENTRY wait_reselect +ENTRY dataout +ENTRY datain +ENTRY clear_ack + +PROC osiop_script: + +scripts: + + SELECT ATN FROM ds_Device, REL(reselect) +; +switch: + JUMP REL(msgin), WHEN MSG_IN + JUMP REL(msgout), IF MSG_OUT + JUMP REL(command_phase), IF CMD + JUMP REL(dataout), IF DATA_OUT + JUMP REL(datain), IF DATA_IN + JUMP REL(end), IF STATUS + + INT int_phase ; Unrecognized phase + +msgin: + MOVE FROM ds_MsgIn, WHEN MSG_IN + JUMP REL(ext_msg), IF 0x01 ; extended message + JUMP REL(disc), IF 0x04 ; disconnect message + JUMP REL(msg_sdp), IF 0x02 ; save data pointers + JUMP REL(msg_rej), IF 0x07 ; message reject + JUMP REL(msg_rdp), IF 0x03 ; restore data pointers + INT int_msgin ; unrecognized message + +msg_rej: +; Do we need to interrupt host here to let it handle the reject? +msg_rdp: +clear_ack: + CLEAR ACK + CLEAR ATN + JUMP REL(switch) + +ext_msg: + CLEAR ACK + MOVE FROM ds_ExtMsg, WHEN MSG_IN + JUMP REL(sync_msg), IF 0x03 + int int_extmsg ; extended message not SDTR + +sync_msg: + CLEAR ACK + MOVE FROM ds_SyncMsg, WHEN MSG_IN + int int_syncmsg ; Let host handle the message +; If we continue from the interrupt, the host has set up a response +; message to be sent. Set ATN, clear ACK, and continue. + SET ATN + CLEAR ACK + JUMP REL(switch) + +disc: + CLEAR ACK + WAIT DISCONNECT + + int int_disc_wodp ; signal disconnect w/o save DP + +msg_sdp: + CLEAR ACK ; acknowledge message + JUMP REL(switch), WHEN NOT MSG_IN + MOVE FROM ds_ExtMsg, WHEN MSG_IN + INT int_msgsdp, IF NOT 0x04 ; interrupt if not disconnect + CLEAR ACK + WAIT DISCONNECT + + INT int_disc ; signal disconnect + +reselect: +wait_reselect: + WAIT RESELECT REL(select_adr) + MOVE LCRC to SFBR ; Save reselect ID + MOVE SFBR to SCRATCH0 + + INT int_identify, WHEN NOT MSG_IN + MOVE FROM ds_Msg, WHEN MSG_IN + INT int_reconnect ; let host know about reconnect + CLEAR ACK ; acknowlege the message + JUMP REL(switch) + +select_adr: + MOVE SCNTL1 & 0x10 to SFBR ; get connected status + INT int_connect, IF 0x00 ; tell host if not connected + MOVE CTEST2 & 0x40 to SFBR ; clear Sig_P + JUMP REL(wait_reselect) ; and try reselect again + +msgout: + MOVE FROM ds_MsgOut, WHEN MSG_OUT + JUMP REL(switch) + +command_phase: + CLEAR ATN + MOVE FROM ds_Cmd, WHEN CMD + JUMP REL(switch) + +dataout: + MOVE FROM ds_Data1, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data2, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data3, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data4, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data5, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data6, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data7, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data8, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data9, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data10, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data11, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data12, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data13, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data14, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data15, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data16, WHEN DATA_OUT + CALL REL(switch), WHEN NOT DATA_OUT + MOVE FROM ds_Data17, WHEN DATA_OUT + CALL REL(switch) + +datain: + MOVE FROM ds_Data1, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data2, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data3, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data4, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data5, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data6, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data7, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data8, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data9, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data10, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data11, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data12, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data13, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data14, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data15, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data16, WHEN DATA_IN + CALL REL(switch), WHEN NOT DATA_IN + MOVE FROM ds_Data17, WHEN DATA_IN + CALL REL(switch) + +end: + MOVE FROM ds_Status, WHEN STATUS + int int_status, WHEN NOT MSG_IN ; status not followed by msg + MOVE FROM ds_Msg, WHEN MSG_IN + CLEAR ACK + WAIT DISCONNECT + INT ok ; signal completion + JUMP REL(wait_reselect) |