|
> 1. The book says that two-operand instructions (such as mov) "must" have a "register" operand, but the book also says that you can use immediate values to store values. mov mem, imm; neither operand is a register?
The first sentence should read: The book says that instructions with two operands (such as mov) have at most one "segment register" operand. No, it's okay. So mov mem, imm; no problem.
> 2. Number of eight-bit machines with +0, -0: The original codes are: 00000000, 10000000
The inverse is: 00000000, 11111111. I can understand. Isn't the complement of negative numbers plus the sign bit plus one? Then -0 should be: 110000000 (a total of 9 digits cannot be represented by eight as a machine number). Why does the book say that the complement of -0 is 00000000 (8 bits)? In addition, the inverse of -128 is 101111111 (because it is 9 bits, the 8-bit machine code cannot represent the inverse of -128), then the complement is changed to the inverse plus one.
11000000 (also 9 digits) Why is the book equal to 10000000 (8 digits)?
0 has no positive or negative points. If you want to divide it, it should be classified as a range of positive numbers.
128 is represented as a 9-bit binary number: 1 0000 0000, so the largest positive number that 8 bits can represent is 1111 1111, and the inverse of -128 is the binary number of 128: 1 0000 0000, the result is: 0 1111 1111. Take 8 bits, that is, 1111 1111, 1111 1111 + 1 = 1 0000 000 0.8. The two's complement is the lower eight bits of 1 0000 0000, which is 0000 0000.
> 3. mov ax, [ax, bx]
What addressing method does the above instruction use for the source operand?
If you use MASM, it means that the sum of the values of the two registers AX and BX is used as the address of the memory operand, and the value in this memory address is paid to AX. It belongs to special register indirect addressing, which can also be called indexed addressing.
> 4. Do constants take up memory?
Not occupied.
> 5.mov al, c0h
add al, al
After executing the above statement, al = 80h but c0h + c0h should be equal to 180h
So is the impact on the flag bit 80h or 180h? ?
1010 0000
+1010 0000
----------
J 0100 0000
"J" represents the carry from the eighth bit to the ninth bit. After ADD AL, AL, AL = 0100 0000b, that is, 80H. Both the result and the carry generated by the operation have an effect on the flag register, so it is 180h that affects the flag bit. |
|