Motorola MVME2600 Series User Manual Page 325

  • Download
  • Add to my manuals
  • Print
  • Page
    / 518
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 324
5
5-1
5System Calls
Introduction
This chapter describes the PPCBug System Call handler, which
allows system calls from user programs. The system calls can be
used to access selected functional routines contained within the
debugger, including input and output routines. The System Call
handler may also be used to transfer control to the debugger at the
end of a user program (refer to .RETURN on page 5-62).
In the descriptions of some input and output functions, reference is
made to the default input port or the default output port. After
power-up or reset, the default input and output port is initialized to
be port 0 (the debug port). The defaults may be changed, however,
using the .REDIR_I and .REDIR_O functions.
Invoking System Calls
The System Call handler is accessible through the SC (system call)
instruction, with exception vector $00C00 (System Call Exception).
To invoke a system call from a user program, insert the following
code into the source program. The code corresponding to the
particular system routine is specified in register R10. Parameters
are passed and returned in registers R3 to Rn, where n is less than
10.
ADDI R10,R0,$XXXX
SC
$XXXX is the 16-bit code for the system call routine, and SC is the
system call instruction (system call to the debugger). Register R10
is set to $0000XXXX.
Refer to Chapter 4 for information on using the SYSCALL system
call instruction in the One-line Assembler.
Page view 324
1 2 ... 320 321 322 323 324 325 326 327 328 329 330 ... 517 518

Comments to this Manuals

No comments