Jump to content
IGNORED

New 65C02 Instruction - OP CODE 80 - 7800 Only!


Blue Azure

Recommended Posts

That's right fans, only on the 7800.

 

Have you ever noticed that all of the 6502 branch instructions end in a zero (0)? There were extras that BRK, CPX, CPY, JSR, LDY, RTI, and RTS used up. But one was missing. Until now. Finally exposed on atariage.com!!!

 

OPCODE $00 BRK Break - Force Interrupt, 1 byte, 7 cycles

OPCODE $10 BPL Branch if Positive, 2 bytes, 2 cycles

OPCODE $20 JSR Jump to Subroutine, 3 bytes, 6 cycles

OPCODE $30 BMI Branch if Minus, 2 bytes, 2 cycles

OPCODE $40 RTI Return from Interrupt, 1 byte, 6 cycles

OPCODE $50 BVC Branch if Overflow Clear, 2 bytes, 2 cycles

OPCODE $60 RTS Return from Subroutine, 1 byte, 6 cycles

OPCODE $70 BVS Branch if Overflow Set, 2 bytes, 2 cycles

 

OPCODE $90 BCC Branch if Carry Clear, 2 bytes, 2 cycles

OPCODE $A0 LDY Load Y Register immediate, 2 bytes, 2 cycles

OPCODE $B0 BCS Branch if Carry Set, 2 bytes, 2 cycles

OPCODE $C0 CPY Compare Y Register immediate, 2 bytes, 2 cycles

OPCODE $D0 BNE Branch if Not Equal, 2 bytes, 2 cycles

OPCODE $E0 CPX Compare X Register immediate, 2 bytes, 2 cycles

OPCODE $F0 BEQ Branch if Equal, 2 bytes, 2 cycles

 

HERE'S THE ONE THAT'S MISSING…

OPCODE $80 BBQ Branch if Ready to Party, 2 bytes, infinite cycles (!) This instruction runs until you stop it!

 

So what do you do with this new found instruction? Anyone who has programmed a game on the 7800 knows there's always a possible brick wall to your coding right around any corner. The former choices: (1) sleep on it and try again another day, (2) punt and cancel the game, or (3) call TEP392 and have Perry deal with it, as the 7800 insiders call it TEP-perware support, ya know Tepperware - every household should have Tepperware. Or now, we can use OP CODE 80.

 

How does OP CODE 80 work? If you have code, any code that you can't get to work, simply add OP CODE 80 and it will automatically solve the problem. You can have OP CODE 80 operate in a range, by entering $80$10 and it will diagnose and correct the 16 bytes following the BBQ (80) instruction. Or the master trick is to enter $80$00 and it will diagnose problems forever, or until you halt the process. This cutting edge technology is using the new 78XX Divide-By-Zero (DBZ) technology. Here's an example of some code with OP CODE 80 implemented:

 

MOVEDOIT:

D516---B5-A2-----LDA BALLXPOS,X ;FIRST CHECK IF THE BALL IS OUTSIDE THE BOUNDARIES OF THE SCREEN

D518---C9-18-----CMP #LEFTSIDE

D51A---90-FA-----BCC MOVEDOIT

D51C---C9-88-----CMP #RGHTSIDE ;RIGHT SIDE MINUS WIDTH OF SPRITE

D51E---B0-13-----BCS MOVEFORCEL

D520---B5-A6-----LDA BALLYPOS,X

D522---C9-C8-----CMP #BOTSIDE

D524---B0-14-----BCS MOVEFORCEV

D526---80-00-----BBQ EVERYTHING ;SOLVE ALL MY 7800 CODING PROBLEMS

D528---C9-04-----CMP #TOPSIDE + 4

D52A---90-10-----BCC MOVEFORCEV

D52C---B0-56-----BCS MOVEBALLOK

 

When this code was executed, it found that "90 FA" was wrong, and it should have been "90 10." Problem solved. Programming the 7800 has never been so easy!!!

 

How do you read these branch instructions anyways? Example "90 FA". When the number is less than zero, eg-FA you count backwards to find where the branch is jumping to. The first byte counted is FA which is count FF, the next byte backwards is 90=FE, and the next byte is 18=FD, and the next byte is C9=FC, and the next byte is A2=FB, and the final byte is B5=FA. This is where 90 FA will branch to in this code. For a positive count branch like B0 13, you count 19 (13 hex = 19 decimal) bytes beyond the B0 13. Hence you start counting at B5=01, A6=02, C9=03, etc.

 

 

Are you RDY2PARTY? Use BBQ OP CODE 80 today.

 

 

Could be Hollywood's next smash hit. OP CODE 80

  • Like 4
Link to comment
Share on other sites

Shhhhh. You can April Fools most people some of the time. For those who still believe in OP CODE 80,

this was a lot of work to hack the processor to squeeze out yet another instruction.

 

Welcome to 2nd quarter 2013. Still going strong on the 7800 developments. I have a new game coming soon.

Link to comment
Share on other sites

  • 8 years later...

in the 65C02 (the newer 6502 version from western design center) the opcode 80 is BRA which is branch always. i guess this command is only useful as a placeholder and in self modifying code. sadly they did not call the opcode BBQ (branch but quiet/quicker). in the old 6502 it was an illegal opcode with the function of NOP, right?
have someone tried the 65C02 as a kind of upgrade in the atari 7800 or 2600?

Link to comment
Share on other sites

10 hours ago, WhyLee commotari.club said:

in the 65C02 (the newer 6502 version from western design center) the opcode 80 is BRA which is branch always. i guess this command is only useful as a placeholder and in self modifying code. sadly they did not call the opcode BBQ (branch but quiet/quicker). in the old 6502 it was an illegal opcode with the function of NOP, right?
have someone tried the 65C02 as a kind of upgrade in the atari 7800 or 2600?

Op posted on April 1st,it's a joke WhyLee

Edited by JumbleJag
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...