-
Again, it's 1101000000
CPU It doesn't matter if you're a memory unit or a register.
He just cares that if there is a request signal, the CPU first determines whether it is a deposit or a retrieval, and then the CPU makes a decent action.
-
Consideration must be given to whether the CPU supports the desired addressing method and the limitations when using that addressing method.
In your case, in order to access result[4], 8086 supports variable address addressing through registers such as BX, SI, DI, etc., cx is not in these registers and therefore cannot generate instructions, so you must copy the number in cx to e.g. bx and access it through bx.
mov bl,cl ;Copy CL to BL
xor bh,bh ;BH clears.
mov al,result [bx+2] ;al=result[4] and on CPUs such as 80386, all 32-bit general-purpose registers can be used directly as address change registers, and this is the case:
and ecx,0ffh ;Zeros out the bits in the ECX except for CL.
mov al,result [ecx+2] In general, this method is the simplest way, and it can also be achieved by other methods such as xlat and other instructions, please draw inferences from the development ideas.
-
Different chips and manufacturers' products, and even the same manufacturer but different models may have different addressing methods available, less than three or five, more than ten kinds, so you have to be specific to a fixed model to answer your question, and therefore, it is best for you to check the manufacturer's information about the sand number, which is the most real.
-
Immediate Addressing, Register Addressing, Direct Addressing, Indirect Addressing of Registers, Relative Register Addressing, Base + Variable Addressing, Relative Base + Variable Addressing.
-
1.Put 0ABH directly into ax register 2Put the bx register data directly into ax register 3
The default addressing method is to put the segment address 2000H (DS register) into AX register 4Specify the addressing method, and put the data with the contents of the BX register as the segment address and the SI register as the offset address into the AX register. The segment address plus the offset address equals the physical address, column:
The segment address 2000h is equal to 20000h plus the offset address 0001h is equal to the physical address 20001h. I forgot specifically, you can take a look at Wang Shuang's book, which has some in it.
-
1, mov ax, oabh immediate addressing mode, 0abh directly placed in **.
2, MOV AX, BX register addressing mode, 1100H is placed in BX, directly sent AX, no need to access memory to get operands.
3, MOV AX, [100H] direct addressing mode, the operand is placed in the physical memory of DS*10H+100H, that is, 20100H, and AX is sent
4, MOV AX, Val direct addressing mode, the operand is placed in the physical memory starting from DS*10H+3000H, that is, 23000H, send AX
5,MOV AX,[BX][SI] Base address address change address addressing mode, bx is the base address register, si is the address change register, the operand is placed in the physical memory of DS*10H+1100H+1000H, that is, 22100H, send AX
-
1,mov ax,oabh
Immediate address, physical address = none.
2, mov ax,bx
Register addressed, physical address = none.
3,mov ax,[100h]
Direct addressing, physical address = 20100h
4,mov ax,val
Direct addressing, physical address = 23000h
5,mov ax,[bx][si]
Base address variable address addressing, physical address = 22100h
-
Examples of seven addressing methods are:
1. Immediate addressing method:
Command: MOV AX, 1234h
Then: ax = 1234h
2. Register addressing method:
For 16-bit operands, the registers can be: AX, BX, CX, DX, SI, DI, SP, BP, etc.
3. Direct addressing method:
mov ax,[8054]
For example, (ds) = 2000 hours, the execution result is (ax) = 3050 hours
4. Register indirect addressing method:
mov ax,[si]
If (ds) = 5000h (si) = 1234h
then physical address = 50000 + 1234 = 51234h
After the instruction is executed, (ax) = 6789h
5. Relative addressing method of registers:
mov ax,[di+1223h]
Suppose that (ds) = 5000h and (di) = 3678h
then physical address = 50000 + 3678 + 1233 = 5489bh
After executing this instruction, ax = 55AAH
6. Base address plus variable address addressing method:
mov ax,[bx][di]
7. Relative base address plus variable address addressing method:
mov ax,[bx+di-2]
Suppose, (ds) = 5000h, (bx) = 1223h, di = 54h, (51275) = 54h, (51276) = 76h
Physical address = 50000 + 1223 + 0054 + FFFE (-2 each digit is unpaired and the last digit is added to one) = 51275h
After executing the instruction (ax) =7654h
-
1,movax,oabh
Immediate addressing mode, 0abh is placed directly in **.
2,movax,bx
In register addressing mode, 1100h is placed in bx, and ax is sent directly, and there is no need to access memory to obtain operands.
3,movax,[100h]
In direct addressing mode, the operand is placed in the physical memory starting from DS*10H+100H, that is, 20100H, and AX is sent
4,movax,val
In direct addressing mode, the operand is placed in the physical memory starting from DS*10H+3000H, that is, 23000H, and AX is sent
5,movax,[bx][si]
In the base address address addressing mode, bx is the base address register, si is the address change register, and the operand is placed in the physical memory starting from ds*10h+1100h+1000h, that is, 22100h, and sends ax
-
(10600h) = 33h, (10601h) = 44h, teleported to ax.
Low byte (10600h) = 33h, sent to al;
High byte (10601h) = 44h, sent to AH.
ax (i.e. ah al) 4433h, right.
Question 6 of MOV AX, [BX+SI+2] How to calculate the ax of this thing.
Same as the analysis method above.
-
1. Direct addressing.
The operand to be ordered by the instruction is stored in memory, and the valid address of the operand is directly given in the instruction, which is a direct addressing method.
In normal cases, operands are stored in data segments, so their physical addresses will be directly formed from the data segment registers DS and the valid address given in the instructions, but if the segment is used to override the prefix, then the operands can be stored in other segments.
e.g. movbx, [1234h].
2. Register indirect addressing.
The operand is in memory, and the valid address of the operand is specified by one of the four registers of SI, DI, BX, and BP, which is called register indirect addressing.
In the case of not using the segment override prefix, the following provisions apply:
If a valid address is specified by one of si, di, and bx, the default segment register is ds;
e.g. movbx, [di].
-
Hehe, I can help you out.
1 The problem on the right side of your interface circuit diagram is that A13 is duplicated, i.e. A19 A13 has made the chip address of the memory.
It can no longer be used as a selection line for memory on-chip cells.
You can change the address of the memory to A12 A0
In addition, the output of the decoder, Y2, can be directly connected to the chip selection signal of the memory, CS is connected to an additional AND gate, which is not only useless.
Instead, it will cause confusion in the address range.
To divide the address into 2 parts, the low-level address line serves as the selection line for the on-chip memory cell of the memory such as a12 a0
They are the first storage unit that varies from 0 0000 0000 0000 to the first storage unit.
0 0000 0000 0001 Select the next storage unit.
1 1111 1111 1111 Select the last storage unit.
The remaining high-bit addresses are fixed and selected by an address decoder (e.g., 4ls138), i.e., a19, a13
For Y2 to be valid and the memory chip is selected, then A19A18 must be high and A17A16 must be low.
a15a14a13=010
i.e. a19a18 a17a16a15a14a13 =1100010 for film selection.
Assembly language can be said to be machine language, and what deals directly with hardware is to transform computer language into 1001 that machines can recognize. It's not going to go out of style, at least not for this decade. It's mostly about the hardware side though. >>>More
MOV AX, 1000H Give 1000H to AX
MOV DS,AX Because the data cannot be directly given to the segment register, the data needs to be assigned to the general-purpose register AX first, and then the general-purpose register AX is assigned to the segment register DS >>>More
There are several books on the market called "IBM-PC Assembly Language Programming". >>>More
The latter instruction is div bx, indicating that you are doing 16-bit division, then the default dividend is [dx,ax], where dx is the higher 16 bits of the dividend, ax is the lower 16 bits of the dividend, and in fact your dividend is only stored in ax, then the high position of the dividend should be cleared to zero, for example, if you want to calculate 72 8, but the dividend must be 4 digits, so should your dividend be written as 0072? >>>More
As long as you don't develop hardware drivers, then Xuexue 8086 assembly is enough. The main purpose of learning compilation is to make you understand how the underlying computer works. It's not really about making it so that everyone can learn to program with it.