一 汇编中常见的数据类型
C = 字符
H = 半字
F = 全字
D = 双字
X = 十六进制数
B = 二进制数
P = 压缩十进制数
Z = 非压缩十进制数
AREA DS CL4
AREA2 DS 4CL1
CL4是一个很常见的定义
类似的还有PL5,XL6
第一个定义保留4 个字节的区域,并将该区域的首地址赋予AREA,该区域
的长度为4 字节
;第二个定义同样保留了4 个字节的区域,并将该区域的首地址赋予AREA2,
但该区域的长度为1 字节。
二 一个汇编大致的LOG
For more details about this program, see “ASMASAMP” in the HLASM Installation and Customization Guide.
High Level Assembler Option Summary (PTF R160 ) Page 1HLASM R6.0 2015/02/21 20.03Overriding ASMAOPT Parameters ->* Input ASMAOPT Statement>sysparm(thisisatestsysparm),rxref>LIST(MAX)Overriding Parameters- NOOBJECT,LANGUAGE(EN),SIZE(MAX),NOADATA,GOFFProcess Statements- OVERRIDE(NORENT)Options for this Assembly
3 Invocation Parms NOADATAALIGNNOASABATCHCODEPAGE(047C)NOCOMPATNODBCSNODECKDXREFESDNOEXITFAIL(NOMSG,NOMNOTE,MAXERRS(500))FLAG(0,ALIGN,CONT,EXLITW,NOIMPLEN,NOPAGE0,PUSH,RECORD,NOSUBSTR,USING0)NOFOLD
3 Invocation Parms GOFF(NOADATA)NOINFO
3 Invocation Parms LANGUAGE(EN)NOLIBMACLINECOUNT(60)
2 ASMAOPT LIST(MAX)MACHINE(,NOLIST)MXREF(SOURCE)
3 Invocation Parms NOOBJECTOPTABLE(UNI,NOLIST)NOPCONTROLNOPESTOPNOPROFILENORA2
1 *PROCESS OVERRIDE NORENTRLD
2 ASMAOPT RXREFSECTALGN(8)
3 Invocation Parms SIZE(MAX)NOSUPRWARN
2 ASMAOPT SYSPARM(thisisatestsysparm)NOTERMNOTESTTHREADNOTRANSLATETYPECHECK(MAGNITUDE,REGISTER)USING(NOLIMIT,MAP,WARN(15))NOWORKFILEXREF(SHORT,UNREFS)No Overriding DD NamesBIGNAME External Symbol Dictionary Page 2
Symbol Type Id Address Length Owner Id Flags Alias-of HLASM R6.0 2015/02/21 20.03
A SD 00000001
B_IDRL ED 00000002 00000001
B_PRV ED 00000003 00000001
B_TEXT ED 00000004 00000000 000000F0 00000001 00
A LD 00000005 00000000 00000004 00
PD2 SD 00000006
B_IDRL ED 00000007 00000006
B_PRV ED 00000008 00000006
B_TEXT ED 00000009 00000000 00000814 00000006 00
PD2 CM 0000000A 00000000 00000009 00 A
BIGNAME Page 3Active Usings: NoneLoc Object Code Addr1 Addr2 Stmt Source Statement HLASM R6.0 2015/02/21 20.031 *PROCESS OVERRIDE(NORENT)
BIGNAME Sample program. 1ST TITLE statement has no name, 2ND one does Page 4Active Usings: NoneLoc Object Code Addr1 Addr2 Stmt Source Statement HLASM R6.0 2015/02/21 20.033 ***********************************************************************4 * *5 * Licensed Materials - Property of IBM *6 * *7 * 5696-234 *8 * *9 * Copyright IBM Corporation 1992, 2008 All Rights Reserved. *10 * *11 * US Government Users Restricted Rights - Use, duplication *12 * or disclosure restricted by GSA ADP Schedule Contract *13 * with IBM Corp. *14 * *15 ***********************************************************************16 * DISCLAIMER OF WARRANTIES *17 * The following enclosed code is sample code created by IBM *18 * Corporation. This sample code is licensed under the terms of *19 * the High Level Assembler license, but is not part of any *20 * standard IBM product. It is provided to you solely for the *21 * purpose of demonstrating the usage of some of the features of *22 * High Level Assembler. The code is not supported by IBM and *23 * is provided on an "AS IS" basis, without warranty of any kind. *24 * IBM shall not be liable for any damages arising out of your *25 * use of the sample code, even if IBM has been advised of the *26 * possibility of such damages. *27 ***********************************************************************
00000000 00000000 000000F0 28 a csectR:8 00000000 29 using *,8
00000000 1BFF 30 sr 15,15 Set return code to zero
00000002 07FE 31 br 14 and return.33 **********************************************************************34 * PUSH and POP statements *35 * Push down the PRINT statement, replace it, retrieve original *36 **********************************************************************38 push print Save Default setting ' PRINT ON,NODATA,GEN'B 39 print nogen,data
00000004 0A23 40 wto mf=(E,(1)) Expansion not shown
A
The external symbol dictionary shows a named common statement. The named common section is defined in statement 257.B
Statement 38: Save the status of the PRINT statement.
Statement 39: Modify the print options to DATA and NOGEN.Statement 40: Macro call; the expansion (statements 41 and 44) is not printed.Statement 45: All 28 bytes of data are displayed to the two-operand DC.Statement 46: Restore earlier status of PRINT.Statement 48: This statement is not printed. It is a nested macro call. The MCALL operand of the PRINT instruction or the PCONTROL assembler option control the printing of nested macro calls.Statements 51: The generated output of the macro WTO is shown, but only two bytes of data are shown.