From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7e490a18b9688bd9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.44.102 with SMTP id d6mr1318702pbm.9.1316123418918; Thu, 15 Sep 2011 14:50:18 -0700 (PDT) Path: m9ni7055pbd.0!nntp.google.com!news1.google.com!goblin3!goblin.stu.neva.ru!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Stream_Element_Array Date: Thu, 15 Sep 2011 22:50:18 +0100 Organization: A noiseless patient Spider Message-ID: References: <1e6rw4vto3ldb.i8d7fxixapx4.dlg@40tude.net> <28u4e86fk8gn$.ialexttobgr0$.dlg@40tude.net> <276b8d0a-5b3c-4559-a275-98620657cc2f@s30g2000pri.googlegroups.com> <01c12338-e9f8-49ab-863d-c8282be3875e@g31g2000yqh.googlegroups.com> <1esmml9qftomp.vihelaijmcar$.dlg@40tude.net> <02671fc7-5c38-42dc-8017-529f6dead8fd@j19g2000yqc.googlegroups.com> <631f3859-8118-4f4c-a684-152ee5f589bf@o15g2000vbe.googlegroups.com> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="20445"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GI0GV0V6HwFMVipH6bfyIvDwWbO+zMds=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:tApWzuUic00yRzSB3g1eurOBSy0= sha1:AyMa3wNEVnC58YIOplf7WrDvGtg= Xref: news1.google.com comp.lang.ada:17983 Content-Type: text/plain; charset=us-ascii Date: 2011-09-15T22:50:18+01:00 List-Id: Simon Wright writes: > Write (Length / 256); > Write (Length and 255); > Write (Interfaces.Unsigned_8 (Interfaces.Shift_Right (V, 8))); > Write (Interfaces.Unsigned_8 (V and 16#FF#)); The C equivalent in rs232_tx() in rs232.c is /* stuff msg length, adding a byte for chksum */ msg[0] = (uint8_t)((buf_len+1) >> 8); msg[1] = (uint8_t)(buf_len+1); I must say that second line looks _very_ suspicious!