# The x16emu the build job made on narvi-1 boots the R49 ROM (in the image # at /opt/x16rom) headless, to BASIC, and runs a program pasted in, which # prints a sum that only right arithmetic gives: the 65C02 core, VERA's # timing, the KERNAL and BASIC all working on riscv64. -echo copies what # BASIC prints to stdout. set -eu chmod +x x16emu printf '10 S=0:FOR I=1 TO 1000:S=S+I*I:NEXT\n20 PRINT "SUM";S\n' >/tmp/sum.bas SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=dummy \ ./x16emu -rom /opt/x16rom/rom.bin -bas /tmp/sum.bas -run -echo -warp >/tmp/echo.txt 2>&1 & emu=$! i=0 while ! grep -q "SUM 333833500" /tmp/echo.txt && [ $i -lt 120 ]; do sleep 1 i=$((i + 1)) done kill $emu 2>/dev/null || true tr -cd '[:print:]\n'