Hi Guys

Where can i find some documentation, tutorials, mnemonics lists etc, for assembly for mainframes ?

Someone ever worked on mainframes to show an example ?

Is it too different from assembly for x86 ?

Best Regards,

Posted on 2006-07-29 19:55:09 by Beyond2000!
You gotta be a bit more specific. There are hundreds of different os/hardware combos out there that could be referred as mainframes.
Posted on 2006-07-29 20:24:50 by arafel

its is for s390.

Is it too different from x86 ?
Posted on 2006-07-29 20:47:02 by Beyond2000!
Sorry. I personally don't know much about it..

However considering the fact that it`s processing unit is built on completely different architecture than x86 there will be a lot of difference in assembly programming.

Also, original documentation will be probably hard to get for free. However there is a number of linux distributions have been ported to variety of IBMs mainframes including S/390. So I suppose that at least some information might be available on the net.
Posted on 2006-07-29 21:13:11 by arafel

Where can i find some documentation, tutorials, mnemonics lists etc, for assembly for mainframes ?

    Follow this link to a thread that discusses a specific assembler for a specific mainframe.  Read the end of the thread.  http://www.masm32.com/board/index.php?topic=4665.0

Someone ever worked on mainframes to show an example ?

    You asked the right person.  I worked extensively with that assembler.  You can read the programmers reference manual of that mainframe processor to get a example.

Is it too different from assembly for x86 ?

    Sure was and is.  It precluded MS MASM by many years.  It was called UNISYS MASM, meaning meta-assembler.  That means it could be made to generate code for just about any word addressable computer.  It had a very rich set of directives that enabled a user to change the word size, and define instructions to assemble code for other computers.  I sure miss the features it had.  After coming down to MS MASM, I felt like I was programming with one hand tied behind my back.  Ratch

Posted on 2006-07-29 21:42:45 by Ratch
Check also this site: http://planetmvs.com/hlasm/
Posted on 2006-07-30 00:09:42 by arafel
I worked with the System 360, which was the precursor to the System 390 and other System 370 architectures. There are some similarities, and some differences.

Most notable is the success of the machine. Dating from the mid-1960s, it is far older than the Intel x86 line. If you're going to sound the death knell of the x86 architecture, you first need to consider when the 360/370 architecture will die. Like the x86, the 360/370 architecture is considered to be suboptimal by modern standards.

The IBM assemblers for the 360/370 machines had features that are still not included in microprocessor assemblers.

Similarities: the 360/370 machines are CISC and operands of the 32-bit instructions are reg-reg or reg-mem. No indirect addressing via memory. Memory addressing can use two registers. Floating point registers separate from "fullword" general purpose registers. Integer arithmetic is two's complement. Byte addressing of memory.

Differences: big-endian storage of 32-bit values. Floating-point predates IEEE standard, and is a downgrade from a previously popular 36-bit mainframe - the Series 700. No predefined stack structure, although it was easily implemented by designating one register as a stack pointer. No "port" I/O instructions - peripheral processors known as channels could be given the start of a "channel program", with channel DMA implemented through cycle-stealing rather than request-and-hold. Packed decimal (BCD) arithmetic that did not require you to code loops. Limited interrupt capabilities, as it was meant to be a data processor, not a controller.

Here is an example of an old 360 style assembler (never played with HLASM):

    L   3,OPERAND1   load register 3 with value from location OPERAND1
    L  5,INDEX  load register 5 with value from location INDEX
    SLL 5,2      multiply index by 4, using a shift instruction
    M  2,ARRAY(5)    multiply register 3 by ARRAY[5], put product in register 2:3
    AH  3,OPERAND3  add 16-bit sign-extended value from OPERAND3 to 32-bit register 3
    ST  3,RESULT    store register 3 at location RESULT
    LTR 3,3    copy register 3 to register 3 and set condition codes (LT = Load and Test)
    BZ  ISZERO    branch (jump) to ISZERO if register 3 was zero
Posted on 2006-08-01 03:04:03 by tenkey