pdp-11 assembly standards
Paul Koning
paulkoning at comcast.net
Mon Jan 9 08:13:07 CST 2017
> On Jan 9, 2017, at 12:38 AM, Don North <north at alum.mit.edu> wrote:
>
> On 1/8/2017 9:10 PM, Brent Hilpert wrote:
>> OK, what was the standard (if there was one) number-base syntax for PDP-11 assembler?
>>
>> Despite all the PDP-11 assembly info on web sites, this seems to be a buried bit of info.
>> One assembler doc uses a prefix of "&o", another specifies octal as default and prefix of zero for decimal (opposite of the common C-derived standard . . great).
>>
>> Is this for example standard?:
>>
>> BIT #&o200, @#&o177564 ; test 2^7 bit at address octal 177564
>>
>> (I'm just trying to make some written commentary consistent with common policy.)
>>
>>
> MACRO11 Language Manual v5.5 section 6.4
>
> All numbers are octal radix, unless the default radix is changed via the .RADIX N directive (N can be 2, 8, 10, or 16). N blank resets the radix to octal.
>
> So 0100, 100 would be octal 100, decimal value 64.
>
> Any number followed by a period (decimal point) is forced to be base 10.
>
> So 100. would be decimal 100, octal 144.
>
> Prefix operators ^B (binary), ^O (octal), ^D (decimal), ^X (hexadecimal) force the following digits/characters to the designated radix.
>
> So ^B101000 == ^O50 == ^D40 == ^X28 all represent the same value (decimal 40.) irrespective of the current .RADIX N setting.
I don't remember ^X. Other ways to specify numeric values is with prefix ' (single quote) for a single byte value, i.e., 'x is the ASCII code for character x. Similarly, "xy is a 16 bit value for the two-character sequence xy (little endian). And ^Rxyz is the RAD50 coded value for the three characters xyz.
&o doesn't match anything I've ever seen, not even in the wildly different world of Unix.
paul
More information about the cctalk
mailing list