Enter the Android Dalvik virtual machine Dalvik assembly Language Basics

Source: Internet
Author: User

The Dalvik virtual machine has designed a set of instruction sets for itself, and has developed its own instruction format and invocation specification. The code that consists of the Dalvik instruction set is called the Dalvik assembly code, which is called the language of the Code Dalvik Assembly (Dalvik assembly language is not a formal one, just a description of the Dalvik instruction set code).

1. Dalvik instruction Format

A Dalvik assembly code consists of a series of Dalvik directives, which are determined by the instruction's bit description and the instruction format identifier. 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. There may be a vertical line between every 4 bits "|" To represent a different content.

  • The order takes a single uppercase letter of A~z as a 4-bit opcode, op represents a 8-bit opcode.

  • “?” To indicate that all bits in this field are 0 values.

In instruction format "a| G|op BBBB f| e| d| C "For example:

There are two spaces in the middle of the instruction, each part size is 16 bits, so this instruction is made up of three 16-bit words. The first 16-bit is "a| G|op ", the high 8 bits consist of a and g, and the low byte consists of opcode op. The second 16-bit is made up of BBBB, which represents an offset value of 16 bits. The third 16-bit consists of a total of four 4-bit f,e,d,c, where they represent the register parameters.

The unfinished ... ..... .... ... .... ..... .... ..... .........., ..., ... and .....????????????????.

Enter the Android Dalvik virtual machine Dalvik assembly Language Basics

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.