I gave it this:
clear
lda #96
clearA
ldx #1024
loop
sta ,x+
cmpx #1536
bne loop
rts
…and ChatGPT gave me this:
The
clearsubroutine in this code is used to clear the screen and initialize it with a grid of green squares. The subroutine begins by loading the value96into the accumulator registerAusing theLDAinstruction. This value represents the color value for green, which will be used to fill the screen with green squares.Next, the
LDXinstruction is used to load the value1024into theXregister. This value is the memory address of the top left corner of the screen, and it will be used as the starting point for thePOKEoperations that will be used to fill the screen with green squares.The
looplabel marks the start of a loop that will be used to fill the screen with green squares. Inside the loop, theSTA ,X+instruction is used to store the value in the accumulator registerAat the memory location pointed to by theXregister, and then increment theXregister by one. This has the effect of setting the value at the current memory location to the color value for green, and then moving to the next memory location on the screen.The
CMPXinstruction is then used to compare the value in theXregister to the value1536. If theXregister is less than1536, it means that there are still memory locations on the screen that need to be filled with the color value for green. In this case, theBNEinstruction is used to branch to thelooplabel, causing the loop to be repeated and the next memory location on the screen to be filled with the color value for green.If the
– ChatGPT AIXregister is equal to1536, it means that all of the memory locations on the screen have been filled with the color value for green, and the loop can be exited. In this case, theBNEinstruction will not be executed, and theRTSinstruction will be executed, causing the subroutine to return to the main program. This completes the execution of theclearsubroutine.
Now, it may have figured some of this out because I previously fed it a longer (and fully commented) bit of 6809 code that contained that routine as one of its several functions. That’s the only way I can see it knew the screen location and a green block.
https://chat.openai.com/chat, ya’ll.

I’ll be impressed when you can send them a binary file and they completely disassemble it and comment the disassembly with fairly reasonable accuracy!
You should see some of the crazy interactions I had with it last night, posted to my Facebook page. It outright made stuff up about one of my programs, and when I called it out, it apologized and corrected itself. Wild.
I need to put together some videos of what this thing can do. It takes care and guidance, but it actually writes stuff. It turns requests in to code, that works. It’s done a few things I wouldn’t have even thought to do.
Pingback: CoCo Nation News stories for Episode 291, December 10, 2022 -