mpw/toolbox/loader.h

40 lines
691 B
C
Raw Normal View History

2013-08-16 03:35:39 +00:00
#ifndef __mpw_loader_h__
#define __mpw_loader_h__
2013-08-18 20:32:08 +00:00
#include <string>
2013-08-19 01:07:24 +00:00
#include <map>
2013-08-18 20:32:08 +00:00
2013-08-16 03:35:39 +00:00
#include <cstdint>
2016-08-09 12:17:27 +00:00
#include <macos/tool_return.h>
2013-08-16 03:35:39 +00:00
namespace Loader {
2013-08-24 03:04:23 +00:00
typedef std::map<std::string, std::pair<uint32_t, uint32_t>> DebugNameTable;
2013-08-17 23:01:43 +00:00
namespace Native {
2016-08-09 12:17:27 +00:00
using MacOS::tool_return;
/*
2013-08-17 23:01:43 +00:00
* loads the file
* sets registers PC and A5.
* sets certain globals.
*
* Dependencies: MM, RM
2013-08-17 23:01:43 +00:00
*/
2016-08-09 12:17:27 +00:00
tool_return<void> LoadFile(const std::string &path);
2013-08-17 23:01:43 +00:00
2013-08-18 20:32:08 +00:00
// scans segments for MacsBug debug names.
// associates them with the start of the segment.
2013-08-24 03:04:23 +00:00
void LoadDebugNames(DebugNameTable &table);
2013-08-18 20:32:08 +00:00
2013-08-17 23:01:43 +00:00
}
uint16_t LoadSeg(uint16_t trap);
2013-08-16 03:35:39 +00:00
uint16_t UnloadSeg(uint16_t trap);
}
#endif