What to know 2 Understanding assembly program Instruction
What to know 2 Understanding assembly program Instruction cycle Instruction set RISC computer
명령어의 실행 과정 : 서브루틴(함수) 호출 명령 11 � CALL 170 7220 171 . . . 172 . . . 173 . . . 220 . . . 221 . . . 222 명령 : CALL 220 ; 220 번지의 함수 호출 0170 171 7220 0171(PC=PC+1) 9000 명령어 인출 과정 (fetch instruction) 7220 170 0171 0220 . . . 172 . . . 173 . . . 7220 . . . 221 . . . 222 9000 명령어 해독 과정 (decode instruction) 0171 명령어 실행 과정 (execute instruction) 현재 PC 값(0171)을 스택에 저 장하고, 함수의 주소 0220을 PC 에 담는다. 스택
명령어의 실행 과정 : 서브루틴(함수) 리턴 명령 12 � RET 명령 : RET ; 함수 호출한 곳으로 복귀 170 7220 171 . . . 172 . . . 173 . . . 220 . . . 221 . . . 222 0222 171 9000 0223(PC=PC+1) 9000 명령어 인출 과정 (fetch instruction) 7220 170 0223 0171 . . . 172 . . . 173 . . . 9000 . . . 220 . . . 221 . . . 222 9000 명령어 해독 과정 (decode instruction) 0171 명령어 실행 과정 (execute instruction) 스택
20
3 -주소 명령어 23 � ADD X, Y, Z ; M[X] M[Y] + M[Z] � ADD AL, BL, CL ; AL = BL + CL
실행 과정 25 Stack operations
RISC와 CISC 29 CISC (Complex Instruction Set Computer) � CPU가 instruction 실행하기 위해 여러 개의 clock이 소요되는 CPU � 다양한 길이의 instruction format � 여러 가지 명령어, 여러 가지 번지지정 모드 � Register간 연산, register-memory 연선, memory간 연산 � 2, 3개 operand � 처리 속도 향상을 위해 micro-program의 procedure/subroutine ROM에 저장
RISC(Reduced Instruction Set Computer) 30 � CISC 스타일의 단점을 개선한 CPU 스타일 � Instruction의 수를 줄임 simple hardware � 복잡한 연산 combinations of simple instructions � 처리 속도 향상 � One instruction per cycle � Register 주소지정 방식 적은 수의 간단한 주소지 정 방식 � 적은 수의 simple instruction format � 적은 전력 소모 embedded processor
- Slides: 30