TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: MARTIN GREGORIE
from: JOE
date: 2021-01-03 21:16:00
subject: Re: USB card adapters cra

On Sun, 3 Jan 2021 19:36:54 -0000 (UTC)
Martin Gregorie  wrote:

> On Sun, 03 Jan 2021 18:38:44 +0000, Joe wrote:
>
> >
> >  "If you need to use floating-point arithmetic in FORTH, you do not
> >  fully understand your application"
> >
> > Not sure if it was Charles Moore or Leo Brodie who said that.
>
> PICAXE BASIC is a little more limited than that: variables may be 8
> or 16 bit and they are all UNSIGNED, which, I would suggest is a bit
> more limiting than doing without floating point. This is the only
> computer language I've used that doesn't support signed integer
> values.
>
> A fairly rapid web search failed to discover whether unsigned
> arithmetic is a feature of the BASIC

There is no feature list of BASIC. There are standard BASICs from
Dartmouth, there was Applesoft on the Apple II (integer only), and most
BBC BASICs were only distinguishable from PASCAL by having built-in
assemblers (yes, including BBC BASIC V on the ARM-based Archimedes).
Quite a variation. I hated the old line number thing.

> or if the PIC micro-controller
> only works with unsigned values. I found several low level
> architecture descriptions, which all mention stuff like data storage
> and register lengths, but since none of them mentioned signed
> arithmetic, it seems that it isn't supported.
>

No. All the arithmetic operators are signed, at least in the less
primitive PICs. They only work with the PIC data word length, but can be
easily cascaded for more bits using the accumulator status bits. Look at
the instruction set in any PIC datasheet.

I've only ever used assembler, as I've wanted complete control over
timings, and I don't think I've ever needed more than 16 bits. I've
done mostly TV camera remote control software and a Canon lens
controller. There are C compilers for the PICs, but I wanted to write
my own interrupt routines, as the SPI used on the Canon AF can be
pretty fast, and the Canon SPI variation meant some real-time bit
banging was required.

--
Joe

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.