sourcelibs/Hex1000/demos/calc.xtl

1⍝!/usr/bin/env xetal 2⍝ HEX1000 as a calculator: each line types a key sequence from reset at 3⍝ the machine running its ROM program (rom/calc.asm) and shows the 4⍝ eight-digit screen it ends with, then how many instructions it took 5⍝ (a board runs 13.5 million a second). The screens are the Radix 6⍝ library's, key for key (just demo-lib Radix session; tests/calc.xtl 7⍝ checks 33 sequences). Run with "just demo-lib Hex1000 calc". 8ʰˣ⁼u̲se< "Hex1000" 9ʰˣc̲alc "12+34=" 10ʰˣc̲alc "FF+1=" 11ʰˣc̲alc "A*B=" 12ʰˣc̲alc "C0DE+BEEF=" 13ʰˣc̲alc "5-7=" 14ʰˣc̲alc "FFFFFFFF+1=" 15ʰˣc̲alc "2*3+4=" 16ʰˣc̲alc "FFFFFFFF*FFFFFFFF=" 17ʰˣc̲ost "12+34=" 18ʰˣc̲ost "FFFFFFFF*FFFFFFFF="