•  Back 
  •  mec0 (MPS) interface 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File12.2.1.2  mps_base.def                                             TOS

// Tab size: 3

// Last change:  15.08.96
// Author:   FS

// ------------------------------------------------------------------------------
//
// The MagiC PC programmer's interface
//
// mps_base.h: Basic include     !! ADOPT UNALTERED !!
//                               =====================

#ifdef __cplusplus
   extern "C" {
#endif

/* =========================================================================
   The DLL functions freely definable by the user have the form:
   void mps_function(MPS_motregs *r),
   where r represents a pointer to the 16 Motorola registers, so:
*/
   typedef struct {                 // MPS_motregs = The Motorola registers
     long d0,d1,d2,d3,d4,d5,d6,d7;
     long a0,a1,a2,a3,a4,a5,a6,a7;
     } MPS_motregs;
                                    // MPS_fuptr = Pointer to a MPS_function:
   typedef void (*MPS_fuptr)(MPS_motregs *);


/* ======================================================================
   The DLL basic function mps_info is passed the following info block
   MPS_infostr:
*/
   typedef struct {
     DWORD sizeof_str;           // Size of MPS_infostr
     DWORD magic_version;        // e.g. 0x010001
     DWORD magic_date;           // e.g. 19960815  (ascending)
     BYTE  is_demo;              // Is it a demo-version?
     BYTE  uu1, uu2, uu3;        // Still unused, 0

     BYTE *(*intel_adr)(DWORD motadr); // Convert address Motorola -> Intel
     BYTE *(*intel_ptr)(DWORD motptr); // Convert pointer Motorola -> Intel (NULL stays NULL!)

     WORD (*swap_word)(WORD w);           // Swap one WORD
     DWORD (*swap_long)(DWORD dw);        // Swap one LONGword
     } MPS_magicinfo;

// =============== 3 basic functions to be exported: ==================
//
   int mps_get_type();                                                        // @@101
   int mps_get_functionlist(DWORD *mps_dll_id,MPS_fuptr **p_functionslist);   // @@102
   void mps_magicinfo(MPS_magicinfo *is);                                     // @@103
//
// See also mps_base.cpp, mps_base.def


#ifdef __cplusplus
   }
#endif

See also: MagiC PC interface