1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-28 22:30:12 +00:00

document how to return from assembly sim65 test

This commit is contained in:
bbbradsmith 2023-05-07 16:35:05 -04:00
parent 3419cbd348
commit 7f0baff792

View File

@ -126,9 +126,17 @@ a set of built-in paravirtualization functions (<ref id="paravirt-internal" name
<sect>Creating a Test in Assembly<p>
Assembly tests may similarly be assembled and linked with
<tt/--target sim6502/ or <tt/--target sim65c02/,
and the sim65 library provides an <tt/exit/ symbol that the program may <tt/JMP/
to terminate with the current A register value as an exit code.
<tt/--target sim6502/ or <tt/--target sim65c02/.
Define and export <tt/_main/ as an entry point,
and the sim65 library provides two ways to return an 8-bit exit code:
<itemize>
<item>Return from <tt/_main/ with the exit code in <tt/A/.
<item><tt/jmp exit/ with the code in <tt/A/.
</itemize>
The binary file has a 12 byte header: