Exit codes
In a script, the exit code says whether the run went as planned.
| Code | Meaning | Example |
|---|---|---|
| 0 | the run went to its end | --cycles reached, --stop-on-self-jmp triggered |
| 1 | error | unknown option, missing file, malformed argument (--type-keys without :), --load-state refused, --neo-emu without a COSIM build |
| 2 | --dump-ram-when: the condition never occurred | the program never wrote the expected value |
| 3 | debugging 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