Skip to content
Phosphoneowiki
Contents

Exit codes

In a script, the exit code says whether the run went as planned.

CodeMeaningExample
0the run went to its end--cycles reached, --stop-on-self-jmp triggered
1errorunknown option, missing file, malformed argument (--type-keys without :), --load-state refused, --neo-emu without a COSIM build
2--dump-ram-when: the condition never occurredthe program never wrote the expected value
3debugging stop with no monitor or gdb--break-at, --watch or --break-api triggered

A code 3 stop prints the registers (A, X, Y, S, P) on the error output and, for --break-api, the function and the eight parameter bytes; with --break-dump, the RAM is saved.

phosphoneo prog.neo --break-at 0805 --cycles 1000000 ; echo $?
# phosphoneo : point d'arret en $0805 (cycle 13) A=02 X=00 Y=00 S=FD P=24
# 3

Sources in the repository : src/main.c, tests/integration/test_break.sh.