News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

some questions for you pros

Started by peedi, April 30, 2009, 04:10:19 PM

Previous topic - Next topic

peedi

True or false?

-The LEA generates the off portion of a mem address as an operand LEA DI,PROMPT

-The cpu automatically executes an error routine if there is an overflow or carry flag set

-a SUB behaves like CMP instruction except the SUB destination is not modified by the SUB

- THe DIV and MUL only have a source

- in the 8088/8086 microprocessor the BIU contains the adder

-The mov sets no condition flags since it it not an arithmetic instruction.

dedndave

well, i think with the typos, they are all false except the last one

LEA calculates the "effective address" of an operand
LEA  SI,[bx+12]
SI is loaded with the value in the BX register plus 12

the cpu does excute some error routines automatically,
but carry and overflow are natively math flags, not error flags
the carry flag is sometimes used by routines to return indication
of an error condition

"a SUB behaves like CMP instruction except the SUB destination is not modified by the SUB"
this one is misworded
the CMP instruction behaves like SUB except the destination is not modified by CMP
i.e. the condition of the flags will be the same as if a SUB instruction were used

DIV and MUL also have destinations - in 16-bit code, it is the AX and DX registers

the BIU is a "Bus Interface Unit" it holds addresses (or data), not adders
the adder which you may be refering to is part of the ALU (Arithmetic Logic Unit)

"The mov sets no condition flags since it it not an arithmetic instruction"
this is true, however an instruction need not neccessarily be an arithmetic instruction to alter flags

now, i have one for you.......
True or False
"I need someone to do my homework"

dedndave

after giving it some thought, it is possible that the BIU has some adders
for address calculation, however i have never seen diagrams of the BIU
detailed enough to show them

Vortex

Hi peedi,

Also, don't forget to check the manuals coming with the Masm32 installation :

\masm32\help -> opcodes.chm