Hex-Dump of a Data String A Called HLASM Program |
The SimoTime Home Page |
The ASPEEKA1 routine (or callable program) will access a user defined binary string of data and create a text string of data in a hex-decimal notation format that may be displayed or used in a review process that requires human observation.
This document provides a listing of the HLASM source code for the callable routine ASPEEKA1. Additional information about this program may be obtained by sending an e-mail to: helpdesk@simotime.com
We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.
Copyright © 1987-2025
SimoTime Technologies and Services
All Rights Reserved
The ASPEEKA1 routine (or callable program) will convert a user defined segment of memory to a text string of data in a hexadecimal notation format. The hexadecimal notation may be displayed on the console using the WTO function.
The following is an example of the hexadecimal dump information provided for an ASCII encoded data string that contains "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
Note: Each single byte in the preceding string will produce two bytes of hexadecimal notation as shown in the following.
X'4142434445464748494A4B4C4D4E4F505152535455565758595A'The coding to do the actual call to display and/or log the hexadecimal dump information is as follows.
***************************************************************** * The coding required to do the call to the Hex-Dump program. * ------------------------------------------------------------ CALL 'STPEEKC1' USING STPEEK-USR-DATA, STPEEK-USR-SIZE, STPEEK-HEX-DUMP
A copy file is provided to define the pass area to be used when calling STPEEKC1. The following statement is required in the WORKING STORAGE section of the calling program.
WORKING STORAGE. . . . . . . COPY STPEEKB1. . . .
You may view an example of a COBOL program that uses STPEEKC1 at http://www.simotime.com/tcpeek01.htm.
The set of program members includes a program that creates the hexadecimal dump information and a copy file that defines the structure for a pass area.
The following (ASPEEKA1.mlc) is the HLASM Source Code for the ASPEEKA1 callable Hex-Dump routine.
ASPEEKA1 CSECT *********************************************************************** * ASPEEKA1.mlc - This is an HLASM Program * * Provided by SimoTime Technologies * * (C) Copyright 1987-2019 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * *********************************************************************** * * * Created: 1976/06/01, Simmons * * Changed: 1976/06/01, Simmons, no changes to date... * * * *********************************************************************** * * Convert binary data to text data using hexadecimal notation. * A single byte of input will be converted to two bytes of output. * * Register Description * R0 * R1 System, Address of parameter list * R2 * R3 User, Set as return for BAS Instruction * R4 * R5 User, Address of Packed-Decimal or Binary string * R6 User, Address of User string Size * R7 User, Address of Hex-Dump * R8 * R9 * R10 * R11 * R12 * R13 * R14 System, Address for Return to Caller * R15 System and/or User, Return code * AMODE 31 SAVE (14,12) BALR 12,0 USING *,12 * LTR R1,R1 BZ NOPARMS * LR R2,R1 * Put addr of addr list into reg-2 L R5,0(,R2) * Use reg-5 for ADDR of Input String L R6,4(,R2) * Use reg-6 for ADDR of Input Length L R7,8(,R2) * Use reg-7 for ADDR of Output Hex-Dump * WTO '* ASPEEKA1 is starting...' * * TM 0(,R2),X'80' * Is this last parameter... BO DODUMP * If yes, do the DUMP or PEEK request * B ABEND08 * else ABEND * DODUMP EQU * WTO '* ASPEEKA1 called with three parameters...v17' * * R4 Used to increment through user input string * R8 1st of Reg-Pair for Multiply Instruction * R9 2nd of Reg-Pair for Multiply Instruction * R11 Used as a loop counter * R15 Used to increment through user hex-dump string * LA R11,1 * Set loop counter to 1 LR R4,R5 * Set ptr to 1st byte of input LR R2,R7 * Set ptr to 1st byte of output DODUMPT1 EQU * * MVC WORK04+3(1),0(R4) * Get single byte of 1st Parm LA R9,5 * Set Reg to Five M R8,WORK04 * Calc offset to table entry LA R10,ASMHEXB1 * Get Addr of Hex-Dump table AR R10,R9 * Incr to proper element MVC 0(2,R2),0(R10) * Hex-Table to User Hex-Dump LA R11,1(,R11) * Incr loop counter CL R11,0(0,R6) * Compare Loop-Ctr/user-length BH DODUMPT2 * Exit from loop LA R4,1(,R4) * Incr Ptr to next input byte LA R2,2(,R2) * Incr Ptr to next output byte B DODUMPT1 * Repeat loop processing * DODUMPT2 EQU * MVC WTO048(30),0(R7) BAS R3,DOMSG B EOJAOK * *********************************************************************** * NORMAL END-OF-JOB * RETURN to the CALLING PROGRAM OR OPERATING SYSTEM * EOJAOK EQU * WTO '* ASPEEKA1 is returning...' RETURN (14,12),RC=0 * *********************************************************************** * ABENDING WITH RETURN-CODE OF 8 * RETURN to the CALLING PROGRAM OR OPERATING SYSTEM * ABEND08 EQU * WTO '* ASPEEKA1 is abending...RC=0008' RETURN (14,12),RC=8 * *********************************************************************** * Post a non-paramter message... * RETURN to the CALLING PROGRAM OR OPERATING SYSTEM * NOPARMS EQU * WTO '* ASPEEKA1 called with zero parameters' B TOOMANY * *********************************************************************** * Post a too-many-paramters message... * RETURN to the CALLING PROGRAM OR OPERATING SYSTEM * TOOMANY EQU * WTO '* ASPEEKA1 called with too many parameters' RETURN (14,12),RC=4 * *********************************************************************** * The following is an example of a user-coded WTO buffer. * DOMSG EQU * WTO MF=(E,WTOBLOCK) MVI WTO048,C' ' MVC WTO048+1(47),WTO048 BR R3 * Return to caller * DS 0H * INSURE HALF-WORD ALIGNMENT WTOBLOCK EQU * DC H'80' * For WTO, length of WTO buffer... DC H'0' should be binary zeroes... WTOMSG EQU * DC CL22'* ASPEEKA1 - USERINFO ' WTOTAG DC CL06'PEEK ' WTO048 DC 48CL1' ' * EOPTAG DC CL32'* ASPEEKA1 - End of Program ' * PD0 DC XL3'00000C' PD2 DC XL3'00002C' * DP PD2(3),PD0 *** Force Program Check ATTENTION * WORK04 EQU * DC XL4'00000000' * WORK05 EQU * DC CL5' ' * *********************************************************************** COPY ASMHEXB1 * LTORG REGS END
The following (ASMHEXB1.cpy) is the HLASM copy file that may be used when calling ASPEEKA1.
***************************************************************** * ASMHEXB1 is a COBOL Copy File * * Table for Hexadecimal Dump and Display. * * Copyright (C) 1987-2019 SimoTime Technologies * * All Rights Reserved * ***************************************************************** * Provided by SimoTime Technologies * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * ***************************************************************** * * * The following table contains 256, 5-byte elements. * * * * Print characters include the international character set. * * * * The format of the table elements is as follows * * Byte Function * * 1-2 Two-byte hexadecimal print value * * 3 Print character for EBCDIC * * 4 Print character for ASCII * * 5 0 - non-printable * * 1 - printable for EBCDIC * * 2 - printable for ASCII * * 3 - printable for Both * * * * Notice the technique used for an apostrophe or an ampersand * * character or symbol. * * The definition requires two apostrophes or two ampersands * * to be used. * ***************************************************************** * ASMHEXB1 EQU * HEX@00 DC CL5'00..0' HEX@01 DC CL5'01..0' HEX@02 DC CL5'02..0' HEX@03 DC CL5'03..0' HEX@04 DC CL5'04..0' HEX@05 DC CL5'05..0' HEX@06 DC CL5'06..0' HEX@07 DC CL5'07..0' HEX@08 DC CL5'08..0' HEX@09 DC CL5'09..0' HEX@0A DC CL5'0A..0' HEX@0B DC CL5'0B..0' HEX@0C DC CL5'0C..0' HEX@0D DC CL5'0D..0' HEX@0E DC CL5'0E..0' HEX@0F DC CL5'0F..0' HEX@10 DC CL5'10..0' HEX@11 DC CL5'11..0' HEX@12 DC CL5'12..0' HEX@13 DC CL5'13..0' HEX@14 DC CL5'14..0' HEX@15 DC CL5'15..0' HEX@16 DC CL5'16..0' HEX@17 DC CL5'17..0' HEX@18 DC CL5'18..0' HEX@19 DC CL5'19..0' HEX@1A DC CL5'1A..0' HEX@1B DC CL5'1B..0' HEX@1C DC CL5'1C..0' HEX@1D DC CL5'1D..0' HEX@1E DC CL5'1E..0' HEX@1F DC CL5'1F..0' HEX@20 DC CL5'20€ 3' HEX@21 DC CL5'21.!2' HEX@22 DC CL5'22."2' HEX@23 DC CL5'23.#2' HEX@24 DC CL5'24.$2' HEX@25 DC CL5'25.%2' HEX@26 DC CL5'26.&&2' HEX@27 DC CL5'27.''2' HEX@28 DC CL5'28.(2' HEX@29 DC CL5'29.)2' HEX@2A DC CL5'2A.*2' HEX@2B DC CL5'2B.+2' HEX@2C DC CL5'2C.,2' HEX@2D DC CL5'2D.-2' HEX@2E DC CL5'2E..2' HEX@2F DC CL5'2F./2' HEX@30 DC CL5'30.02' HEX@31 DC CL5'31.12' HEX@32 DC CL5'32.22' HEX@33 DC CL5'33.32' HEX@34 DC CL5'34.42' HEX@35 DC CL5'35.52' HEX@36 DC CL5'36.62' HEX@37 DC CL5'37.72' HEX@38 DC CL5'38.82' HEX@39 DC CL5'39.92' HEX@3A DC CL5'3A.:2' HEX@3B DC CL5'3B.;2' HEX@3C DC CL5'3C.<2' HEX@3D DC CL5'3D.=2' HEX@3E DC CL5'3E.>2' HEX@3F DC CL5'3F.?2' HEX@40 DC CL5'40 @3' HEX@41 DC CL5'41.A2' HEX@42 DC CL5'42âB3' HEX@43 DC CL5'43äC3' HEX@44 DC CL5'44àD3' HEX@45 DC CL5'45áE3' HEX@46 DC CL5'46ãF3' HEX@47 DC CL5'47åG3' HEX@48 DC CL5'48çH3' HEX@49 DC CL5'49ñI3' HEX@4A DC CL5'4A¢J3' HEX@4B DC CL5'4B.K3' HEX@4C DC CL5'4C<L3' HEX@4D DC CL5'4D(M3' HEX@4E DC CL5'4E+N3' HEX@4F DC CL5'4F|O3' HEX@50 DC CL5'50&&P3' HEX@51 DC CL5'51éQ3' HEX@52 DC CL5'52êR3' HEX@53 DC CL5'53ëS3' HEX@54 DC CL5'54èT3' HEX@55 DC CL5'55íU3' HEX@56 DC CL5'56îV3' HEX@57 DC CL5'57ïW3' HEX@58 DC CL5'58ìX3' HEX@59 DC CL5'59ßY3' HEX@5A DC CL5'5A!Z3' HEX@5B DC CL5'5B$[3' HEX@5C DC CL5'5C*\3' HEX@5D DC CL5'5D)]3' HEX@5E DC CL5'5E;^3' HEX@5F DC CL5'5F¬_3' HEX@60 DC CL5'60-`3' HEX@61 DC CL5'61/a3' HEX@62 DC CL5'62Âb3' HEX@63 DC CL5'63Äc3' HEX@64 DC CL5'64Àd3' HEX@65 DC CL5'65Áe3' HEX@66 DC CL5'66Ãf3' HEX@67 DC CL5'67Åg3' HEX@68 DC CL5'68Çh3' HEX@69 DC CL5'69Ñi3' HEX@6A DC CL5'6A¦j3' HEX@6B DC CL5'6B,k3' HEX@6C DC CL5'6C%l3' HEX@6D DC CL5'6D_m3' HEX@6E DC CL5'6E>n3' HEX@6F DC CL5'6F?o3' HEX@70 DC CL5'70øp3' HEX@71 DC CL5'71Éq3' HEX@72 DC CL5'72Êr3' HEX@73 DC CL5'73Ës3' HEX@74 DC CL5'74Èt3' HEX@75 DC CL5'75Íu3' HEX@76 DC CL5'76Îv3' HEX@77 DC CL5'77Ïw3' HEX@78 DC CL5'78Ìx3' HEX@79 DC CL5'79`y3' HEX@7A DC CL5'7A:z3' HEX@7B DC CL5'7B#{3' HEX@7C DC CL5'7C@.3' HEX@7D DC CL5'7D''}3' HEX@7E DC CL5'7E=~3' HEX@7F DC CL5'7F".1' HEX@80 DC CL5'80Ø.1' HEX@81 DC CL5'81a.1' HEX@82 DC CL5'82b.1' HEX@83 DC CL5'83c.1' HEX@84 DC CL5'84d.1' HEX@85 DC CL5'85e.1' HEX@86 DC CL5'86f.1' HEX@87 DC CL5'87g.1' HEX@88 DC CL5'88h.1' HEX@89 DC CL5'89i©3' HEX@8A DC CL5'8A..0' HEX@8B DC CL5'8B..0' HEX@8C DC CL5'8C..0' HEX@8D DC CL5'8Dý.1' HEX@8E DC CL5'8E..0' HEX@8F DC CL5'8F+.1' HEX@90 DC CL5'90..0' HEX@91 DC CL5'91j.1' HEX@92 DC CL5'92k.1' HEX@93 DC CL5'93l.1' HEX@94 DC CL5'94m.1' HEX@95 DC CL5'95n.1' HEX@96 DC CL5'96o.1' HEX@97 DC CL5'97p.1' HEX@98 DC CL5'98q.1' HEX@99 DC CL5'99r.1' HEX@9A DC CL5'9A..0' HEX@9B DC CL5'9B}.1' HEX@9C DC CL5'9CÆ.1' HEX@9D DC CL5'9D..0' HEX@9E DC CL5'9Eæ.1' HEX@9F DC CL5'9F.Ÿ2' HEX@A0 DC CL5'A0..0' HEX@A1 DC CL5'A1..0' HEX@A2 DC CL5'A2s¢3' HEX@A3 DC CL5'A3t£3' HEX@A4 DC CL5'A4u.1' HEX@A5 DC CL5'A5v¥3' HEX@A6 DC CL5'A6w¦3' HEX@A7 DC CL5'A7x.1' HEX@A8 DC CL5'A8y.1' HEX@A9 DC CL5'A9z.1' HEX@AA DC CL5'AA..0' HEX@AB DC CL5'AB..0' HEX@AC DC CL5'AC.¬2' HEX@AD DC CL5'ADÝ.1' HEX@AE DC CL5'AE.®2' HEX@AF DC CL5'AF®.1' HEX@B0 DC CL5'B0..0' HEX@B1 DC CL5'B1£.1' HEX@B2 DC CL5'B2¥.1' HEX@B3 DC CL5'B3..0' HEX@B4 DC CL5'B4©.1' HEX@B5 DC CL5'B5..0' HEX@B6 DC CL5'B6..0' HEX@B7 DC CL5'B7..0' HEX@B8 DC CL5'B8..0' HEX@B9 DC CL5'B9..0' HEX@BA DC CL5'BA[.1' HEX@BB DC CL5'BB].1' HEX@BC DC CL5'BC..0' HEX@BD DC CL5'BD..0' HEX@BE DC CL5'BE..0' HEX@BF DC CL5'BF..0' HEX@C0 DC CL5'C0{À3' HEX@C1 DC CL5'C1AÁ3' HEX@C2 DC CL5'C2BÂ3' HEX@C3 DC CL5'C3CÃ3' HEX@C4 DC CL5'C4DÄ3' HEX@C5 DC CL5'C5EÅ3' HEX@C6 DC CL5'C6FÆ3' HEX@C7 DC CL5'C7GÇ3' HEX@C8 DC CL5'C8HÈ3' HEX@C9 DC CL5'C9IÉ3' HEX@CA DC CL5'CA.Ê2' HEX@CB DC CL5'CBôË3' HEX@CC DC CL5'CCöÌ3' HEX@CD DC CL5'CDòÍ3' HEX@CE DC CL5'CEóÎ3' HEX@CF DC CL5'CFõÏ3' HEX@D0 DC CL5'D0}.1' HEX@D1 DC CL5'D1JÑ3' HEX@D2 DC CL5'D2KÒ3' HEX@D3 DC CL5'D3LÓ3' HEX@D4 DC CL5'D4MÔ3' HEX@D5 DC CL5'D5NÕ3' HEX@D6 DC CL5'D6OÖ3' HEX@D7 DC CL5'D7P.1' HEX@D8 DC CL5'D8QØ3' HEX@D9 DC CL5'D9RÙ3' HEX@DA DC CL5'DA.Ú2' HEX@DB DC CL5'DBûÛ3' HEX@DC DC CL5'DCüÜ3' HEX@DD DC CL5'DDùÝ3' HEX@DE DC CL5'DEú.1' HEX@DF DC CL5'DFß3' HEX@E0 DC CL5'E0.à2' HEX@E1 DC CL5'E1.á2' HEX@E2 DC CL5'E2Sâ3' HEX@E3 DC CL5'E3Tã3' HEX@E4 DC CL5'E4Uä3' HEX@E5 DC CL5'E5Vå3' HEX@E6 DC CL5'E6Wæ3' HEX@E7 DC CL5'E7Xç3' HEX@E8 DC CL5'E8Yè3' HEX@E9 DC CL5'E9Zé3' HEX@EA DC CL5'EA.ê2' HEX@EB DC CL5'EBÔë3' HEX@EC DC CL5'ECÖì3' HEX@ED DC CL5'EDÒí3' HEX@EE DC CL5'EEÓî3' HEX@EF DC CL5'EFÕï3' HEX@F0 DC CL5'F00.1' HEX@F1 DC CL5'F11ñ3' HEX@F2 DC CL5'F22ò3' HEX@F3 DC CL5'F33ó3' HEX@F4 DC CL5'F44ô3' HEX@F5 DC CL5'F55õ3' HEX@F6 DC CL5'F66ö3' HEX@F7 DC CL5'F77.1' HEX@F8 DC CL5'F88ø3' HEX@F9 DC CL5'F99ù3' HEX@FA DC CL5'FA.ú2' HEX@FB DC CL5'FBÛû3' HEX@FC DC CL5'FCÜü3' HEX@FD DC CL5'FDÙý3' HEX@FE DC CL5'FEÚ.1' HEX@FF DC CL5'FFŸ3' * *** ASMHEXB1 - End-of-Copy File - - - - - - - - - - - ASMHEXB1 * ***************************************************************** *
This document provides a listing of the HLASM source code for the callable routine ASPEEKA1. This document may be used to assist as a tutorial for new programmers or as a quick reference for experienced programmers.
In the world of programming there are many ways to solve a problem. This documentation and software were developed and tested on systems that are configured for a SIMOTIME environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration.
SIMOTIME Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SIMOTIME Services or Technologies please contact us using the information in the Contact or Feedback section of this document.
Software Agreement and Disclaimer
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies.
SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.
This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.
Note: A SimoTime License is required for the items to be made available on a local system or server.
The following links may be to the current server or to the Internet.
Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the icon. If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the icon.
Explore the Assembler Connection for more examples of mainframe Assembler programming techniques and sample code.
Explore a complete list of the SimoTime Callable Routines or Utility Programs. This includes the callable routines and utility programs for the Micro Focus environment.
Explore The ASCII and EBCDIC Translation Tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats.
The following links will require an internet connect.
This suite of programs and documentation is available to download for review and evaluation purposes. Other uses will require a SimoTime Software License.
A good place to start is The SimoTime Home Page for access to white papers, program examples and product information. This link requires an Internet Connection
Explore The Micro Focus Web Site for more information about products (including Micro Focus COBOL) and services available from Micro Focus. This link requires an Internet Connection.
Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.
This document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.
1. | Send an e-mail to our helpdesk. |
1.1. | helpdesk@simotime.com. |
2. | Our telephone numbers are as follows. |
2.1. | 1 415 763-9430 office-helpdesk |
2.2. | 1 415 827-7045 mobile |
We appreciate hearing from you.
SimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.
Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.
Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.
Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
Return-to-Top |
Hex Dump of a Data String |
Copyright © 1987-2025 SimoTime Technologies and Services All Rights Reserved |
When technology complements business |
http://www.simotime.com |