GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — length-disassembler/README.md at master · gh-nomad/length-disassembler

This repository was archived by the owner on Apr 6, 2020. It is now read-only.

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
30 lines (25 loc) · 847 Bytes
/

README.md

Copy path

File metadata and controls

30 lines (25 loc) · 847 Bytes
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

length-disassembler

A length disassembler for x86-32 and x86-64 written in C.

Known "issues"

  • Some invalid opcodes may not get parsed correctly.
  • There is no support for AVX and processor-specific instructions.

Interface

// address: a pointer to a buffer containing instructions.
// x86_64_mode: If true, disassembles x86-64 instructions, otherwise disasassembles x86-32 instructions.
size_t ldisasm(const void* const address, const bool x86_64_mode)

Usage

#include "ldisasm.h"

int main()
{
  char buffer[] = { 0x55, 0x8B, 0xEC, 0x53, 0x8B, 0xD9, 0x56, 0x57 };
  size_t instructionLength = ldisasm(buffer, false);
}

References

  • Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 2 (2A, 2B, 2C & 2D): Instruction Set Reference, A-Z
    • Section 2.1
    • Section 2.2.1
    • Appendix A
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.