# Miller-Rabin prime test (Program A) on the HP-16C CE with our extended-memory firmware.
# Run:  cargo run -- --firmware YOUR-16C-FIRMWARE.bin --test examples/prime-ext.txt
load ../samples/miller-rabin-ext-ready.16cmem
fmem = P-2 r-0139
keys 2147483647 GSB A      # 2^31 - 1
expect 1 d                 # 1 = prime
keys 561 GSB A             # 561 = 3 x 11 x 17 (a Carmichael number)
expect 0 d                 # 0 = composite
keys x<>y                  # Y = the base that proved it composite
expect 2 d
