Page 66 - 컴퓨터구조(프로그래밍 관점에서 바라보는)도서 미리보기
P. 66

278 PART 2? 하드웨어 관점에서의 컴퓨터 구조

표 7.2? Pep/8 가상 머신의 기계어 코드 표

Instr.Spec.                                                     Operation

 0000 0000                     Stop execution
 0000 0001                     Return from trap
 0000 0010                     Move SP to A
 0000 0011                     Move NZVC flags to A
 0000 010a                     Branch unconditional
 0000 011a                     Branch if less than or equal to
 0000 100a                     Branch if less than
 0000 101a                     Branch if equal to
 0000 110a                     Branch if not equal to
 0000 111a                     Branch if greater than or equal to
 0001 000a                     Branch if greater than
 0001 001a                     Branch if V
 0001 010a                     Branch if C
 0001 011a                     Call subroutine
 0001 100r                     Bitwise invert r
 0001 101r                     Negate r
 0001 110r                     Arithmetic shift left r
 0001 111r                     Arithmetic shift right r
 0010 000r                     Rotate left r
 0010 001r                     Rotate right r
 0010 01nn                     Unary no operation trap
 0010 1aaa                     Nonunary no operation trap
 0011 0aaa                     Decimal input trap
 0011 1aaa                     Decimal output trap
 0100 0aaa                     String output trap
 0100 1aaa                     Character input
 0101 0aaa                     Character output
 0101 1nnn                     Return from call with n local bytes
 0110 0aaa                     Add to stack pointer (SP)
 0110 1aaa                     Subtract from stack pointer (SP)
 0111 raaa                     Add to r
 1000 raaa                     Subtract from r
 1001 raaa                     Bitwise AND to r
 1010 raaa                     Bitwise OR to r
 1011 raaa                     Compare r
 1100 raaa                     Load r from memory
 1101 raaa                     Load byte from memory
 1110 raaa                     Store r to memory
 1111 raaa                     Store byte r to memory
   61   62   63   64   65   66   67   68   69   70   71