# condition code

[System Programming] 2. Machine Control
Condition codes CPU의 register에는 앞선 게시물에서 작성했던 64-bit size의 register 외에도 single bit condition code가 존재합니다. x86-64 architecture에는 다음과 같은 4가지 condition code가 있습니다. CF: carry flag. arithmetic operation에 의해 발생하는 MSB(Most Significant Bit)의 carry/borrow out을 감지. unsigned overflow를 감지하기 위한 flag ZF: zero flag. operation의 결과가 zero인 경우를 감지. SF: sign flag. operation의 결과가 negative value인 경우를 감지. OF: overflow flag: 2's complement operation의 arithmetic operation에 의해 발생하는 overflow를 감

✨ARM Instruction Set Architecture (3)
ARM Memory Access Load-Modify-Store 이 있을 때, x의 memory address가 x에 저장되어 있다고 가정하면 ARM에서는 memory에 있는 data에 바로 access할 수 없고 반드시 register에 그 값을 load하고 결과 값을 store하는 과정을 거쳐야 한다. Load Instructions load instruction의 rt와 rs는 모두 register이다. load instruction LDR은 rs에 들어있는 memory의 주소로부터 레지스터 rt로 data를 fetch한다. Store Instructions base register rs에 들어있는 memory address로 레지스터 rt에 있는 값을 저장한다. Single Register Data Transfer LDR의 기본은 word이다. 그래서 아무것도 붙지 않은 LDR은 l