Avijit –
I am going to be somewhat contrary here. Yes, the Ehrman book is absolutely the BEST book on Z assembler. Yes, of course the IBM doc is relevant.
That said, I think assembler is so different, and I think a Z-specific tutorial may not exist – so I am going to suggest you look around for a real tutorial, a real "course," in programming for some platform where tutorials exist and that would be easier to play around on: maybe a Raspberry Pi?
Assembler is real tricky. Let me give you an example. Consider
A = B + C
in some programming language – pretty much any common programming language. It could be Rexx; add a semicolon and it could be C or PL/I; add COMPUTE and a period and it could be COBOL. Now here on the other hand is the same logic in Z assembler:
L R2,C
A R2,B
ST R2,A
Completely different, right? And what's more, the C, PL/I or COBOL is valid whether A, B and C are 16, 32 or 64-bit binary fields, or decimal fields. In assembler, on the other hand, my example is only good for 32-bit A, B and C. If they are 16 bits, then the assembler must instead be
LH R2,C
AH R2,B
STH R2,A
(And if A,B and C are decimal it is COMPLETELY different!)
What's worse, HLASM will not correct you if you get it wrong. If you code L, A and ST when the fields are actually 16 bits, your code will assemble and run without obvious error – but your results will be way, way off.
So I think you need a real tutorial, or someone to sit beside you and help you get over the initial learning curve. I doubt that many of us here learned Z or 360/370/390 assembler utterly on our own out of only a reference book.
Not trying to discourage you. We need more assembler programmers. Good luck!
Charles
Sent from Mail for Windows