pdp-11 assembly standards

Pete Turnbull pete at dunnington.plus.com
Wed Jan 11 09:01:59 CST 2017

On 11/01/2017 14:07, Noel Chiappa wrote:

> Although I note the documentation says "any valid value recognised by BBC
> BASIC" - does BBC basic use the leading '%' notation for constants?

Sort of.  BBC BASIC uses the prefix '&' to specify hexadecimal numbers, 
so &FFFE is the exact equivalent of 0xFFFE in C.  Similarly, BASIC IV 
and later (IIRC) use '%' to represent binary, thus %11111110 is the 
exact equivalent of 0xFE in C.  Anything without a prefix is decimal. 
The use of "%o" for an octal constant is specific to Jonathan's PDP-11 
cross-assembler, though, and isn't part of BBC BASIC.

There are additional prefixes in BBC BASIC, but used for indirection 
rather than base notations.  There are also other uses for '%' as a 
suffix, to denote special integer variables with single-character names 
which have fixed size and location (eg A%, B%, and @% which is used for 
print formatting).

Pete Turnbull

More information about the cctalk mailing list