base:16-bit_comparison
Differences
This shows you the differences between two versions of the page.
Next revisionBoth sides next revision | |||
base:16-bit_comparison [2020-10-22 20:30] – created tww | base:16-bit_comparison [2020-10-24 00:06] – verz | ||
---|---|---|---|
Line 42: | Line 42: | ||
+ | Different approach: instead of setting flags, goes to different destinations: | ||
+ | < | ||
+ | ; Val1 ≥ Val2 ? | ||
+ | LDA Val1 +1 ; high bytes | ||
+ | CMP Val2+1 | ||
+ | BCC LsThan | ||
+ | BNE GrtEqu | ||
+ | LDA Val1 ; low bytes | ||
+ | CMP Val2 | ||
+ | ;BEQ Equal ; Val1 = Val2 | ||
+ | BCS GrtEqu | ||
+ | LsThan | ||
+ | ... | ||
+ | GrtEqu | ||
+ | ... | ||
+ | </ | ||
base/16-bit_comparison.txt · Last modified: 2021-09-13 17:23 by tww