View previous topic :: View next topic
|
Author |
Message |
Vladimir Grigoriev
New User
Joined: 08 Jul 2005 Posts: 3
|
|
|
|
Hi.
I am newcomer and did not program IBM assembler since 1992.
I'd like to know, if Length attribute is present in H assembler. I look through some HLASM source code and see the following
...
WKODSN DS CL44
...
MVI WKODSN,X'40'
MVC WKODSN+1(43),WKODSN
...
and below
L R1,44
Why the IBM assembler programmer didn't use the length attribute or its equate that makes code more readable?
i.e.
MVI WKODSN,X'40'
MVC WKODSN+1(L'WKODSN-1),WKODSN
...
L R1,L'WKODSN
I program for Intel with TASM and I always give mnemonic names for number constants. But when I look through IBM assembler code I see numerous magic numbers! Why IBM assembler programmers uses mnemonics name of numbers so rarely? |
|
Back to top |
|
|
jayesh_g
New User
Joined: 03 Mar 2004 Posts: 23
|
|
|
|
Quote: |
I'd like to know, if Length attribute is present |
Yes
Quote: |
Why the IBM assembler programmer didn't use the length attribute or its equate that makes code more readable? |
That question would be best answered by the person who coded the program you are looking at
Quote: |
Why IBM assembler programmers uses mnemonics name of numbers so rarely? |
There is no rule which prevents the programmer from using mnemonics. Usage of mnemonics is recommended to make the code more readable. |
|
Back to top |
|
|
Vladimir Grigoriev
New User
Joined: 08 Jul 2005 Posts: 3
|
|
|
|
I am more interesting is H assembler supports L' modifier for defining data constant?
And second question why is HLASM is called "high level"? What extraodinary features has it that deserves such name? On my point of view it must be called "low level" assembler. For example where is not structure definition directive as in MASM or TASM for the PC.
For example lets look TASM code
IDEAL
STRUC MyStruc
Field1 dw ?
Field2 dw ?
ENDS MyStruc
And I can to have access to structure member as
StrucData MyStruc ?
...
mov [StrucData.Field1],100
And what about HLASM? |
|
Back to top |
|
|
jayesh_g
New User
Joined: 03 Mar 2004 Posts: 23
|
|
|
|
I didn't understand your first sentence.
I guess "High Level" would make more sense if you look at it from a historical perspective. There was Assembler F, Assembler G, Assembler H etc before HLASM made its appearance. http://www-306.ibm.com/software/awdtools/hlasm/more.html
Since I don't know TASM, whatever you have coded doesn't make any sense to me
We can always argue till kingdom comes as to which language is better. Each one has its own place in the big scheme of things. Learn to respect that and let us all co-exist peacefully |
|
Back to top |
|
|
Vladimir Grigoriev
New User
Joined: 08 Jul 2005 Posts: 3
|
|
|
|
Thank you for your answer.
I only would like to point out that when you has knowledge of more than one similary language you start to campare the two.
At present I read about HLASM and want to understand what important things (in syntax, new language constructions and so on) make it principally diffirent from its predessores.
My first question was about compatibility between HALSM and H-assembler namely about length modifier. Is length modifier is present in H assembler (assembler instructions DC and DS)? And where can I find a short reference about various differences of all IBM assemblers?
Thank you
Vladimir Grigoriev |
|
Back to top |
|
|
jayesh_g
New User
Joined: 03 Mar 2004 Posts: 23
|
|
|
|
I misunderstood your question earlier! I thought that you were asking about HLASM.
I don't know about Assembler H. "End of Service" was in 1995. Why are you still using it?
You can check out ASSEMBLER-LIST LISTSERV to get an answer to your questions.
-Jayesh. |
|
Back to top |
|
|
|