Motorola 68HC12B32 Instrukcja Użytkownika Strona 41

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 122
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 40
OPERATION
68EVB912B32UM/D 3-19
CALL
Call Subroutine
CALL
syntax:
CALL [<Address>]
where:
<Address> is an optional 16-bit hexadecimal number.
The CALL command is used to execute a subroutine and return to the D-Bug12 monitor program
when the final RTS of the subroutine is executed. When control is returned to D-Bug12, the
CPU register contents are displayed. All CPU registers contain the values at the time the final
RTS instruction was executed, with the exception of the program counter (PC). The PC contains
the starting address of the subroutine. If a subroutine address is not supplied on the command
line, the current value of the Program Counter (PC) is used as the starting address.
NOTE:
No user breakpoints are placed in memory before execution is
transferred to user code.
restrictions:
If the called subroutine modifies the value of the stack pointer during its execution, it must
restore the stack pointer’s original value before executing the final RTS of the called subroutine.
This restriction is required because a return address is placed on the users stack that returns to
D-Bug12 when the final RTS of the subroutine is executed. Obviously, any subroutine must
obey this restriction to execute properly.
The CALL command cannot be issued when the "R>" prompt is displayed, indicating that the
target system is already running a user program.
example:
>CALL 820
Subroutine Call Returned
PC SP X Y D = A:B CCR = SXHI NZVC
0820 0A00 057C 0000 0F:F9 1001 0000
>
Przeglądanie stron 40
1 2 ... 36 37 38 39 40 41 42 43 44 45 46 ... 121 122

Komentarze do niniejszej Instrukcji

Brak uwag