大型机汇编(mainframe assembler/HLASM)之显示变量值('DISPLAY' in COBOL)
来源:互联网 发布:知春大厦兼职是真的吗 编辑:程序博客网 时间:2024/04/19 06:19
In COBOL, we can use DISPLAY to display some variable's value; Instead, we can issue macro WTO(Write To Operator) in assembler to meet it.
WTO MF=(E,LISTMSG1) LTR R15,R15 IS REG-15 = ZERO... BNZ ABEND4 IF NOT, ABEND...* LA R8,LISTMSG2 WTO MF=(E,(R8)) LTR R15,R15 IS REG-15 = ZERO... BNZ ABEND4 IF NOT, ABEND...************************************************************************* WTO using the EXECUTE format with user-coded WTO buffer. This* routine illustrates the use of a single WTO to display different* messages.* BAL R3,DOMSG DISPLAY MESSAGE, RETURN VIA R3 MVC WTOTEXT(76),WTOMSG1 BAL R3,DOMSG DISPLAY MESSAGE, RETURN VIA R3 MVC WTOTEXT(76),WTOMSG2 BAL R3,DOMSG DISPLAY MESSAGE, RETURN VIA R3************************************************************************** WTO using the EXECUTE format with user-coded WTO buffer. This* routine illustrates the use of a single WTO to display different* messages. This will cause a length error with WTO execution.* WTO MF=(E,WTOCRASH) LTR R15,R15 IS REG-15 = ZERO... BZ ABEND4 THEN ABEND, SHOULD BE 4... B EOJ************************************************************************** Common WTO routine to display WTOBLOCK...*DOMSG EQU * WTO MF=(E,WTOBLOCK) LTR R15,R15 IS REG-15 = ZERO... BNZ ABEND4 IF NOT, ABEND... BR R3 Return via Register 3************************************************************************ Return to caller*EOJ EQU * WTO '* ASMWTOA1 is FINISHED...' RETURN (14,12),RC=0************************************************************************ Abnormal termination of program*ABEND4 EQU * WTO '* ASMWTOA1 MLC, is ABENDING, RC=4...' RETURN (14,12),RC=4************************************************************************ The following is an example of a user-coded WTO buffer.* CNOP 0,4WTOBLOCK DC Y(80,0) * For WTO, the first length of WTO buffer, the second should be binary zeroes.WTOTEXT DC CL76'* ASMWTOA1 WTO with user-coded buffer...'************************************************************************ The following is an example of a user-coded WTO buffer that will* cause an error conditions, length of text exceeds 251 bytes. CNOP 0,4WTOCRASH DC Y(512,0)WTOCTEXT DC CL76'* ASMWTOA1 WTO FOR CRASH TEST...'* DC 436CL1'X'* ENDRemember, this maybe not the best way to display the contents. ie, how to display all the regs' value at the anytime within one program when you debug? Pls refer to ANOTHER subject... Thanks.
MAIN CSECT USING *,12 STM 14,12,12(13) LR 12,15 ST 13,SAVE+4 LA 13,SAVE START EQU * WTO MF=(E,WTOBLOCK) EXIT EQU * L 13,SAVE+4 LM 14,12,12(13) LA 15,0 BR 14 WTOBLOCK DC Y(L'DEF+4,0) DEF DC C'HELLO WORLD' SAVE DS 18F END MAIN
please remember the contents will be displayed in the JESYSMSG data set.
有疑问请联系QQ349106216
- 大型机汇编(mainframe assembler/HLASM)之显示变量值('DISPLAY' in COBOL)
- 大型机汇编(mainframe assembler/HLASM)之COBOL解惑
- 大型机汇编(mainframe assembler/HLASM)之藏巧于拙
- 大型机汇编(mainframe assembler/HLASM)之LA指令
- 大型机汇编(mainframe assembler/HLASM)之LOCTR
- 大型机汇编(mainframe assembler/HLASM)之CICS调用
- 大型机汇编(mainframe assembler/HLASM)之DUMP解读
- 大型机汇编(mainframe assembler/HLASM)之STCK/STCKE
- 大型机汇编(mainframe assembler/HLASM)之代码精简高效
- 大型机汇编(mainframe assembler/HLASM)之加密与解密
- 大型机汇编(mainframe assembler/HLASM)之S0C4解读
- 大型机汇编(mainframe assembler/HLASM)之中断向量表
- 大型机汇编(mainframe assembler/HLASM)之Branch
- 大型机汇编(mainframe assembler/HLASM)之C++语言对应
- 大型机汇编(mainframe assembler/HLASM)之BAS指令
- 大型机汇编(mainframe assembler/HLASM)之S0C7错误
- 大型机汇编(mainframe assembler/HLASM)之RECFM=VBA
- 大型机汇编(mainframe assembler/HLASM)之经典面试题
- 对xml的处理_Dom4j入门三
- MFC常用函数(转)
- ios 核心动画
- Android视图切换的效果库 - android-viewflow
- GDB问题汇总
- 大型机汇编(mainframe assembler/HLASM)之显示变量值('DISPLAY' in COBOL)
- l DOM4J解析XML文档
- 福建茶企试水糖酒会 茶行业首创“微终端销售”成亮点
- struts和servlet同时用
- ModSecurity 2.6.8 Bypass
- Javascript对象取值赋值
- GridView 72绝技 清清月儿
- C++虚函数及虚函数表解析
- 个人对 ios 中 delegate 认识详解