title: "BcdIsEqual" description: TRSE built-in method (from IDE help)
BcdIsEqual
Systems: MOS6502
Parameters: a, a, n
TRUE or FALSE = BcdIsEqual( [address 1], [address 2], [number] );
- [address 1] - The address of the BCD number
- [address 2] - The address of the BCD number to compare to
- [number] - The length of the BCD in bytes
Description
Compares the two BCD numbers and returns true if both numbers are the same.
Example
var
score: array[] of byte = ($12,$34,$56); // number is 563412
scorecompare: array[] of byte = ($12,$34,$56); // number is 563412
begin
DefineScreen();
screenmemory := screen_char_loc;
if (BcdIsEqual(score,scorecompare,3)) then printstring("YES",0,2) else printstring("NO",0,1);
// Displays "YES" because both numbers are the same