ChatGPT could have written the requirement in PL/I, compiled and produced the Assembler listing. The Assembler generated would work, albeit incredibly wordy.
It does appear that the PUT macro was confused usage of a PL/I PUT statement. No conversion attempted to get from full word to a displayable format (CVD, UNPK). On Wed, Sep 6, 2023 at 6:06 AM Tom Marchant < [email protected]> wrote: > Nor does it know how to code instructions. > > I don't know what this should be, but it isn't adequateor correct: > >MAIN C 0 NUM1 Check if NUM1 is zero > > ZERO is not a label on code: > > BE ZERO Branch to ZERO if true > > NUM1 is not a DCB address > > GET NUM1,NUMIN Read NUM1 from input > > Wrong: > > LA 0,NUM1 Load NUM1 into register > > NUM2 is not a DCB address: > > GET NUM2,NUMIN Read NUM2 from input > > NUM1 is not a register number: > > A NUM1,NUM2 Add NUM1 and NUM2 > > ST NUM1,RESULT Store the result in RESULT > > RESULT is not a DCB address: > > PUT RESULT,NUMOUT Print the result > > -- > Tom Marchant > > On Tue, 5 Sep 2023 14:10:20 -0400, David Spiegel <[email protected]> > wrote: > > >Hi Tom, > >It looks like ChatGPT is not aware of "Housekeeping". > > > >Regards, > >David > > > >On 2023-09-05 13:47, Tom Brennan wrote: > >> GET and PUT use R14, so as Tom Marchant said, if the program managed > >> to get that far it would never return to the OS. > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > -- Wayne V. Bickerdike ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
