#include "riscos.h"

class SharedCLibrary : public Module
{
private:
  void LibInitAPCS_R (void);
  void LibInitAPCS_32 (void);

public:
  char *module_name;
  int version_major;
  int version_minor;
  int swi_chunk_begin;
  int swi_chunk_end;

  SharedCLibrary (void) : Module ()
  {
    module_name = "SharedCLibrary";
    version_major = 3;
    version_minor = 54;
    swi_chunk_begin = 0x80680;
    swi_chunk_end = 0x806bf;
  }
  virtual ~SharedCLibrary () {}

  unsigned int SWIChunkBegin (void) { return swi_chunk_begin; }
  unsigned int SWIChunkEnd (void) { return swi_chunk_end; }
  bool SWI (unsigned int swinum, bool xbit);
};

class SCL : public Module
{
 private:
  uint32_t dynam_code;
  char *cmd_line;

public:
  char *module_name;
  int version_major;
  int version_minor;
  int swi_chunk_begin;
  int swi_chunk_end;

  SCL (void) : Module ()
  {
    module_name = "SharedCLibrary_Impl";
    version_major = 3;
    version_minor = 54;
    swi_chunk_begin = 0xc0000;
    swi_chunk_end = 0xc0300;
  }
  virtual ~SCL () {}

  unsigned int SWIChunkBegin (void) { return swi_chunk_begin; }
  unsigned int SWIChunkEnd (void) { return swi_chunk_end; }
  bool SWI (unsigned int swinum, bool xbit);
};
