Lol, how about going to chatgpt and asking the same question. So that cut and paste isn’t a factor.
Sent from Yahoo Mail for iPhone On Tuesday, September 5, 2023, 12:02 PM, David Spiegel <00000468385049d1-dmarc-requ...@listserv.ua.edu> wrote: Hi Steve, It won't. The first executable statement is missing a comma between operands. Regards, David On 2023-09-05 11:43, Steve Thompson wrote: > I doubt it will assemble. And even if it does, the results are > unpredictable, other than it will probably ABEND for one reason or > another. > > There are no DCB, OPEN, CLOSE macros while GET and PUT are being used. > > Me thinks this AI system is confusing a few different assembly > languages together. I wonder how close they came for DOS I/O. > Steve Thompson > > > > On 9/5/2023 11:20 AM, Tom Marchant wrote: >> You're right, Tom. That is not a program. Certainly not one that will >> do what it claims to do. >> >> -- Tom Marchant On Mon, 4 Sep 2023 10:42:51 -0700, Tom Brennan >> <t...@tombrennansoftware.com> wrote: >>> I can't be sure I formatted it properly, but after looking over the >>> code, I have nothing to say but WTF? 😄 >>> >>> PRINT NOGEN >>> TITLE 'Simple Addition Program' >>> ** Define storage for input numbers and result >>> * >>> NUM1 DS F First input number >>> NUM2 DS F Second input number >>> RESULT DS F Result of addition >>> ** Main program >>> * >>> MAIN C 0 NUM1 Check if NUM1 is zero >>> BE ZERO Branch to ZERO if true >>> ** Read the first number from input >>> * >>> GET NUM1,NUMIN Read NUM1 from input >>> LA 0,NUM1 Load NUM1 into register >>> ** Read the second number from input >>> * >>> GET NUM2,NUMIN Read NUM2 from input >>> A NUM1,NUM2 Add NUM1 and NUM2 >>> ST NUM1,RESULT Store the result in RESULT >>> ** Print the result >>> * >>> PUT RESULT,NUMOUT Print the result >>> ** Terminate the program >>> * >>> SR 15,15 Set return code to 0 >>> BR 14 Return to caller >>> ** Define input and output areas >>> * >>> NUMIN DC F'0' Input buffer for numbers >>> NUMOUT DC F'0' Output buffer for result >>> ZERO DC F'0' Constant zero >>> END MAIN End of program >> ---------------------------------------------------------------------- >> For IBM-MAIN subscribe / signoff / archive access instructions, >> send email tolists...@listserv.ua.edu with the message: INFO IBM-MAIN > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN