OpC_10 1F - Nakazoto/CenturionComputer GitHub Wiki

OpCodes 0x10 ~ 0x1F

0x10: BL

Branch if Link/carry set

MORE EXPLANATION.

Example:

Text

EXPLANATION OF EXAMPLE CODE

0x11: BNL

Branch if Link/carry Not set

MORE EXPLANATION.

Example:

Text

EXPLANATION OF EXAMPLE CODE

0x12: BF

Branch if Fault set

MORE EXPLANATION.

Example:

Text

EXPLANATION OF EXAMPLE CODE

0x13: BNF

Branch if Fault Not set

MORE EXPLANATION.

Example:

Text

EXPLANATION OF EXAMPLE CODE

0x14: BZ

Branch if Zero

MORE EXPLANATION.

DELY  DLY                   ; 4.55ms delay
      DCR      Y            ; Decrement Y value
      BNZ      DELY         ; Branch if Not Zero to DELY
      RSR                   ; Return from Subroutine

This is short delay subroutine that counts down the Y value and loops back to the label DELY until the Y value reaches 0, at which point it returns from the subroutine. On each iteration it runs a check to see if Y has reached 0. If Y is anything other than 0, the BNZ operation causes it to branch/jump up to the label DELY. If Y is equal to 0, the BNZ operations allows the program to continue to the next instruction.

0x15: BNZ

Branch if Not Zero

MORE EXPLANATION.

Example:

Text

EXPLANATION OF EXAMPLE CODE

0x16: BM

Branch if Minus set

MORE EXPLANATION.

Example:

Text

EXPLANATION OF EXAMPLE CODE

0x17: BP

Branch on Positive

MORE EXPLANATION.

Example:

Text

EXPLANATION OF EXAMPLE CODE

0x18: BGZ

Branch if Greater than Zero

MORE EXPLANATION.

Example:

Text

EXPLANATION OF EXAMPLE CODE

0x19: BLE

Branch if Less than or Equal to zero

MORE EXPLANATION.

Example:

Text

EXPLANATION OF EXAMPLE CODE

0x1A: BS1

Branch is Sense switch 1 is set

MORE EXPLANATION.

Example:

Text

EXPLANATION OF EXAMPLE CODE

0x1B: BS2

Branch is Sense switch 2 is set

Example:

Text

EXPLANATION OF EXAMPLE CODE

0x1C: BS3

Branch is Sense switch 3 is set

MORE EXPLANATION.

Example:

Text

EXPLANATION OF EXAMPLE CODE

0x1D: BS4

Branch is Sense switch 4 is set

Example:

Text

EXPLANATION OF EXAMPLE CODE

0x1E: BI

TEXT

MORE EXPLANATION.

Example:

Text

EXPLANATION OF EXAMPLE CODE

0x1F: BCK

TEXT

Example:

Text

EXPLANATION OF EXAMPLE CODE