- REG Y: Positive integer N
- REG X: Positive integer M
- REG T: N
- REG Z: M
- REG Y: GCD (Greatest common divisor)
- REG X: LCM (Least common multiple)
LCMGCD - Rev.1.0 : Jan. 20 2012
00 { 27-Byte Prgm } 01>LBL "LCM" 02 RCL ST Y 03 RCL ST Y 04>LBL 00 05 MOD 06 LASTX 07 X<>Y 08 X≠0? 09 GTO 00 10 + 11 R↑ 12 RCL× ST Z 13 RCL÷ ST Y 14 RTN 15 .END.