Rip music from a CD/Tape and write your music to a CD

Welcome to Shankar's PC Pages         


As I am starting this site newly, first I am introducing with a simple MVS Assembler tutorial for the beginers.
Here is a simple Hello World assembler program which you can try to start with:

First create a PDS (partitioned dataset)  say  TRNG.WORK.ASM  with LRECL=80, RECFM=FB and directory blocks 25.  Save the following code as a member called HELLO in the PDS. Remember to keep the third qualifier of the PDS as ASM. Start coding from first column.

HELLO            CSECT
                        SAVE        (14,12)                                                                      Assembler program in ISPF Edit session
                        BALR        12,0
                        USING      *,12
                        ST             13,SAVEAREA+4
                        LA             13,SAVEAREA

                        TPUT         'Hello World',11

                        L                13,SAVEAREA+4
                        RETURN    (14,12),RC=0

SAVEAREA    DS             18F
                        END           HELLO
 

Compile and linkedit the member HELLO. Save the load module in say TRNG.WORK.LOAD.
Run the load module from TSO prompt as

Command ==> TSO  EX   ' TRNG.WORK.LOAD(HELLO) '      or as
Command ==> TSO EX   WORK(HELLO)

This will  display Hello World in your screen. If you run this program in batch (background) you don't get any output. This is a very simple program to start with.

Here the TPUT (terminal put) is a assembler macro which writes to the terminal. You have to supply TPUT with the string and the length of the string.

Remaining code will be present in any assembler program. Don't worry about them now.

The statements before TPUT statement, save the registers (GPR - general purpose registers) and  set the starting point of execution of the program.

Statements after the TPUT stmt restore the registers and return the control to the system.
There is only one variable SAVEAREA has been declared here using DS (define storage) stmt of size 18F (18 Full Words).

Click here for A more readable version of Hello World.
 
 

If you have any suggestions
Mail me at shankarchatterjee@hotmail.com




Sponsored LinksYour Ad Here