A Freezepoint interrupts the running program and jumps to the DreaMon.
All registers of the I/O chips are saved so you can return to the program as nothing happened.
There are 2 types of Freezepoints which are distinguished by their way how to jump to DreaMon:
Typ | Needs | Length | Condition |
---|---|---|---|
J (JSR) | the vectors at $d3xx | 3 | I/O must be active and the Freezepoint must reside in bank 0 |
L (JSL) | nothing | 4 | none |
The memory at the position of the freezepoint is saved and replaced by the jump command. So be sure not to get hit by self modification! (See
below what to do in this case)
After the freezepoint is executed the original memory is restored. While you are in the DreaMon you see the original memory. The disassemble command
shows a little hint behind a line where a freezepoint resides.
If a freezepoint is reached, 4 things can happen:
Typ | Parameter | Action |
---|---|---|
N (Normal) | none | Springt einfach zum DreaMon |
C (Count) | n (a number from 0 to $ff) | Freezes at the (n+1)-th time (so n=0 is like 'normal') |
A (Activate) | n (a number from 0 to $ff) | activates the bits specified in n, nothing more happens |
R (Remote) | n (a number from 0 to $ff) | freezes if at least one bit from n is activated |
The default numeric system for all parameter is Hex.
Activate and remote freezepoints only work together. They are used in cases of timing critical routines or self modification where the other
types do not work.
Remote freezepoints are not written to the memory if you set them. They are just kept in mind by DreaMon until the program hits an activate
freezepoint. Now the remote freezepoint is written to the memory and can be executed! The parameter for both types is a bit mask to define which freezepoint
is activated. If an activate point with parameter $15 is hit, all remote freezepoints are written to memory which have at least bit 0, 2 or 4 set
in their parameter, e.g one with $32.
There are two ways to set a freezepoint:
While assembling or editing disassembled output
The opcode at the position where you want to freeze has to be replaced by 'zJumpTyp Aktion' and a parameter for count, activate and remote.
Example:
This is the point where you want to freeze...>00c018 ad 20 d0 lda $d020
Now you type...
>00c018 ad 20 d0 zjn;$d020
...to set a 'normal' 'JSR' type (the semicolon after 'zjn' marks the end of the line. DreaMon ignores the rest behind it)>00c018 ad 20 d0 zlc12;$d020
...to set a 'count' 'JSL' type, which freezes untill the 18. (=$12) time.
With the 'z' command.
Please take a look in the chapter manage freezepoints.