[Info-vax] VMS Software Q1 '23 Update
Arne Vajhøj
arne at vajhoej.dk
Sun Jan 29 10:41:46 EST 2023
On 1/29/2023 9:51 AM, Simon Clubley wrote:
> On 2023-01-29, Arne Vajhøj <arne at vajhoej.dk> wrote:
>> On 1/29/2023 1:21 AM, Dave Froble wrote:
>>> On 1/28/2023 10:44 PM, Arne Vajhøj wrote:
>>>> And one need an integer with enough bits ...
>>>>
>>>> Could PDP-11 do 32 bit integers?
>>>
>>> What part of "signed word integers" didn't you understand? As in 16
>>> bits. -32768 to 32767.
>>
>> I sort of had guessed that word was the same as on VAX,
>> but I don't understand how it can't have a 32 bit integer.
>>
>> How does one work with file sizes and file position
>> in bytes on PDP-11?
>
> The same way as it's done with a block-based filesystem (ODS-2) on VMS.
>
> In general, the 16-bit nature of the PDP-11 is reflected in the API.
>
> Ever worked with real-mode MS-DOS at assembly language level ?
>
> It's the same kind of thing.
Compilers on 16 bit MS-DOS did support 32 bit integers.
So a compiler on 16 bit PDP-11 some OS could potentially as well.
>> I know you don't do C, but I believe C was invented on
>> PDP-11.
>
> What makes you think that "int" in C is _always_ at least 32 bits ? :-)
I don't.
The point is that there are some C IO routines that operate on
byte offset. No integer type bigger than 16 bit seems like a huge
problem.
> There's a reason why both int and long int have always existed in C.
>
> And on architectures that do not support 32-bit ints, then long int is
> a library/RTL feature implemented by the language in the same way as
> 64-bit long long int is implemented by the language RTL on 32-bit
> architectures.
For add and sub it does not even need a RTL routine if it has
"with carry" instructions.
It is absolutely possible.
But per Dave at least Basic chose not to support it. And I wonder.
Arne
More information about the Info-vax
mailing list