title: "BcdSub" description: TRSE built-in method (from IDE help)
BcdSub
Systems: MOS6502
Parameters: a, a, n
BcdSub( [address 1], [address 2], [number] );
- [address 1] - The address of the BCD number
- [address 2] - The address of the BCD number to subtract
- [number] - The length of the BCD in bytes
Description
Subtracts the second BCD number from the first.
Example
var
score: array[] of byte = ($12,$34,$56); // number is 563412
scoresub: array[] of byte = ($01,$00,$00);
begin
BcdSub( score, scoresub, 3 );
// result = 563411