Efficient way of comparing values greater than 8bit in 6502?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
User avatar
olddb
Posts: 81
Joined: Thu Oct 26, 2017 12:29 pm
Contact:

Efficient way of comparing values greater than 8bit in 6502?

Post by olddb » Mon Nov 11, 2019 8:58 pm

Whats the most efficient way of comparing values greater than 8bit in 6502 for branch purposes?
Thank you.
...

User avatar
rainwarrior
Posts: 7673
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Efficient way of comparing values greater than 8bit in 6

Post by rainwarrior » Mon Nov 11, 2019 9:01 pm

This is my favourite reference for the topic, and I refer to it often:
http://www.6502.org/tutorials/compare_beyond.html

User avatar
olddb
Posts: 81
Joined: Thu Oct 26, 2017 12:29 pm
Contact:

Re: Efficient way of comparing values greater than 8bit in 6

Post by olddb » Mon Nov 11, 2019 9:31 pm

rainwarrior wrote:This is my favourite reference for the topic, and I refer to it often:
http://www.6502.org/tutorials/compare_beyond.html
Thank you.
This is what I was looking for:

LDA NUM1L
CMP NUM2L
LDA NUM1H
SBC NUM2H
...

Post Reply