New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@gct256/mem-tools

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gct256/mem-tools

Tools for retro computer programing

latest
Source
npmnpm
Version
0.6.0
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

mem-tools

Tools for simulate retro computer programing with TypeScript.

Memory

  • Utility class of 64KB memory model for TypeScript.
  • Supports read, write, fill and copy.

MemoryListener

  • Listeners can receive events on memory operations.

Address & Offset & utils

  • Useful class & utility for named addresses.
  • Can be used like assembler's labels.
const FOO = new Address('FOO', 0x1234);
const BAR = new Offset('BAR', 0x12);

mem.readInt8(FOO); // read from 0x1234
mem.readInt8(FOO.offset(-0x12)); // read from 0x1234 - 0x12 = 0x1222
mem.readInt8(FOO.offset(BAR)); // read from 0x1234 + 0x12 = 0x1246

const MAP = utils.createAddressMap({
  BAR: 0x2345,
  BAZ: 0x3456,
});

mem.readInt8(MAP.BAR); // read from 0x2345
mem.readInt8(MAP.BAZ); // read from 0x3456

const WORK_MAP = utils.createAddressWorkMap(0xcb00, [
  ['QUX', 2],
  ['QUUX', 1],
  ['QUUUX', 1],
]);

mem.writeInt16(0x1234, WORK_MAP.QUX); // write to 0xcb00
mem.writeInt8(0x56, WORK_MAP.QUUX); // write to 0xcb02
mem.writeInt8(0x78, WORK_MAP.QUUUX); // write to 0xcb03
mem.fill(0, WORK_MAP.__FIRST__, WORK_MAP.__LAST__); // fill 0xcb00 - 0xcb03

formatters

  • Number formatters for 8bit/16bit decimal/dexadecimal.

FAQs

Package last updated on 28 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts