Remote-processing RPC-220 Manual de usuario Pagina 17

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 47
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 16
WRITING, DEBUGGING, AND SAVING PROGRAMS SECTION 3
Page 3-6
If the download process gets stuck, y ou can press
the < esc> key at any tim e after the download is
aborted. You can also press the reset button.
Pressing the < esc> key at any time during the
download process aborts the re ceiving process.
G GOTO Run Program
Once a program is downloaded into RAM and
breakpoints are optionally set, it is executed using
the 'G' command. T he application program has
complete control. The only w ay to stop execution is
to press the reset switch or the progr am hits a
breakpoint. Comm and syntax is:
G [address]
When GOTO is executed, r egister values from the
last break or reset are loaded first. T hen the
program is executed. This way you can stop
program execution, examine registers, and continue.
Registers may be modified before e xecuting. This is
done using the MX command. Register values are
stored beginning at the address shown when a Break
is executed. Values are stored in the same order as
they are displayed.
Using G into an interrupt section may be tricky,
depending upon its type. The problem is when
interrupts are re-enabled, it may execute the same
program you executed a break. Unless your program
is recursive, variables may be unreliable.
B Set / Clear Bre akpoint
A program may be interrupted and the contents of
certain registers displayed when a specified addr ess
is reached. Up to 8 breakpoints, numbered 0-7, are
allowed. Comm and syntax is:
B number[,address]
number is from 0 to 7. A num ber larger than 7
aborts the command. If address is 0 or left out, the
contents of RAM at the breakpoint number is
restored to its original values. This is the same as
clearing a break point.
This com mand w orks by r eplacing 3 bytes in
external RAM memory at address and r eplacing it
with a CALL to the monitor break point handler.
When a break point is encountered, interrupts are
turned off and contents of registers A, B, DPTR,
P1, P3, P SW, SP, and R0-R7 are saved and
displayed. Additionally, the address where the break
occurred is also displayed. RAM at the break point
address is not restor ed until a ' B number ' is
executed.
As a general rule, external memory is not affected
by a push button reset or break point. Thus, if your
program hangs up you may restore a break point
and replace it at a new address. The following
illustrates an example. Suppose your code begins as
8000H and you want to set break points at 8112H
and 8215H. Execute the following com mands:
B 0, 8112
B 1, 8215
G 8000
When the code at either 8112H or 8215H is reached, the
break point message is displayed.
**Break Register information at address 7FC0
A B R0 R1 R2 R3 R4 R5 R6 R7 PS SP DPTR PC
03 00 98 00 00 00 00 00 00 21 41 4F 2147 2112
Both breakpoints are still active. To continue execution
from this point you must enter:
B 0
You may then enter a new br eak point or ' G 2112' to
continue.
When a break point is set, 3 bytes from the original
program is stored in RAM. Additionally, the break
address is also stored.
When a program break is executed, certain registers and
I/O conditions are set to a known state. See "REGISTER
USAGE AND INITIALIZATION" above for more
information. You may modify these registers using the
MX comm and. Values for registers are in order as
displayed above. The star ting addre ss for the r egisters is
displayed when a break is encountered. The above
examples is 7FC0.
S Save to flash EPROM
This command is described in detail below.
Vista de pagina 16
1 2 ... 12 13 14 15 16 17 18 19 20 21 22 ... 46 47

Comentarios a estos manuales

Sin comentarios