4

What is the general format of TurboGrafX processor instructions?

For example, and this is made up: one word for opcode + two words for flags + one word for every parameter listed under that instruction.

Please be specific.

  • 2
    Have you looked at the 6280 instruction set? The general format is 1 byte for the opcode, 0-6 bytes for the operand(s). – Kelvin Sherlock Oct 17 '18 at 2:40
  • Does the TurboGrafX modified version have any noticeable differences? – Jack Kasbrack Oct 17 '18 at 20:55
  • 1
    The flags are not part of the instruction, they are found in the P register, and the current value of this when the instruction is executed may alter the behavior of the instruction. Various instructions may set or read some of the flags. For example, SED and CLD clear the "decimal" flag, which decides whether a later ADC instruction will work in binary or BCD mode. – user3570736 Oct 20 '18 at 17:40
  • 1
    (sorry, should have said SED and CLD set or clear the D ("decimal") flag respectively) – user3570736 Oct 21 '18 at 17:08
  • 1
    post your comment as an answer, and I'll accept it. – Jack Kasbrack Oct 22 '18 at 1:30
4

The HuC6280 used an instruction set and architecture which was largely identical to the 65C02 -- each instruction is represented by a one-byte opcode, followed by up to three bytes of immediate data. The amount of immediate data is implied by the opcode.

(The flags are a CPU register, not part of an instruction.)

The HuC6280 appears to support all instructions which existed on the 65C02, plus some additional instructions. Some of these instructions are specific to the PC-Engine hardware, while others are more general-purpose:

  • BSR: A form of JSR which uses a relative address.

  • CLA, CLX, CLY: One-byte instructions to set specific registers to zero.

  • CSH, CSL: Instructions to change the speed of the processor.

  • SAX, SAY, SXY: Swap values between the A, X, and Y registers.

  • SET: Acts as a prefix, causing the next instruction to use (X) -- that is, a zero-page memory value -- instead of A.

  • ST0, ST1, ST2: Store immediate values to VDC control registers.

  • TAM, TMA: Store and retrieve values to/from memory mapper registers.

  • TIA, TDD, TIN, TII: Control memory-move operations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.