What is the main role of accumulator A? The difference between analytic accumulator a and acc

Accumulators

In a central processor, an accumulator is a register that stores intermediate results produced by calculations. If there are no registers such as accumulators, the result must be written back to memory after each calculation (addition, multiplication, shift, etc.) and may be read right away. However, the speed of accessing the main memory is slower than the access from the arithmetic logic unit to the accumulator with a direct path.

Central processor introduction

The Central Processing Unit (CPU) is one of the main devices of the electronic computer. Its function is mainly to interpret computer instructions and process data in computer software. The so-called computer programmability mainly refers to the programming of the CPU. The CPU CPU is the core part of the computer. It is only as large as a matchbox. It is as thick as a few dozen sheets of paper, but it is the computing core and control core of a computer. All operations in the computer are the CPU's responsibility for reading instructions, decoding the instructions, and executing the core components of the instructions. The CPU, internal memory, and input/output devices are the three core components of the computer.

What is the main role of accumulator A? The difference between analytic accumulator a and acc

The role of accumulator

1. In an operator, an accumulator is a register that stores an operand and result of an arithmetic or logical operation. It can add, subtract, read, shift, rotate and complement. Is the main part of the calculator.

2. In the CPU, an accumulator is a temporary register that is used to store intermediate results generated by calculations. If there are no registers like accumulators, then after each calculation (addition, multiplication, shift, etc.) the result must be written back to memory and then read back. However, accessing main memory is slower than access from the math logic unit (ALU) to the accumulator with a direct path.

3. In assembly language programs, the accumulator - AX is a very important register, but when used to save temporary data in the program, it is finally saved to other registers or memory cells to prevent other instructions During the execution of the data, the data in the data is modified so that incorrect results can be obtained, which may cause unnecessary troubles for the debugging of the program.

What is the main role of accumulator A?

The sign of the accumulator is A. As the name implies, it means plus, but it can also be a register, in addition to being an accumulator. The following two points are the main roles of the accumulator accumulator A:

1, store temporary data, such as temporary results when doing arithmetic

2, the return value of the stored function, such as WINDOWS API function, return plant is generally placed in the accumulator.

What is the main role of accumulator A? The difference between analytic accumulator a and acc

Accumulator ACC Introduction

ACC (Accumulator) is an abbreviation for Accumulator A. Accumulator A is a special-purpose binary 8-bit register that is used to store operands or results. Before the CPU performs some kind of operation, one of the two operands should normally be placed in the accumulator A. After the operation is completed, the accumulator A can obtain the operation result.

The difference between accumulator a and acc

Accumulator written A or ACC is different in 51 assembly language instructions.

ACC in the compiled machine code must have a one-byte operand, is the byte address of the accumulator E0H, A is implicit in the instruction opcode after assembly.

Therefore, in the instruction, A cannot be replaced by ACC, and the special function register A's direct addressing and the accumulator's one bit's addressing must use ACC instead of A.

For example, the instruction INC A machine code is 04H, belongs to the register addressing, written as ACC after the INC DIRECT format, the corresponding machine code is 05E0H.

Both A and ACC represent an accumulator, but A is the code of the accumulator, default is no address in the instruction, and ACC is the accumulator's direct address (OEH), which can appear anywhere in direct addressing, E.g:

What is the main role of accumulator A? The difference between analytic accumulator a and acc

Similarly, working registers R0~R7 have two different ways of writing instructions, and the generated machine code is also different, such as:

What is the main role of accumulator A? The difference between analytic accumulator a and acc

Assume that the current working register is a group of 0, the former belongs to register addressing, and the latter belongs to memory direct addressing. However, the levels of R0 and 00H are different. 00H is only a normal unit in the RAM area, and its read/write speed is much slower. The working registers are usually set inside the microcomputer, and the result of the operation can be stored in the register without having to be stored in the memory each time, which can increase the working speed of the machine. In fact, the register is also a memory, but it is the part in the CPU, the fastest.

Registers and general memory are aliased. The same unit uses different instructions and it performs different functions.

In general terms: A represents the contents of the accumulator [Register Addressing]; ACC represents the address of the accumulator [Direct Addressing].

The essence of A and ACC is the same, the corresponding address is 0E0H, but when the assembly is used, it takes two names in the format. Use a certain law:

When it wants to perform bit representation, it must use ACC, for example to write ACC.7, but not to write A.7; but when it is used as 8-bit binary number, both ACC and A can be used, but there are differences: for example, INC Both ACC and INC A can be used, as well as PUSH ACC. POP ACC cannot be written as PUSH A and POP A

In Keil C used such a command: PUSH A, assembly error, then I changed the PUSH A to PUSH ACC can pass, what is this? Is A and ACC the same register?

The so-called "A" is the default designation of accumulator A (the instruction does not occupy the operand), while PUSH and POP do not specify the accumulator by default. To access the accumulator, the direct addressing method must be used. "ACC" is the address of accumulator A. PUSH is direct addressing, followed by a direct address. You can see that the direct address of ACC in reg51.h is 0xe0; it can also be PUSH E0h; the accumulator has three representations of A, ACC, and E0H, which belong to two different addressing methods. When A is used, it is a register lookup. The address, the instruction code is 04H, when using ACC and E0H, it is direct addressing, the instruction code is 05E0H. Bit 7 of A, why do we have to use ACC.7 instead of A.7? This is related to bit addressing. There are four types of bit addresses: direct bit address; byte address plus bit number; bit name; special register plus bit number.

Why push acc must use acc, but not a, on the contrary movx @ dptr, a can only use a, but not with ac? What is the difference between acc and a? ACC is register. A is a unseparatable part of opcode. It can be used in the mov instruction. It uses 2 bytes and 1 cycle for "a" and 3 bytes and 2 cycles for "acc". Although the physical address is the same, push is a register operation and movx is an accumulator operation. Compilation results: "inc a" is "04h" running time 1 cycle; "inc acc" is "05h, e0h" running time 2 cycles. The popular explanation is: acc is a register with address E0H, and A is a standard addressless accumulator, naturally the latter is convenient, but the two are mirrored in value.

ZGAR GenkiIppai Pods 1.0

Genki Ippai 1.0 uses high-tech temperature control, food grade pod and high-quality material device. We also upgrade to type-C interface for charging faster. We have developed various flavors for Genki Ippai Pod Systems. Up to 11 flavors provide consumers with more choices. What's more, you can use other brand`s vape pen with our vape pod.

We offer low price, high quality Disposable E-Cigarette Vape Pen,Electronic Cigarettes Empty Vape Pen, E-cigarette Cartridge,Disposable Vape,E-cigarette Accessories,Disposable Vape Pen,Disposable Pod device,Vape Pods to all over the world.

GenkiIppai Pods 1.0,Pod Systems Vape And Smoke,Vape Pod System Device,Pod System Vape Kit,Pod System Mini Vape Pod

ZGAR INTERNATIONAL(HK)CO., LIMITED , https://www.zgarvape.com