Path: news.cs.au.dk!Morten.Grouleff From: Morten Grouleff Newsgroups: comp.lang.beta Subject: Re: How to do low level stuff Date: 08 Jan 1999 13:04:47 +0100 Organization: Mjolner Informatics Lines: 32 Message-ID: References: <368B8A70.CF9934FF@thestar.ca> <36950D20.2FAD4D18@thestar.ca> NNTP-Posting-Host: fenris.mjolner.dk Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: xinwen.cs.au.dk 915797135 6382 255.255.255.255 (8 Jan 1999 12:05:35 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 8 Jan 1999 12:05:35 GMT X-Newsreader: Gnus v5.5/Emacs 19.34 Xref: news.cs.au.dk comp.lang.beta:11771 Karl Waclawek writes: [...] > I thought BETA did not make specific assumptions about the size and > the byte ordering of the basic types. From what your code shows, > however, it seems that one can assume that char is stored in one Byte > and that Integer is stored in 4 Bytes. Another comment on that one. It is not safe to make any assumptions on the byte ordering of the basic types in memory. But as that is not relevant for the CRC example, it works anyway. For the moments, an integer is 32 bits, but that may change, and when it does, the CRC example will not work unchanged. In the next release of the Mjolner System, some new basic types are introduced. These include signed and unsigned integers of sizes 8,16,32,64 bits. There will also be a 16 bit wchar which is intended to hold unicode chars. In the long run char may change from 8 bits to 16 bits, so starting with the next release, the 8-bit unsigned integer should be used rather than the char type to represent a Byte. So in the short term, use integers as 32 bit entities and and char for your 8 bit entities. Be prepared to change them into the specific types when the next release arrives. -- ** Morten Grouleff: ** ** Earthworm Jim PC: ** ** Mjølner Informatics: **