//- reading in -------------------------------------------------------- internal static OboeBlock loadSection(BinaryIn infile, uint secaddr, uint secsize, uint sectype) { infile.seek(secaddr); String blockname = infile.getAsciiZString(); OboeBlock block = new OboeBlock(blockname, sectype); uint blockaddr = infile.getFour(); uint blocksize = infile.getFour(); uint importaddr = infile.getFour(); uint importcount = infile.getFour(); uint exportaddr = infile.getFour(); uint exportcount = infile.getFour(); //block data infile.seek(blockaddr); block.blockdata = new List <byte>(infile.getRange(blocksize)); //import list infile.seek(importaddr); for (int i = 0; i < importcount; i++) { ImportEntry imp = ImportEntry.loadFromFile(infile); block.imports.Add(imp); } //export list infile.seek(exportaddr); for (int i = 0; i < exportcount; i++) { ExportEntry exp = ExportEntry.loadFromFile(infile); block.exports.Add(exp); } return(block); }
public static ExportEntry loadFromFile(BinaryIn infile) { string name = infile.getAsciiZString(); uint addr = infile.getFour(); ExportEntry exp = new ExportEntry(name, addr); return(exp); }
public static ImportEntry loadFromFile(BinaryIn infile) { string name = infile.getAsciiZString(); uint addr = infile.getFour(); uint b = infile.getOne(); ImportEntry imp = new ImportEntry(name, addr, (IMPORTTYPE)b); return(imp); }
internal static Section loadSection(BinaryIn infile, uint secaddr, uint secsize) { infile.seek(secaddr); String blockname = infile.getAsciiZString(); BSSBlock block = new BSSBlock(); block.bssSize = infile.getFour(); uint exportcount = infile.getFour(); //export list for (int i = 0; i < exportcount; i++) { ExportEntry exp = ExportEntry.loadFromFile(infile); block.exports.Add(exp); } return(block); }