Double word boundary?

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Post Reply
cobollearn
Registered Member
Posts: 25
Joined: Tue Jul 09, 2013 6:31 pm

Double word boundary?

Post by cobollearn »

Hi,

What is Double-word-boundary in COBOL? What does it signify? Are there other such "boundaries"?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1885
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Double word boundary?

Post by Robert Sample »

From the first days of the 360 machine, back in 1964, memory has been divided into 4-byte chunks called words. Bytes 0 to 3 represent the first word, bytes 4 through 7 represent the second word, and so forth. A double-word boundary is byte 0, 8, 16, .... and certain Assembler instructions need data aligned on double-word boundaries. There are now quad-word boundaries (0, 16, 32, ...) with the advent of 64-bit addressing, but they're not much used (yet).
cobollearn
Registered Member
Posts: 25
Joined: Tue Jul 09, 2013 6:31 pm

Re: Double word boundary?

Post by cobollearn »

Thanks Robert.

What does it mean that "data aligned on double-word boundaries"?
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Double word boundary?

Post by nicc »

It means that the data element starts on a double-word boundary which Robert has described above - basically an address that is evenly divisible by 8 or is 0 (hence the 0, 8, 16 etc in robert's post)
Regards
Nic
cobollearn
Registered Member
Posts: 25
Joined: Tue Jul 09, 2013 6:31 pm

Re: Double word boundary?

Post by cobollearn »

Ok. Thanks, hopefully I'll start understing these things more as I progress.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.”