Skip to content

title: "BcdCompare" description: TRSE built-in method (from IDE help)


BcdCompare

Systems: MOS6502
Parameters: a, a, n


TRUE or FALSE = BcdCompare( [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 the first is larger than the second.

Example

var score: array[] of byte = ($12,$34,$56); // number is 563412 scorecompare: array[] of byte = ($15,$34,$56); // number is 563415 begin DefineScreen(); screenmemory := screen_char_loc; if (BcdCompare(score,scorecompare,3)) then printstring("MORE",0,4) else printstring("LESS",0,4); // Displays "LESS" on screen because the first number is less than the second