Каков “ЕС” в x86 архитектуре? (вычисляет исполнительный адрес?)

Если вы хотите повторно использовать один и тот же графический интерфейс в вашем коде, он нужен вам только один раз. Используйте команду GuiControl для обновления определенных элементов управления. Например, если вам нужно очистить переменную «LoopCount» для другого набора кода, вы можете сделать что-то вроде этого:

LoopCount := 0
GuiControl ,, LoopCount , %LoopCount%
Gui , Show

Функция VarSetCapacity используется для установки объема памяти переменная может использовать. В вашем случае, даже если вы очищаете его, оно все еще существует как имя и не может использоваться для более чем одного элемента управления, поскольку AHK использует это имя как один из способов его идентификации.

Из вашего кода похоже, что вы уже понимаете, как использовать Gui , Hide и Gui , Show. Я думаю, что это действительно все, что вам нужно, чтобы выполнить то, что вы просите.

7
задан Peter Cordes 22 August 2018 в 13:47
поделиться

3 ответа

Intel's own Software Developer's Manuals are a good source of information on the x86, though they may be bit of an overkill (and are more reference-like rather than tutorial-like).

The EU (Execution Unit) reference was most likely in contrast to ALU (Arithmetic Logic Unit) which is usually the part of the processor responsible for arithmetic and logic instructions. However, the EU has (or had) some arithmetic capabilities as well, for calculating memory addresses. The x86 LEA instruction conveys these capabilities to the assembly programmer.

Normally you can supply some pretty complex memory addresses to an x86 instruction:

sub eax, [eax + ebx*4 + 0042]

and while the ALU handles the arithmetic subtraction, the EU is responsible for generating the address.

With LEA, you can use the limited address-generating capabilities for other purposes:

lea ebx, [eax + ebx*4 + 0042]

Compare with:

mul ebx, 4
add ebx, eax
add ebx, 0042

"Volume 1" on the page I've linked has a section "3.7.5" dicussing addressing modes - what kind of memory addresses you can supply to an instruction expecting a memory operand (of which LEA is one), reflecting what kind of arithmetic the EU (or whatever the memory interface part is called) is capable of.

"Volume 2" is the instruction set reference and has definitive information on all instructions, including LEA.

6
ответ дан 6 December 2019 в 19:41
поделиться

EU = Execution Unit?

Effective Address is the address that would have been accessed if the LEA instruction had been an instruction that actually performed some sort of arithmetic or other data access. Its 'intended' use is to calculate the resulting pointer from a pointer arithmetic or array indexing operation. However, because it can perform some combination of multiply and add, it's also used to optimize some regular calculations.

3
ответ дан 6 December 2019 в 19:41
поделиться

The internals of processors inside a single family have changed a lot over the years, so that "EU" reference would need to be clarified with the exact cpu model. As an analogy to your m68k experience, the instruction set for 68000, 010, 020, 030, 040 and 060 are mostly the same but their internals are really different, so any reference to an internal name needs to come with their part number.

0
ответ дан 6 December 2019 в 19:41
поделиться
Другие вопросы по тегам:

Похожие вопросы: