Joined: 06 Jun 2008 Posts: 8201 Location: East Dubuque, Illinois, USA
IBM uses 4, 8, 12,etc to designate specific levels of problem with their compilers and utilities. What IBM does, many people copy. Since a code can be anything from 0 to 4095, there is no requirement to use even numbers (much less numbers divisible by 4). However, since IBM tends to be standard, a lot of people picked up the habit of using 4, 8, 12, etc and continue it through today.
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
Some systems i've worked on have a standard that locally developed code must use condition codes of 1000 and greater so the only times a cc of 4, 8, etc will occur is from an IBM (or other vendor) utility.
There was no end to his toil,
yet his eyes were not content with his wealth.
"For whom am I toiling," he asked,
"and why am I depriving myself of enjoyment?"
This too is meaningless—
a miserable business!
Its so synonymous to what a Software professional is,
Maybe thats why IBM chose 4,8 & 12.
BTW, really nice observation to ask this question.
Joined: 01 Sep 2006 Posts: 2088 Location: Silicon Valley
I think this was decided a long time ago, before I started on z/OS.
But I have seen some colleagues coding some kind of branch table. That is, 4, 8, 12, 16, etc... fall on fullword boundaries and could be used to pick something out of a previously setup table; for example, the address of an appropriate message.
As I recall, reg 15 contained the RC and was used to increment a Branch instr to a branch table [B BRTBL(R15)] that, in turn, contained 4 byte branch instrs to processing routines, e.g. B RC00RTN, B RC04RTN, B RC08RTN, etc.
Don't recall the Assembler coding format at all anymore - it's been a while.