TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: DENNIS LEE BIEBER
from: MARTIN GREGORIE
date: 2021-01-04 11:46:00
subject: Re: USB card adapters cra

On Sun, 03 Jan 2021 20:44:03 -0500, Dennis Lee Bieber wrote:

> On Sun, 3 Jan 2021 22:40:33 -0000 (UTC), Martin Gregorie
>  declaimed the following:
>
>>I know that all so-called BASICs differ, some radically from the
>>original Dartmouth BASIC. I thought that the context would make it plain
>>that I was talking about PICAXE BASIC, which differs enough from
>>traditional BASICs to be given another name (labels not numbers for
>>branch destinations and subroutines, long names for variables, named
>>constants, unsigned arithmetic and comparisons, conditional statement
>>inclusion).
>>
>>
>  PICAXE BASIC and BASIC-Stamp BASICs were optimized for
microcontrollers
> with GPIO. Unsigned arithmetic maps to an 8-bit GPIO control register
> quite well (especially for bit masking). The processor chips have most
> of their flash memory filled with a simplified BASIC byte-code
> interpreter -- one's application gets downloaded (as byte-code) to a
> small EEPROM (or worse -- a large RAM) and is treated as data by the
> interpreter.
>
>  A BS2 has only 32-bytes of RAM, and 6 of those are dedicated to
GPIO
> input, output, and direction control. That leaves just 13 16-bit
> variables or 26 8-bit variables. The BS2 does allow defining variables
> and bit, nybble, byte, or word -- and the compiler does its best to
> optimize the RAM allocation. The manual does imply that the BS2 supports
> signed 16-bit values -- but when outputting them (debug print) one needs
> to specify the SDEC formatter, otherwise one gets an unsigned
> representation.

Agreed - I've done rather more with BS2 STAMPS than I have with PICAXE -
even had a flight timer for an F1A glider running on a breadboard. This
read timer settings, which are all positive values, from a control box,
but didn't need to output them. The logic did use signed values, though,
to terminate count-down sequences.

However, I barely got past noddy experiments to get familiarised with
PICAXE BASIC before putting that project to one side, but its likely to
be woken up again quite soon.

So, I'm aware that the BS2 BASIC uses signed integer variables and
consequently was quite surprised that PICAXE BASIC doesn't.


--
--
Martin    | martin at
Gregorie  | gregorie dot org

--- 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™.