z390 主机的汇编代码编程

发布于 2024-12-08 15:07:10 字数 7016 浏览 0 评论 0原文

未完成此问题

在此程序中,未知问题导致汇编器拒绝代码,因为明显未知的宏,或者在汇编中看起来像宏的内容。我不知道如何纠正这个问题。

我正在使用 z390 便携式大型机汇编器和仿真器 (http://www.z390.org/)。

另一个链接:www.z390.org/z390_Documentation.htm

相关的 pdf 位于 http://tradingwiz。 net63.net/pdf/Sessions5and6.pdf

汇编手册位于 http://publibz.boulder.ibm.com/epubs/ pdf/asmr1020.pdf,但我在应用它时遇到问题。

更新:我仍然想删除有关“缺少宏 =DSORG=PS”的错误,并且我不知道如何告诉汇编器基址寄存器在哪里(“未找到基址寄存器”)

另一个问题:是否有任何资源这个你知道吗,特别是那些容易理解的?

如果您需要某种进一步的信息,我将很乐意提供帮助。

        TITLE 'CS 4321 Program #4 by J. Colt Wright'
        PRINT NOGEN    
COPY SUBENTRY

    TITLE 'PROGRAM 4 80/80 LISTING'

    PRINT NOGEN
COPY2 SUBENTRY

    WTO 'PROG4 COPY PROG4 (ASCII) TO COPY (ASCII)'
    OPEN (INFILE,INPUT)
    OPEN (OUTFILE,OUTPUT)
    WTO 'Files opened successfully'
*
LOOP EQU *
GET INFILE,IRECORD
    MVC ORECORD,=CL133' '
    MVC ORECORD(80),IRECORD
    PUT OUTFILE,ORECORD
    B LOOP
*
EOF EQU *
    CLOSE (INFILE,,OUTFILE)
    WTO 'PROG4 ENDED OK'
    SUBEXIT


INFILE  DCB   DDNAME=INFILE,    X
              DSORG=PS,         X
              RECFM=FT,         X
              LRECL=72,         X
              EODAD=EOF,        X
              MACRF=GM          X
*
OUTFILE DCB   DDNAME=OUTFILE,   X
              DSORG=PS,         X
              RECFM=FT,         X
              LRECL=80,         X
              MACRF=PM          
*
IRECORD DC    CL72' '
ORECORD DC    CL80' '
          ENDPGM  DS D
          END COPY

20:22:31 PROG4     MZ390 START USING z390 V1.5.05 ON J2SE 1.6.0_26 10/08/11
20:22:31 PROG4     AZ390 AZ390E error  29      (1/29)211                 DSORG=PS,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = DSORG=PS,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/30)212                 RECFM=FT,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = RECFM=FT,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/31)213                 LRECL=72,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = LRECL=72,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/32)214                 EODAD=EOF,        X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = EODAD=EOF,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/33)215                 MACRF=GM          X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = MACRF=GM
20:22:31 PROG4     AZ390 AZ390E error  29      (1/36)252                 DSORG=PS,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = DSORG=PS,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/37)253                 RECFM=FT,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = RECFM=FT,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/38)254                 LRECL=80,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = LRECL=80,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/39)255                 MACRF=PM 
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = MACRF=PM
20:22:31 PROG4     AZ390 AZ390E error  29      (1/43)259                 ENDPGM  DS D
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = ENDPGM
20:22:31 PROG4     AZ390 AZ390E ERRSUM Critical Error Summary Option
20:22:31 PROG4     AZ390 AZ390E ERRSUM Fix and repeat until all nested errors resolved
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =DSORG=PS,
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =RECFM=FT,
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =LRECL=72,
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =EODAD=EOF,
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =MACRF=GM
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =LRECL=80,
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =MACRF=PM
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =ENDPGM
20:22:31 PROG4     AZ390 AZ390E ERRSUM total missing   copy   files =0
20:22:31 PROG4     AZ390 AZ390E ERRSUM total missing   macro  files =8
20:22:31 PROG4     AZ390 AZ390E ERRSUM total undefined symbols      =0
20:22:31 PROG4     AZ390 AZ390E ERRSUM total mz390 errors    = 0
20:22:31 PROG4     AZ390 AZ390E ERRSUM total az390 errors    = 10
20:22:32 PROG4     AZ390 AZ390I FID=  1 ERR=  10 c:\Program Files\Automated Software Tools\z390\CS4321\PROG4.MLC
20:22:32 PROG4     MZ390 ENDED   RC=12 SEC= 0 MEM(MB)= 47 IO=2420

        TITLE 'CS 4321 Program #4 by J. Colt Wright' 
        PRINT NOGEN    
COPY          SUBENTRY
    TITLE 'PROGRAM 4 80/80 LISTING'
    PRINT NOGEN
COPY2 SUBENTRY

    WTO 'PROG4 COPY PROG4 (ASCII) TO COPY (ASCII)'
    OPEN (INFILE,INPUT)
    OPEN (OUTFILE,OUTPUT)
    WTO 'Files opened successfully'
*
LOOP EQU *
    GET INFILE,IRECORD
    MVC ORECORD,=CL133' '
    MVC ORECORD(80),IRECORD
    PUT OUTFILE,ORECORD
    B LOOP
*
EOF EQU *
    CLOSE (INFILE,,OUTFILE)
    WTO 'PROG4 ENDED OK'
    SUBEXIT

    SUBEXIT   


INFILE  DCB     DDNAME=INFILE,                                         X
                DSORG=PS,                                              X
                RECFM=FT,                                              X
                LRECL=72,                                              X
                EODAD=EOF,                                             X
                MACRF=GM
*
OUTFILE DCB     DDNAME=OUTFILE,    
                DSORG=PS,                                              X
                RECFM=FT,                                              X
                LRECL=80,                                              X
                MACRF=PM
*
IRECORD DC    CL72' '
ORECORD DC    CL80' '
ENDPGM  DS D
 END COPY


08:39:00 PROG4     MZ390 START USING z390 V1.5.05 ON J2SE 1.6.0_26 10/09/11
08:39:00 PROG4     AZ390 AZ390E error 144      (1/15)141       MVC ORECORD,=CL133' '
08:39:00 PROG4     AZ390 AZ390I no base register found
08:39:00 PROG4     AZ390 AZ390E error  29      (1/39)258                       DSORG=PS,                                                RECFM=FT,                                                LRECL=80,                                               MACRF=PM
08:39:00 PROG4     AZ390 AZ390I ERRSUM missing macro = DSORG=PS,
08:39:00 PROG4     AZ390 AZ390E ERRSUM Critical Error Summary Option
08:39:00 PROG4     AZ390 AZ390E ERRSUM Fix and repeat until all nested errors resolved
08:39:00 PROG4     AZ390 AZ390E ERRSUM missing macro =DSORG=PS,
08:39:00 PROG4     AZ390 AZ390E ERRSUM total missing   copy   files =0
08:39:00 PROG4     AZ390 AZ390E ERRSUM total missing   macro  files =1
08:39:00 PROG4     AZ390 AZ390E ERRSUM total undefined symbols      =0
08:39:00 PROG4     AZ390 AZ390E ERRSUM total mz390 errors    = 0
08:39:00 PROG4     AZ390 AZ390E ERRSUM total az390 errors    = 2
08:39:01 PROG4     AZ390 AZ390I FID=  1 ERR=   2 c:\Program Files\Automated Software Tools\z390\CS4321\PROG4.MLC
08:39:01 PROG4     MZ390 ENDED   RC=12 SEC= 0 MEM(MB)= 47 IO=2374

Not finished with this problem

In this program an unknown problem causes the assembler to reject the code because of apparently unknown macros, or what looks to the assembly like macros. I'm not sure how to correct this.

I'm using the z390 Portable Mainframe Assembler and Emulator (http://www.z390.org/).

Another link: www.z390.org/z390_Documentation.htm

The relevant pdf is at http://tradingwiz.net63.net/pdf/Sessions5and6.pdf.

An assembly manual is at http://publibz.boulder.ibm.com/epubs/pdf/asmr1020.pdf, but I'm having trouble applying it.

Update: I still want to remove the error about "missing macro =DSORG=PS" and I don't know how to tell the assembler where the base register is ("no base register found")

Another question: Are there any resources for this you know of, particularly ones easy to understand?

If you want further information of some kind I'll be happy to help.

        TITLE 'CS 4321 Program #4 by J. Colt Wright'
        PRINT NOGEN    
COPY SUBENTRY

    TITLE 'PROGRAM 4 80/80 LISTING'

    PRINT NOGEN
COPY2 SUBENTRY

    WTO 'PROG4 COPY PROG4 (ASCII) TO COPY (ASCII)'
    OPEN (INFILE,INPUT)
    OPEN (OUTFILE,OUTPUT)
    WTO 'Files opened successfully'
*
LOOP EQU *
GET INFILE,IRECORD
    MVC ORECORD,=CL133' '
    MVC ORECORD(80),IRECORD
    PUT OUTFILE,ORECORD
    B LOOP
*
EOF EQU *
    CLOSE (INFILE,,OUTFILE)
    WTO 'PROG4 ENDED OK'
    SUBEXIT


INFILE  DCB   DDNAME=INFILE,    X
              DSORG=PS,         X
              RECFM=FT,         X
              LRECL=72,         X
              EODAD=EOF,        X
              MACRF=GM          X
*
OUTFILE DCB   DDNAME=OUTFILE,   X
              DSORG=PS,         X
              RECFM=FT,         X
              LRECL=80,         X
              MACRF=PM          
*
IRECORD DC    CL72' '
ORECORD DC    CL80' '
          ENDPGM  DS D
          END COPY

20:22:31 PROG4     MZ390 START USING z390 V1.5.05 ON J2SE 1.6.0_26 10/08/11
20:22:31 PROG4     AZ390 AZ390E error  29      (1/29)211                 DSORG=PS,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = DSORG=PS,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/30)212                 RECFM=FT,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = RECFM=FT,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/31)213                 LRECL=72,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = LRECL=72,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/32)214                 EODAD=EOF,        X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = EODAD=EOF,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/33)215                 MACRF=GM          X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = MACRF=GM
20:22:31 PROG4     AZ390 AZ390E error  29      (1/36)252                 DSORG=PS,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = DSORG=PS,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/37)253                 RECFM=FT,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = RECFM=FT,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/38)254                 LRECL=80,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = LRECL=80,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/39)255                 MACRF=PM 
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = MACRF=PM
20:22:31 PROG4     AZ390 AZ390E error  29      (1/43)259                 ENDPGM  DS D
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = ENDPGM
20:22:31 PROG4     AZ390 AZ390E ERRSUM Critical Error Summary Option
20:22:31 PROG4     AZ390 AZ390E ERRSUM Fix and repeat until all nested errors resolved
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =DSORG=PS,
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =RECFM=FT,
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =LRECL=72,
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =EODAD=EOF,
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =MACRF=GM
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =LRECL=80,
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =MACRF=PM
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =ENDPGM
20:22:31 PROG4     AZ390 AZ390E ERRSUM total missing   copy   files =0
20:22:31 PROG4     AZ390 AZ390E ERRSUM total missing   macro  files =8
20:22:31 PROG4     AZ390 AZ390E ERRSUM total undefined symbols      =0
20:22:31 PROG4     AZ390 AZ390E ERRSUM total mz390 errors    = 0
20:22:31 PROG4     AZ390 AZ390E ERRSUM total az390 errors    = 10
20:22:32 PROG4     AZ390 AZ390I FID=  1 ERR=  10 c:\Program Files\Automated Software Tools\z390\CS4321\PROG4.MLC
20:22:32 PROG4     MZ390 ENDED   RC=12 SEC= 0 MEM(MB)= 47 IO=2420

        TITLE 'CS 4321 Program #4 by J. Colt Wright' 
        PRINT NOGEN    
COPY          SUBENTRY
    TITLE 'PROGRAM 4 80/80 LISTING'
    PRINT NOGEN
COPY2 SUBENTRY

    WTO 'PROG4 COPY PROG4 (ASCII) TO COPY (ASCII)'
    OPEN (INFILE,INPUT)
    OPEN (OUTFILE,OUTPUT)
    WTO 'Files opened successfully'
*
LOOP EQU *
    GET INFILE,IRECORD
    MVC ORECORD,=CL133' '
    MVC ORECORD(80),IRECORD
    PUT OUTFILE,ORECORD
    B LOOP
*
EOF EQU *
    CLOSE (INFILE,,OUTFILE)
    WTO 'PROG4 ENDED OK'
    SUBEXIT

    SUBEXIT   


INFILE  DCB     DDNAME=INFILE,                                         X
                DSORG=PS,                                              X
                RECFM=FT,                                              X
                LRECL=72,                                              X
                EODAD=EOF,                                             X
                MACRF=GM
*
OUTFILE DCB     DDNAME=OUTFILE,    
                DSORG=PS,                                              X
                RECFM=FT,                                              X
                LRECL=80,                                              X
                MACRF=PM
*
IRECORD DC    CL72' '
ORECORD DC    CL80' '
ENDPGM  DS D
 END COPY


08:39:00 PROG4     MZ390 START USING z390 V1.5.05 ON J2SE 1.6.0_26 10/09/11
08:39:00 PROG4     AZ390 AZ390E error 144      (1/15)141       MVC ORECORD,=CL133' '
08:39:00 PROG4     AZ390 AZ390I no base register found
08:39:00 PROG4     AZ390 AZ390E error  29      (1/39)258                       DSORG=PS,                                                RECFM=FT,                                                LRECL=80,                                               MACRF=PM
08:39:00 PROG4     AZ390 AZ390I ERRSUM missing macro = DSORG=PS,
08:39:00 PROG4     AZ390 AZ390E ERRSUM Critical Error Summary Option
08:39:00 PROG4     AZ390 AZ390E ERRSUM Fix and repeat until all nested errors resolved
08:39:00 PROG4     AZ390 AZ390E ERRSUM missing macro =DSORG=PS,
08:39:00 PROG4     AZ390 AZ390E ERRSUM total missing   copy   files =0
08:39:00 PROG4     AZ390 AZ390E ERRSUM total missing   macro  files =1
08:39:00 PROG4     AZ390 AZ390E ERRSUM total undefined symbols      =0
08:39:00 PROG4     AZ390 AZ390E ERRSUM total mz390 errors    = 0
08:39:00 PROG4     AZ390 AZ390E ERRSUM total az390 errors    = 2
08:39:01 PROG4     AZ390 AZ390I FID=  1 ERR=   2 c:\Program Files\Automated Software Tools\z390\CS4321\PROG4.MLC
08:39:01 PROG4     MZ390 ENDED   RC=12 SEC= 0 MEM(MB)= 47 IO=2374

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

转瞬即逝 2024-12-15 15:07:10

我不是 z390 模拟器方面的专家,但根据我对标准 z/OS 汇编器的了解,我会看一下您的连续字符(您编码的 DCB 宏调用中的“X”)。一般来说,它们应该位于第 72 列,并且后续语句应从每个连续行的第 16 列开始。

在第一个 DCB 的最后一个连续行上,我将删除 MACRF=GM 上的“X”连续字符,因为这是语句的结尾。

另外,您的 ENDPGM 标签应该位于第 1 列,否则汇编器会认为这是一个语句/宏调用

给 z/OS 汇编器一个机会 - 20 或 30 年后您会逐渐爱上它。

I'm no expert in the z390 emulator but from what I know of the standard z/OS assembler I'd take a look at your continuation characters (the 'X's in the DCB macro invocations you have coded). Generally they should be in column 72 and the continued statement should start in column 16 of each continued line.

On the last continuation line of your first DCB I'd remove 'X' continuation character on the MACRF=GM as that is the end of your statement.

Also your ENDPGM label should be in column 1 otherwise the assembler thinks it's a statement/macro invocation

Give the z/OS assembler a chance - after 20 or 30 years you'll grow to love it.

左秋 2024-12-15 15:07:10

对于缺少的宏 DSORG=PS ...那是因为 OUTFILE DCB 宏调用的第一行没有延续。宏调用从 OUTFILE DCB 运行到几行之后的 MACRF=PM,因此您需要在除最后一行之外的所有行上继续,以告诉汇编器这都是一条语句。我知道语法的东西很麻烦,但如果你坚持使用汇编器,特别是宏处理器,你会发现它有一些非常灵活和优雅的功能。

至于缺少的基址寄存器......可能是一些事情。正如我所说,我不知道模拟器,但它看起来好像在抱怨没有 ORECORD 或 =CL133' ' 文字的基址寄存器。我猜是后者。文字通常位于代码中,具体位置取决于代码中 LTORG 指令的位置或 CSECT 的末尾。我无法从列表中看出您是否有生成的 LTORG 指令(可以由 SUBENTRY 或 SUBEXIT 生成,但它们是特定于您的安装的宏/副本,所以我无法知道它们除了猜测)。但奇怪的是你有 2 个 SUBENTRY 语句和 2 个 SUBEXITS。通过猜测这些宏通常会做什么,我预计每个宏都有一个。因此,尝试取出 COPY2 SUBENTRY 和 SUBEXITS 之一,看看是否有更好的效果。如果失败,请查看是否可以使用 z390 中的某个选项获取生成的语句的完整列表(首先将 PRINT NOGEN 更改为 PRINT GEN),这可能会有所帮助。

我刚刚帮我的孩子们做完家庭作业,现在这个!祝你好运。

Well for the missing macro DSORG=PS ... that is because you don't have a continuation on first line of your OUTFILE DCB macro invocation. The macro invocation runs from the OUTFILE DCB down to the MACRF=PM a few lines later so you need a continuation on all the lines except the last to tell the assembler it is all the one statement. I know the syntax stuff is a pain in the butt but if you persist with the assembler and in particular the macro processor you will find it has some very flexible and elegant capabilities.

As for the missing base register ... could be a few things. As i said i don't know the emulator but it looks as though it is complaining about not having a base register for either the ORECORD or the =CL133' ' literal. I'm guessing it is the latter. Literals are normally located in the code based on the location of an LTORG instruction in your code or at the end of the CSECT. I can't tell from the listing you have whether there is a generated LTORG instruction or not (could be generated by the SUBENTRY or SUBEXIT but they are macro/copybooks specific to your installation so I have no way of knowing what they do other than guessing). The odd thing from looking at it though is you have 2 SUBENTRY statements and 2 SUBEXITS. From guessing what those sort of macros normally do, I would expect 1 of each. So try taking out the COPY2 SUBENTRY and one of the SUBEXITS and see if it is any better. Failing that, see if you can get a full listing of the generated statements with some option in z390 (change the PRINT NOGEN to PRINT GEN for a start) and that may help.

I just finished helping my kids with there homework and now this! Good luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文