Google's chatGPT is designed to lie like a Democrat.
Posted by Izzy Weird on April 18, 2023, 1:53 pm Edited by board administrator April 18, 2023, 1:57 pm
When it doesn't have an answer, it just makes stuff up.
Folks at Google call it "Hallucinating", I call it jive-ass lying.
I asked it an obscure technical question. I know the answer because the processor instruction I asked about was one I requested be included in the microcontroller. So, in a sense JACC is "my instruction".
The description at first looks plausible, but it is actually quite incorrect.
The chatGPT session:
Me:What is a JACC instruction in a Cypress M8C microcontroller?
ChatGpt:I apologize for the confusion earlier. The JACC instruction is a jump with automatic condition code update instruction in the assembly language of the Cypress M8C microcontroller.
The JACC instruction is used to jump to a specific memory location if a particular condition is true, while also automatically updating the condition code flags in the process. The condition code flags are used to indicate the outcome of the most recent arithmetic or logical operation, and can be tested to control the flow of program execution.
The syntax for the JACC instruction in M8C assembly language is as follows:
sql JACC condition, target
Here, condition is a test that is performed on the condition code flags, and target is the address of the memory location to jump to if the condition is true. For example, the following code snippet demonstrates the use of the JACC instruction to jump to a specific memory location if the carry flag is set:
css ADD A, B ; perform some arithmetic operation JACC CY, target ; jump to target if carry flag is set
If the carry flag is set as a result of the previous ADD operation, the JACC instruction will jump to the target memory location. Otherwise, program execution will continue with the next instruction.
Here is the correct description from a Cypress M8C manual.
Description: Jump unconditionally to the address computed by the sum of the accumulator and the 12-bit address operand. The accumulator is not affected by this instruction. This instruction has a 12-bit-twoscomplement- relative-address that is added to the PC to form the jump target. In contrast, the Long Jump instruction has two operands that together form a 16-bit absolute address.
I thought I had taught it, but it's more of a Democrat than I imagined. It may NEVER learn.
I told it JACC meant Jump Accumulator but it made up this Jump AC Carry thing, total jive-ass.
I never gave it the ASM:
JACC label
but somehow/somewhere it got that correct (well, maybe it needs a comma or a tab).
What is a JACC instruction in a Cypress M8C microcontroller?
ChatGPT:
JACC is an instruction in the Cypress M8C microcontroller's instruction set. JACC stands for "Jump if AC Carry", and it is used to perform a conditional jump based on the status of the AC (Auxiliary Carry) flag in the processor's status register.
The JACC instruction is typically used in conjunction with arithmetic and logical operations that affect the AC flag. For example, after adding two values using the ADD instruction, the AC flag will be set if there is a carry out of bit 3 of the result. The JACC instruction can then be used to jump to a different part of the program based on the value of the AC flag.
The syntax for the JACC instruction in M8C assembly language is:
cssCopy code
JACC label
where "label" is the destination of the jump if the AC flag is set. If the AC flag is not set, execution continues with the next instruction in sequence.
Note that the Cypress M8C microcontroller is an older microcontroller, and newer microcontrollers from Cypress and other manufacturers may use different instruction sets and mnemonics.
If you're using a PSOC nowadays, use one with an ARM processor, and code it in C.