==========================================================================================

ASSEMBLY

==========================================================================================


<ASSEMBLY>


=최적화( 빠르게)

=2의 보수


=메모리 (RAM)


=CPU 

-명령어


=I/O Mapped Memory ( ARM, AVR ) = 레지스터 ( 숫자 임)

=I/O Mapped I/O ( 인텔 ) => C로 불가능 => 어셈블리로 가능


-이름 필요(EAXEBX, ECX, EDX) - Data Register / General Registers / accumulator ( 데이터를 저장하기만 함 - 이펙트(led on등) 없음)


-EAX - ACCUMULATOR ( 계산에 특화 )








union Reg

{

        int EAX;        // 4 Bytes

        short AX;       // 2 Bytes

        char AH;       // 1 Byte

        char AL;       // 1 Byte

}



=286 까지 AX => 386부터 EAX (extended)




=ESI, EDI : Index Register ( Source, Destination ) : COPY


=ESP, EBP : Pointer (Stack, Base)


=SEGMENT (영역)

-CS ( 코드영역 )

-DS ( 전역 변수)

-ES 

-FS (FLAG)

-GS

-SS


=EIP : Instruction Pointer ( PC :Program Counter )


=EFLAGS : Flag Register







(2Byte : word)







=compiler + source editor + debuger => IDE( Intergraed Development Environment 통합개발환경 : 비주얼 스튜디오)


=니모닉 : 명령어 (reg)(,)(reg)(,)(reg) (; 주석)

-

add eax, 158

=> eax = eax + 158;


-

add eax, 158           :어셈블러

05 00 00 00 9E        : 기계어

EIP



'2015 스마트 콘트롤러 > 업무일지' 카테고리의 다른 글

20150819  (0) 2015.08.19
20150818  (0) 2015.08.19
20150814  (0) 2015.08.17
20150813  (0) 2015.08.13
20150812  (0) 2015.08.13
Posted by ahj333
,