Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #1879 > unrolled thread
| Started by | Jim Lesurf <jcgl@audiomisc.co.uk> |
|---|---|
| First post | 2012-07-05 13:51 +0100 |
| Last post | 2012-07-06 16:49 +0100 |
| Articles | 19 — 6 participants |
Back to article view | Back to comp.sys.acorn.programmer
64 bit unsigned ints for 'Acorn' compiler? Jim Lesurf <jcgl@audiomisc.co.uk> - 2012-07-05 13:51 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? John Tytgat <this@is.invalid> - 2012-07-05 15:06 +0200
Re: 64 bit unsigned ints for 'Acorn' compiler? Jim Lesurf <jcgl@audiomisc.co.uk> - 2012-07-05 16:11 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? Chris Johnson <chrisjohnson+news@spamcop.net> - 2012-07-05 18:31 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? Jim Lesurf <jcgl@audiomisc.co.uk> - 2012-07-06 09:36 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? Chris Johnson <chrisjohnson+news@spamcop.net> - 2012-07-06 11:26 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? druck <news@druck.org.uk> - 2012-07-07 23:44 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? Jim Lesurf <jcgl@audiomisc.co.uk> - 2012-07-08 09:30 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? "Ste (news)" <steve@revi11.plus.com> - 2012-07-09 23:53 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? Jim Lesurf <jcgl@audiomisc.co.uk> - 2012-07-10 09:32 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? Chris Johnson <chrisjohnson+news@spamcop.net> - 2012-07-10 12:37 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? Jim Lesurf <jcgl@audiomisc.co.uk> - 2012-07-10 14:10 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? Chris Johnson <chrisjohnson+news@spamcop.net> - 2012-07-10 16:58 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? Frank de Bruijn <zuiderduin@hotmail.com> - 2012-07-11 08:26 +0200
Re: 64 bit unsigned ints for 'Acorn' compiler? Chris Johnson <chrisjohnson+news@spamcop.net> - 2012-07-11 09:48 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? "Ste (news)" <steve@revi11.plus.com> - 2012-07-12 23:15 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? Jim Lesurf <jcgl@audiomisc.co.uk> - 2012-07-19 12:35 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? Chris Johnson <chrisjohnson+news@spamcop.net> - 2012-07-05 15:15 +0100
Re: 64 bit unsigned ints for 'Acorn' compiler? Jim Lesurf <jcgl@audiomisc.co.uk> - 2012-07-06 16:49 +0100
| From | Jim Lesurf <jcgl@audiomisc.co.uk> |
|---|---|
| Date | 2012-07-05 13:51 +0100 |
| Subject | 64 bit unsigned ints for 'Acorn' compiler? |
| Message-ID | <52aa84d885jcgl@audiomisc.co.uk> |
Hi, I'm currently trying to write a 'decoder' for HDCD. As usual for me, I've been doing this first using the 'Norcroft'/Acorn 'C' compiler. The idea being that once I'd got that running I'd do another version with gcc for Linux. Normally, this works fine, but I've run into a snag... Part of the bit-bashing requires some bit patterns to be compared against a 'window' that is 64 bits long and the results brought together. In the example I've seen for MS this uses a uint64_t which I assume is an unsigned int 64 bits long. The snag is that - so far as I know - the 'Acorn' compiler doesn't include 64bit long ints. (Or am I wrong?) Is there an easy fix for this? if not I'll give up and switch to gcc for Linux, then maybe learn to use gcc instead on RO for this project. But if possible I'd prefer a fix that lets me define and use 64 bit unsigned ints with the 'Acorn' compiler. I can give more details of the specific task if people wish. Slainte, Jim -- Electronics http://www.st-and.ac.uk/~www_pa/Scots_Guide/intro/electron.htm Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html Audio Misc http://www.audiomisc.co.uk/index.html
[toc] | [next] | [standalone]
| From | John Tytgat <this@is.invalid> |
|---|---|
| Date | 2012-07-05 15:06 +0200 |
| Message-ID | <jt43gf$ni2$1@dont-email.me> |
| In reply to | #1879 |
On 7/5/2012 2:51 PM, Jim Lesurf wrote: > Hi, > > I'm currently trying to write a 'decoder' for HDCD. As usual for me, I've > been doing this first using the 'Norcroft'/Acorn 'C' compiler. The idea > being that once I'd got that running I'd do another version with gcc for > Linux. Normally, this works fine, but I've run into a snag... > > Part of the bit-bashing requires some bit patterns to be compared against a > 'window' that is 64 bits long and the results brought together. In the > example I've seen for MS this uses a uint64_t which I assume is an unsigned > int 64 bits long. The snag is that - so far as I know - the 'Acorn' > compiler doesn't include 64bit long ints. (Or am I wrong?) uint64_t is standard in C99 (stdint.h). As far as I'm away it is both supported by Acorn Norcroft compiler and RISC OS gcc port. It's a bit funny you mention MS here because they don't want to invest in C enhancements but only do them when those get adopted by C++ standards (sometimes with subtle differences). Only from VS2010 onwards you can use uint64_t & friends using VS. For gcc, use --std=c99 and if you're doing 32x32->64 int multiplies, don't forget to specify --march=armv3m (or better) if you want to use the native 32x32->64 ARM multiply instructions. John.
[toc] | [prev] | [next] | [standalone]
| From | Jim Lesurf <jcgl@audiomisc.co.uk> |
|---|---|
| Date | 2012-07-05 16:11 +0100 |
| Message-ID | <52aa919f20jcgl@audiomisc.co.uk> |
| In reply to | #1880 |
In article <jt43gf$ni2$1@dont-email.me>, John Tytgat <this@is.invalid> wrote: > uint64_t is standard in C99 (stdint.h). As far as I'm away it is both > supported by Acorn Norcroft compiler and RISC OS gcc port. On 05 Jul in comp.sys.acorn.programmer, Chris Johnson <chrisjohnson+news@spamcop.net> wrote: > In article <52aa84d885jcgl@audiomisc.co.uk>, > Jim Lesurf <jcgl@audiomisc.co.uk> wrote: > > Is there an easy fix for this? > From Norcroft h.stdint > #ifdef __stdint_ll > typedef signed long long int64_t; > typedef unsigned long long uint64_t; > typedef signed long long int_least64_t; > typedef unsigned long long uint_least64_t; > typedef signed long long int_fast64_t; > typedef unsigned long long uint_fast64_t; Thanks John/Chris, That is good news. :-) I'd assumed that no 64 bit ints were available as I'd looked this up in my old copy of 'Acorn C/C++' that came when I bought the compiler mumble years ago! Page 70 lists types - char, short, int, etc, etc. I lists doubles as having 64 bits, but none of the integert types have more than 32 bits. Has this changed since the book, or have I simply not looked in the right place in it? The book is 'issue 1' dated 1994... Yikes, doesn't time fly when you are making your forehead bleed trying to work out how to make sense of a program! 8-] Thanks again, Jim -- Electronics http://www.st-and.ac.uk/~www_pa/Scots_Guide/intro/electron.htm Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html Audio Misc http://www.audiomisc.co.uk/index.html
[toc] | [prev] | [next] | [standalone]
| From | Chris Johnson <chrisjohnson+news@spamcop.net> |
|---|---|
| Date | 2012-07-05 18:31 +0100 |
| Message-ID | <52aa9e6804chrisjohnson+news@spamcop.net> |
| In reply to | #1882 |
In article <52aa919f20jcgl@audiomisc.co.uk>,
Jim Lesurf <jcgl@audiomisc.co.uk> wrote:
> Has this changed since the book, or have I simply not looked in the
> right place in it? The book is 'issue 1' dated 1994... Yikes,
> doesn't time fly when you are making your forehead bleed trying to
> work out how to make sense of a program! 8-]
I guess the original printed manual predates the addition of C99
features to the compiler. The current version has a text file in the
AcornC/C++.Docs folder called C99. A very brief extract is:
Summary of C99 features in the C compiler
=========================================
The current compiler supports a significant subset of features from
the new ISO C standard (ISO/IEC 9899:1999). This document summarises
available facilities.
C99 features and examples
-------------------------
long long
64 bit integers
--
Chris Johnson
[toc] | [prev] | [next] | [standalone]
| From | Jim Lesurf <jcgl@audiomisc.co.uk> |
|---|---|
| Date | 2012-07-06 09:36 +0100 |
| Message-ID | <52aaf154a1jcgl@audiomisc.co.uk> |
| In reply to | #1885 |
In article <52aa9e6804chrisjohnson+news@spamcop.net>, Chris Johnson <chrisjohnson+news@spamcop.net> wrote: > In article <52aa919f20jcgl@audiomisc.co.uk>, Jim Lesurf > <jcgl@audiomisc.co.uk> wrote: > > Has this changed since the book, or have I simply not looked in the > > right place in it? The book is 'issue 1' dated 1994... Yikes, doesn't > > time fly when you are making your forehead bleed trying to work out > > how to make sense of a program! 8-] > I guess the original printed manual predates the addition of C99 > features to the compiler. The current version has a text file in the > AcornC/C++.Docs folder called C99. A very brief extract is: > Summary of C99 features in the C compiler > ========================================= > The current compiler supports a significant subset of features from the > new ISO C standard (ISO/IEC 9899:1999). This document summarises > available facilities. > C99 features and examples ------------------------- > long long > 64 bit integers Interesting... I can find a Docs.ChangesLog.CC that mentions that C99 features have been implimented. But I don't find a C99 file in Docs. Maybe I've moved things around so it is somewhere else. My 'Docs' are in a directory 'Manual'. Slainte, Jim -- Electronics http://www.st-and.ac.uk/~www_pa/Scots_Guide/intro/electron.htm Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html Audio Misc http://www.audiomisc.co.uk/index.html
[toc] | [prev] | [next] | [standalone]
| From | Chris Johnson <chrisjohnson+news@spamcop.net> |
|---|---|
| Date | 2012-07-06 11:26 +0100 |
| Message-ID | <52aafb596dchrisjohnson+news@spamcop.net> |
| In reply to | #1886 |
In article <52aaf154a1jcgl@audiomisc.co.uk>, Jim Lesurf <jcgl@audiomisc.co.uk> wrote: > Interesting... I can find a Docs.ChangesLog.CC that mentions that > C99 features have been implimented. But I don't find a C99 file in > Docs. Maybe I've moved things around so it is somewhere else. My > 'Docs' are in a directory 'Manual'. I have just checked the CD I made from the ISO image I was sent by ROOL at the end of last year when I upgraded. The file I was referring to is CDFS::ROOL_DDE_22.$.!INSTAL_CC.FILES.TOOLS.Docs.C99 The same file is also CDFS::ROOL_DDE_22.$.!INSTAL_CC.FILES.TOOLS.Docs.CC.C99 After installation, the Tools dir above becomes the main AcornC/C++ directory. -- Chris Johnson
[toc] | [prev] | [next] | [standalone]
| From | druck <news@druck.org.uk> |
|---|---|
| Date | 2012-07-07 23:44 +0100 |
| Message-ID | <jtae3s$ups$2@dont-email.me> |
| In reply to | #1886 |
On 06/07/2012 09:36, Jim Lesurf wrote: > Interesting... I can find a Docs.ChangesLog.CC that mentions that C99 > features have been implimented. But I don't find a C99 file in Docs. Maybe > I've moved things around so it is somewhere else. My 'Docs' are in a > directory 'Manual'. How old is your copy of C/C++ ?# ---druck
[toc] | [prev] | [next] | [standalone]
| From | Jim Lesurf <jcgl@audiomisc.co.uk> |
|---|---|
| Date | 2012-07-08 09:30 +0100 |
| Message-ID | <52abf86b3djcgl@audiomisc.co.uk> |
| In reply to | #1895 |
In article <jtae3s$ups$2@dont-email.me>, druck <news@druck.org.uk> wrote: > On 06/07/2012 09:36, Jim Lesurf wrote: > > Interesting... I can find a Docs.ChangesLog.CC that mentions that C99 > > features have been implimented. But I don't find a C99 file in Docs. > > Maybe I've moved things around so it is somewhere else. My 'Docs' are > > in a directory 'Manual'. > How old is your copy of C/C++ ?# The frontend icon says Version 5.52 and gives the copyright to Acorn 1994 The copies of ChangesLog.CC and the cc in my Library directory are dated 14 Jan 2003. I don't know the real age, but pretty old, I'd say! Slainte, Jim -- Electronics http://www.st-and.ac.uk/~www_pa/Scots_Guide/intro/electron.htm Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html Audio Misc http://www.audiomisc.co.uk/index.html
[toc] | [prev] | [next] | [standalone]
| From | "Ste (news)" <steve@revi11.plus.com> |
|---|---|
| Date | 2012-07-09 23:53 +0100 |
| Message-ID | <52accb451dsteve@revi11.plus.com> |
| In reply to | #1896 |
In article <52abf86b3djcgl@audiomisc.co.uk>, Jim Lesurf <jcgl@audiomisc.co.uk> wrote: > In article <jtae3s$ups$2@dont-email.me>, druck <news@druck.org.uk> wrote: > > How old is your copy of C/C++ ? > > The frontend icon says Version 5.52 and gives the copyright to Acorn 1994 > > The copies of ChangesLog.CC and the cc in my Library directory are dated 14 > Jan 2003. > > I don't know the real age, but pretty old, I'd say! Try: cc --version on the command line... Ta, Steve -- Steve Revill @ Home Note: All opinions expressed herein are my own.
[toc] | [prev] | [next] | [standalone]
| From | Jim Lesurf <jcgl@audiomisc.co.uk> |
|---|---|
| Date | 2012-07-10 09:32 +0100 |
| Message-ID | <52ad0043a8jcgl@audiomisc.co.uk> |
| In reply to | #1899 |
In article <52accb451dsteve@revi11.plus.com>, Ste (news) <steve@revi11.plus.com> wrote: > In article <52abf86b3djcgl@audiomisc.co.uk>, > Jim Lesurf <jcgl@audiomisc.co.uk> wrote: > > In article <jtae3s$ups$2@dont-email.me>, druck <news@druck.org.uk> wrote: > > > How old is your copy of C/C++ ? > > > > The frontend icon says Version 5.52 and gives the copyright to Acorn 1994 > > > > The copies of ChangesLog.CC and the cc in my Library directory are dated 14 > > Jan 2003. > > > > I don't know the real age, but pretty old, I'd say! > Try: > cc --version > on the command line... Norcroft RISC OS ARM C vsn 5.53 [14 Jan 2003] So about 0.01 beyond what the icon bar icon showed! :-) I don't know if ROOL or someone else has upgrades available, but I presume they do. So I'll have a look. Slainte, Jim -- Electronics http://www.st-and.ac.uk/~www_pa/Scots_Guide/intro/electron.htm Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html Audio Misc http://www.audiomisc.co.uk/index.html
[toc] | [prev] | [next] | [standalone]
| From | Chris Johnson <chrisjohnson+news@spamcop.net> |
|---|---|
| Date | 2012-07-10 12:37 +0100 |
| Message-ID | <52ad113e19chrisjohnson+news@spamcop.net> |
| In reply to | #1902 |
In article <52ad0043a8jcgl@audiomisc.co.uk>, Jim Lesurf <jcgl@audiomisc.co.uk> wrote: > I don't know if ROOL or someone else has upgrades available, but I presume > they do. So I'll have a look. Mine is at 5.69, not sure if that is the latest. ROOL sell upgrades as a downloadable ISOImage, I think you have to send your current version of cc (via email) to obtain the upgrade price. -- Chris Johnson
[toc] | [prev] | [next] | [standalone]
| From | Jim Lesurf <jcgl@audiomisc.co.uk> |
|---|---|
| Date | 2012-07-10 14:10 +0100 |
| Message-ID | <52ad19afd8jcgl@audiomisc.co.uk> |
| In reply to | #1903 |
In article <52ad113e19chrisjohnson+news@spamcop.net>, Chris Johnson <chrisjohnson+news@spamcop.net> wrote: > In article <52ad0043a8jcgl@audiomisc.co.uk>, Jim Lesurf > <jcgl@audiomisc.co.uk> wrote: > > I don't know if ROOL or someone else has upgrades available, but I > > presume they do. So I'll have a look. > Mine is at 5.69, not sure if that is the latest. > ROOL sell upgrades as a downloadable ISOImage, I think you have to send > your current version of cc (via email) to obtain the upgrade price. Thanks, I'll contact them. Me being old fashioned, it seems a bit odd to have to email the entire 257k of the cc absolute. Maybe they settle for the first X k. :-) Jim -- Electronics http://www.st-and.ac.uk/~www_pa/Scots_Guide/intro/electron.htm Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html Audio Misc http://www.audiomisc.co.uk/index.html
[toc] | [prev] | [next] | [standalone]
| From | Chris Johnson <chrisjohnson+news@spamcop.net> |
|---|---|
| Date | 2012-07-10 16:58 +0100 |
| Message-ID | <52ad29255dchrisjohnson+news@spamcop.net> |
| In reply to | #1904 |
In article <52ad19afd8jcgl@audiomisc.co.uk>, Jim Lesurf <jcgl@audiomisc.co.uk> wrote: > Thanks, I'll contact them. Me being old fashioned, it seems a bit > odd to have to email the entire 257k of the cc absolute. Maybe they > settle for the first X k. :-) I think its to confirm your original registration details that are encoded in the file. -- Chris Johnson
[toc] | [prev] | [next] | [standalone]
| From | Frank de Bruijn <zuiderduin@hotmail.com> |
|---|---|
| Date | 2012-07-11 08:26 +0200 |
| Message-ID | <52ad789a06zuiderduin@hotmail.com> |
| In reply to | #1904 |
In article <52ad19afd8jcgl@audiomisc.co.uk>, Jim Lesurf <jcgl@audiomisc.co.uk> wrote: > In article <52ad113e19chrisjohnson+news@spamcop.net>, Chris Johnson > <chrisjohnson+news@spamcop.net> wrote: > > In article <52ad0043a8jcgl@audiomisc.co.uk>, Jim Lesurf > > <jcgl@audiomisc.co.uk> wrote: > > > I don't know if ROOL or someone else has upgrades available, but I > > > presume they do. So I'll have a look. > > Mine is at 5.69, not sure if that is the latest. > > ROOL sell upgrades as a downloadable ISOImage, I think you have to > > send your current version of cc (via email) to obtain the upgrade > > price. That and tell them the serial number. > Thanks, I'll contact them. Me being old fashioned, it seems a bit odd > to have to email the entire 257k of the cc absolute. Maybe they settle > for the first X k. :-) What's 257k these days? :-) However, I was lead to believe the upgrade price was only valid for versions of the compiler which were issued by ROOL, not by Castle. I have 5.54 and the serial number indicates it's from Castle, so I assume 5.53 will be from Castle as well. It would be interesting to hear whether you can upgrade for the reduced price after all. Regards, Frank
[toc] | [prev] | [next] | [standalone]
| From | Chris Johnson <chrisjohnson+news@spamcop.net> |
|---|---|
| Date | 2012-07-11 09:48 +0100 |
| Message-ID | <52ad859664chrisjohnson+news@spamcop.net> |
| In reply to | #1909 |
In article <52ad789a06zuiderduin@hotmail.com>, Frank de Bruijn <zuiderduin@hotmail.com> wrote: > It would be interesting to hear whether you can upgrade for the > reduced price after all. I guess Steve can supply the definitive answer. However, I am pretty sure I have only ever gone through the regular upgrade route, starting with the Castle supplied version. Maybe the conditions are different now to when ROOL first took over the supply of Norcroft C. -- Chris Johnson
[toc] | [prev] | [next] | [standalone]
| From | "Ste (news)" <steve@revi11.plus.com> |
|---|---|
| Date | 2012-07-12 23:15 +0100 |
| Message-ID | <52ae53558csteve@revi11.plus.com> |
| In reply to | #1912 |
In article <52ad859664chrisjohnson+news@spamcop.net>, Chris Johnson <chrisjohnson+news@spamcop.net> wrote: > I guess Steve can supply the definitive answer. However, I am pretty > sure I have only ever gone through the regular upgrade route, > starting with the Castle supplied version. Maybe the conditions are > different now to when ROOL first took over the supply of Norcroft C. We only offer the discount to users who have purchased the DDE from ROOL already. If you bought it from Castle, that's got nothing to do with us (we never got any cut ;) so the offer doesn't extend to copies that old. Thanks, Steve -- Steve Revill @ Home Note: All opinions expressed herein are my own.
[toc] | [prev] | [next] | [standalone]
| From | Jim Lesurf <jcgl@audiomisc.co.uk> |
|---|---|
| Date | 2012-07-19 12:35 +0100 |
| Message-ID | <52b1b393a1jcgl@audiomisc.co.uk> |
| In reply to | #1904 |
Just in case anyone is interested... I've now put up RO and Linux versions of the programs that prompted me to ask about this at http://www.audiomisc.co.uk/software/index.html As yet the RO program doesn't work in the same way as the Linux one. But I may revisit than once I get the current version of the compiler from ROOL. Slainte, Jim -- Electronics http://www.st-and.ac.uk/~www_pa/Scots_Guide/intro/electron.htm Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html Audio Misc http://www.audiomisc.co.uk/index.html
[toc] | [prev] | [next] | [standalone]
| From | Chris Johnson <chrisjohnson+news@spamcop.net> |
|---|---|
| Date | 2012-07-05 15:15 +0100 |
| Message-ID | <52aa8c7c8dchrisjohnson+news@spamcop.net> |
| In reply to | #1879 |
In article <52aa84d885jcgl@audiomisc.co.uk>, Jim Lesurf <jcgl@audiomisc.co.uk> wrote: > Is there an easy fix for this? From Norcroft h.stdint #ifdef __stdint_ll typedef signed long long int64_t; typedef unsigned long long uint64_t; typedef signed long long int_least64_t; typedef unsigned long long uint_least64_t; typedef signed long long int_fast64_t; typedef unsigned long long uint_fast64_t; -- Chris Johnson
[toc] | [prev] | [next] | [standalone]
| From | Jim Lesurf <jcgl@audiomisc.co.uk> |
|---|---|
| Date | 2012-07-06 16:49 +0100 |
| Message-ID | <52ab18f7f4jcgl@audiomisc.co.uk> |
| In reply to | #1879 |
For anyone interested... The reasons I was asking about the 64 bit ints was to help develop an HDCD 'decoder'. Pleased to report that I now seem to have a version that works for Linux. (With a lot of help from someone else who is a far better programmer than myself!) Currently testing it to evaluate. All being well I will reverse my original plan and try and get a RO version based on the code at some point. Slainte, Jim -- Electronics http://www.st-and.ac.uk/~www_pa/Scots_Guide/intro/electron.htm Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html Audio Misc http://www.audiomisc.co.uk/index.html
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.acorn.programmer
csiph-web