Assembler Concepts Copyright 2008 by David Woolbright


asterisk 5c EBCDIC Encoding



Yüklə 457 b.
səhifə3/8
tarix08.10.2017
ölçüsü457 b.
#3552
1   2   3   4   5   6   7   8

asterisk 5c



EBCDIC Encoding

  • Character Hex Equivalent

  • 0 F0

  • 1 F1

  • 2 F2

  • 3 F3

  • 4 F4

  • 5 F5

  • 6 F6

  • 7 F7

  • 8 F8

  • 9 F9

  • blank 40

  • comma 6b

  • decimal point 4b

  • asterisk 5c



EBCDIC Encoding



Character Instructions - MVC

  • Move Characters

  • SS1

  • Op1 – target field

  • Op2 – source field

  • Length – associated with operand 1 only!

  • Default Length is length of operand 1

  • Fields may overlap

  • Max 256 bytes are moved



Character Instructions - MVC



Blanking Out a Line

  • BLANK DC C’ ’

  • BUFFER DS CL133

  • MVC BUFFER,BLANK

  • MVI BUFFER,C’ ’

  • MVC BUFFER+1(L’BUFFER-1),BUFFER

  • MVC BUFFER,=CL133’ ’



Character Instructions - CLC

  • Compare Logical Characters

  • SS1

  • Sets the condition code to indicate how Op1 compares to Op2

  • Length – associated with operand 1 only!

  • Default Length is length of operand 1

  • Bytes compared using EBCDIC encoding

  • Bytes compared left to right

  • Max 256 bytes are compared

  • Test with BE, BL, BH, BNE, BNL, BNH



Character Instructions - CLC

  • X DC Cl5’ABC’

  • Y DC CL7’1234567

  • Z DC C’ABCD’

  • CLC X,Y

  • CLC Y,X

  • CLC X(2),Z explicit length

  • CLC Z,X

  • BL THERE



Character Instructions - CLI

  • Compare Logical Immediate

  • SI

  • Constant resides inside the instruction

  • Sets the condition code to indicate how Op1 compares to Op2

  • Implicit length of 1!

  • Byte compared using EBCDIC encoding

  • Test with BE, BL, BH, BNE, BNL, BNH



Character Instructions - CLI

  • X DC Cl5’ABC’

  • Y DC CL7’1234567

  • Z DC C’ABCD’

  • CLI X,C’A’ Character

  • CLI Y,C’A

  • CLI X,X’40’ Hex

  • CLI Z,64 Decimal

  • CLI Z,B’11110001’ Binary

  • BL THERE



Character Instructions - MVI



Character Instructions - MVI

  • X DC Cl5’ABC’

  • Y DC CL7’1234567

  • Z DC C’ABCD’

  • MVI X,C’F’ Character

  • MVI Y,C’A’

  • MVI X,X’40’ Hex

  • MVI Z,64 Decimal

  • MVI Z,B’11110001’ Binary



Defining an Output File

  • **********************************************************

  • *

  • * OUTPUT FILE - DATA CONTROL BLOCK

  • *

  • **********************************************************

  • FILEOUT DCB DSORG=PS, X

  • MACRF=(PM), X

  • DDNAME=FILEOUT, X

  • RECFM=FBM, X

  • LRECL=80



Defining an Input File

  • **********************************************************

  • *

  • * INPUT FILE - DATA CONTROL BLOCK

  • *

  • **********************************************************

  • FILEIN DCB DSORG=PS, X

  • MACRF=(GM), X

  • DDNAME=FILEIN, X

  • RECFM=FB, X

  • EODAD=FINAL X

  • LRECL=80



DCB (Data Control Block) Parms

  • MACRF=(GM)

    • Macro format – controls the type of macros that are used for file
    • GM – input file, move mode
    • GL – input file, locate mode
    • PM – output file, move mode
    • PL – output file, locate mode
    • We will start with GM and PM since these are the easiest, but GL and PL are the most efficient for files with large record sizes and many records
  • DDNAME= name



DCB (Data Control Block) Parms

  • DSORG=PS

    • A Physical sequential file organization

  • Yüklə 457 b.

    Dostları ilə paylaş:
1   2   3   4   5   6   7   8




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə