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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,78b2880bc7e78e39 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-17 01:38:53 PST Path: nntp.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!join.news.pipex.net!pipex!news.kvaerner.com!news@kvaerner.com From: "Tarjei T. Jensen" Newsgroups: comp.lang.ada Subject: Re: RISC Date: Thu, 15 Mar 2001 14:03:09 +0100 Organization: Kvaerner Group IT Message-ID: <98qeie$3ud1@news.kvaerner.com> References: NNTP-Posting-Host: 155.209.159.241 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft Outlook Express 4.72.2120.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 Xref: nntp.stanford.edu comp.lang.ada:91482 Date: 2001-03-15T14:03:09+01:00 List-Id: chris.danx wrote in message ... >I'm curious about 'mod' types. If i define a type 'byte' like so > >* type byte is mod 256; > >will it occupy one byte of memory. > > >similarly if i define > >* type word is mod 65536 > >will it occupy two bytes. You need to add for byte'size use 8; for word'size use 16; if you use arrays or records it can be a good idea to use pragma(pack); >As i was writing i suddenly realised i got a problem with little/big >endian-ness. I'm writing files on an Athlon(so it's x86) which is little(i >think). If i port to a M68000 say, which is big endian (again i'm unsure), >what should i do to convert the 'bytecode' file. I dunno what to do with >this. I do plan to port to other platforms in the future so this is >important. Is it true that all networks use big endian? Anyway this is for >the future, just thought i'd ask in case i need to plan ahead for this. The IP protocol tends to be big endian. However don't let that keep you from creating a little endian risc machine. You can probably select endianness with the bit_order attribute. You can choose between 'bit_order=low_order_first or high_order_first. Or you can read and write the program one byte at a time. Greetings,