1# In assembler, what is a register?

2# Which is the destination?
(A) EAX
(B) ECX
(C) EDI
(D) ESI
(E) AL
(F) CX

3# Which is the source?
(A) EAX
(B) ECX
(C) EDI
(D) ESI
(E) AL
(F) CX

4# Hows the C++ and Pascal syntax are similar?

5# What are some diffrences between TASM and C++?

6) What are some diffrences between MASM and C++?

7) Hows MASM and C++ syntax are similar?

Thanks
Posted on 2002-02-06 16:19:59 by asm guy
Originally posted by asm guy
1# In assembler, what is a register?
A register is a storage location internal to the CPU.
2# Which is the destination?
(A) EAX
(B) ECX
(C) EDI
(D) ESI
(E) AL
(F) CX
The destination is usually the one in the left. ;)
3# Which is the source?
(A) EAX
(B) ECX
(C) EDI
(D) ESI
(E) AL
(F) CX
The source is usually the one on the right. ;)
4# Hows the C++ and Pascal syntax are similar?
(And how is this related to ASM?)
5# What are some diffrences between TASM and C++?
6) What are some diffrences between MASM and C++?
7) Hows MASM and C++ syntax are similar?
You should have followed along in class - these would be easier to answer. Where do you go to school? Just curious - really, I don't care about telling your professor - he already knows from your work. ;)
Posted on 2002-02-06 16:43:27 by bitRAKE
I think a comprehensive answer would be the size of Encyclopaedia Brittanica so I will have a go at the register questions.

Without getting into the guts of a processor and counting transistors and capacitors, a register is a special or dedicated piece of memory that is designed to be accessed by inbuilt instructions at very high speed. The alternative in an x86 processor is normal memory which is more flexible but slower.

The registers mentioned and all of the rest can be BOTH source and destination.


mov eax, ebx ; ebx is the source, eax the destination

mov ebx, eax ; eax is the source, ebx the destination

You can normally use EAX EBX ECX EDX ESI and EDI.
In some circumstances you can use EBP if there is no LOCAL values in a proc but you would not normally use ESP as it contains the stack reference.

EAX EBX ECX and EDX can be split into 16 bit and 8 bit registers,

EAX = 32 bit
AX = 16 bit
AL and AH are 8 bit registers.

EBX ECX and EDX work the same.

ESI and EDI can only be split into 16 bit registers,

ESI = 32 bit
SI = 16 bit

Regards,

hutch@movsd.com
Posted on 2002-02-06 16:51:27 by hutch--