chapter3--into Android Dalvik virtual machine (ii)

Source: Internet
Author: User
Dalvik Assembly Language Basics

The Dalvik virtual machine designed a set of instructions for itself and developed its own instruction format and invocation specification .

The bit Description conventions are as follows:

  • Each 16-bit word is separated by a space
  • Each letter represents 4 bits, each of which begins in order from a high byte and is arranged to a low byte. A vertical line may be used between every 4 bits "|" Represents a different content.
  • The order uses a single capital letter of A~z as a 4-bit opcode, and op represents a 8-bit opcode.
  • "∅" to indicate that all bits in this field are 0 values.

With "a| G|op BBBB f| e| d| c", for example,

Instruction Middle two spaces each separate part size is 16 bits;

First 16-bit a| G|op, the high 8 bits consist of a and g, and the low byte is composed of opcode op;

The second 16-bit BBBB represents a 16-bit offset value;

The third 16 bits consist of F, E, D, and C four bytes, where they represent the register parameters .

It is not possible to determine an instruction simply by using a bit ID , which must be specified by the instruction format identifier . On page 38 of the book, it is not excerpted here.

Dex File Disassembly Tool

The current mainstream DEX executable Disassembly tool has Baksmali-dedexer. Baksmali also supports packaging disassembly code to regenerate the Dex file, which is used more broadly.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.