Origin of Cardinal=Dword?

Let's talk about anything related to the 6502 microprocessor.
Post Reply
beethead
Posts: 9
Joined: 03 Dec 2019

Origin of Cardinal=Dword?

Post by beethead »

I was trying to find an alias for "dword" and from my Pascal experience the word "cardinal" comes to mind. The meaning of "dword" is very straight forward, double word or 4-bytes. Cardinal is a mathematical term but why was it chosen to represent a dword or 32-bit number?
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Re: Origin of Cardinal=Dword?

Post by BitWise »

Cardinals in Pascal are unsigned.
In the C world 'long' is at least 32-bits.
Last edited by BitWise on Thu May 28, 2020 7:20 pm, edited 1 time in total.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Origin of Cardinal=Dword?

Post by BigEd »

Indeed, cardinals are for counting, mathematically speaking, and unsigned numbers are also good for counting.
Post Reply