mirror of
https://github.com/specht/champ.git
synced 2024-11-22 05:31:37 +00:00
documentation
This commit is contained in:
parent
e2d99bcca0
commit
21fe0f60c9
16
README.md
16
README.md
@ -36,6 +36,22 @@ We specified some source files (which will get compiled automatically) and some
|
||||
|
||||
Furthermore, we can disable subroutines by replacing the first opcode with a RTS (`instant_rts`). This is necessary in some cases because Champ does not emulate hardware and thus can not load data from disk, for example.
|
||||
|
||||
### Defining watches
|
||||
|
||||
You can watch registers or variables at certain program counter addresses by inserting a _champ directive_ in a comment after the respective code line in your assembler source code. All champ directives start with an _at sign_ (@). Here's an example:
|
||||
|
||||
```
|
||||
LDA #2 ; load 2 into accumulator
|
||||
ASL ; multiply by two
|
||||
STA SOMEWHERE ; store result @Au
|
||||
```
|
||||
|
||||
With the `@Au` directive, we tell champ to monitor the A register and interpret it as an unsigned 8 bit integer (likewise, `@As` would treat the value as a signed 8 bit integer).
|
||||
|
||||
By default, all champ values get recorded before the operation has been executed. To get the value after the operation, you can write: `@Au(post)`.
|
||||
|
||||
### Running the profiler
|
||||
|
||||
To start champ, type:
|
||||
|
||||
```
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 126 KiB |
@ -1,5 +1,5 @@
|
||||
load:
|
||||
0x6000: plot3d/plot3d242c.s
|
||||
0x6000: plot3d/plot3d242.s
|
||||
0x1200: plot3d/multtab.s
|
||||
0x8400: plot3d/ldrwtab.s
|
||||
0x8900: plot3d/SINETABLE
|
||||
|
Loading…
Reference in New Issue
Block a user