Quiet!! ChatGPT does this on purpose so it can read responses and get ASM training from us puny humans :)

On 9/5/2023 1:06 PM, Tom Marchant 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


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to