cis 020 assembly programming chapter 04 - z 390 portable mainframe assembler and emulator © john...

22
CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved. 5/27/2012 1

Upload: chad-foster

Post on 27-Dec-2015

228 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 1

CIS 020 Assembly Programming

Chapter 04 -

z390 Portable Mainframe Assembler and Emulator

5/27/2012

Page 2: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 2

Development EnvironmentWe will be using the z390 assembler and

emulatorz390 is distributed under GNU open source

license. Downloads are available at the z390 website

www.z390.orgI strongly urge you to download and install this

on your personal or home computer to make it easier to work on your assignments.

5/27/2012

Page 3: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 3

Development EnvironmentThe program development process

You will receive a problem statement from your business analyst describing what is needed. This may be a new program or a modification to an existing program.

Your first task will be to develop the program specification document.

Next code your program or program changes.Test your program or program changes.Last Step – submit your work to the production

environment.5/27/2012

Page 4: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 4

Program Specification Document

5 Step processStep 1 – Develop the Output for the program:

Diagram/mockup of a report Screenshot of expected results Sample output file with file layout

Step 2 – Identify the Input(s) to the program: Diagram/mockup of input form Screenshot of standard user input Sample input file with file layout

5/27/2012

Page 5: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 5

Program Specification Document

5 Step processStep 3 – Determine the processes/algorithms

needed to translate the Input into the Output for the program: Use Pseudocode or Structured English:

Provide step by step instructions for algorithms used by your program.

Develop Flowcharts:Show the overall process flow of your program.

5/27/2012

Page 6: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 6

Program Specification Document

5 Step processStep 4 – Develop a set of test data for your

program to run. Identify expected data domain and delineate

expected results; intra-boundary, extra-boundary, on-boundary

Identify unexpected data and delineate expected results;null data, invalid data

5/27/2012

Page 7: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 7

Program Specification Document

5 Step processStep 5 – Specification Walkthrough

Select team members to critically review your document and support or modify it.

5/27/2012

Page 8: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 8

Program ConstructionUsing the Program Specification Document

Translate the Pseudocode and Flowchart into the specific statements needed to complete the task. Imbed program documentation to clarify what is being done by the instructions.

Use the “Flowerbox” at the top to provide an overview at the program level.

5/27/2012

Page 9: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 9

Program ConstructionYour first assembler Program – a Walkthrough

Problem Statement “Because of added security requirements management has locked the door to our computer room so access is limited. We want to provide the same service to our staff as we always have but we need a way to identify when someone is at the door. Management want you to write a program that will tell the operator when someone is waiting at the door. A computer terminal is now installed at the door and staff have been instructed to execute the “HELLO” program to gain access.”

5/27/2012

Page 10: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 10

Program ConstructionProgram Specification Document

5/27/2012

Page 11: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 11

Program Construction

5/27/2012

Page 12: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 12

Program Construction

5/27/2012

Page 13: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 13

Program Construction

5/27/2012

Page 14: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 14

Program ConstructionSource Code – The Flowerbox

5/27/2012

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00010000* Program name : HELLO * 00020000* * 00030000* Written by : John Urrutia * 00040000* * 00210000* Purpose : To cause a message to display on the system * 00040000* console. This program will be executed from the * 00050000* terminal at the computer room door by personnel * 00060000* needing service. * 00070000* * 00100000* Inputs : User enters HELLO on the terminal command line * 00110000* * 00120000* Outputs : Display of entery request on the system terminal * 00130000* * 00140000* Calls : No internal or external calls * 00150000* * 00160000* Structure : BEGIN * 00170000* Straight line code no sub-processes * 00180000* STOP * 00190000* End of Program * 00200000* * 00210000*---------------------------------------------------------------------* 00220000* Change Log: * 00230000* Revision * 00240000* Date Changed Rel Ver Mod Purpose * 00250000* 06/06/12 jurrutia 000.000.000 Initial release of program * 00260000* * 00260000* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00280000

Page 15: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 15

Program ConstructionSource Code – Instructions

5/27/2012

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00290000 EQUREGS 00460000BEGIN SUBENTRY 00470000 WTO 'Someone is Knocking at the Door' 00480000 WTO 'SOMBODY IS Ringing the Bell' 00490000STOP SUBEXIT 00500000 END 00510000

Page 16: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 16

Program ConstructionSource Code – Conversion to Executable

CodeExpansion of MACRO level code to BAL code

5/27/2012

Page 17: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 17

Program ConstructionSource Code – Conversion to Executable

CodeAssembly of BAL level code to OBJ level code

5/27/2012

Page 18: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 18

Program ConstructionSource Code – Conversion to Executable

CodeLink Edit of OBJ level code to 390 executable

code

5/27/2012

Page 19: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 19

Program ConstructionSource Code – Conversion to Executable

CodeExecution of 390 JAVA executable code

5/27/2012

Page 20: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 20

Program ConstructionSource Code – Conversion to Executable

CodeShortcut ASMLG – This will do all in one

command.

5/27/2012

Page 21: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 21

Program ConstructionSource Code – Conversion to Executable

CodeThe Output files you need.

PRN – Printed Assembly listing with any errors ERR – Printed listing of last MACRO execution LOG – Printed system console execution listing LST – Printed Link Edit listing with any errors

5/27/2012

Page 22: CIS 020 Assembly Programming Chapter 04 - z 390 Portable Mainframe Assembler and Emulator © John Urrutia 2012, All Rights Reserved.5/27/20121

© John Urrutia 2012, All Rights Reserved. 22

In-class ExerciseCopy the code for the PRINTOUT program on

pg. 80 onto the Assembly sheets provided. Transcribe this using the editor of your

choice into a .MLC file.Expand the MACROs, Assemble and link the

code

5/27/2012