Computer/CPU

INTEL 8080 [INTEL / 1974]

AI_CAT 2024. 9. 20. 01:40
728x90
반응형

INTEL 8080

인텔 8080("에이티-에이티")는 인텔이 설계하고 제조한 두 번째 8비트 마이크로프로세서이다. 1974년 4월에 처음 등장했으며, 이전의 8008 디자인을 확장하고 개선한 변형이지만 이진 호환성은 없다. 초기 지정된 클럭 속도 또는 주파수 한도는 2 MHz였으며, 일반적인 명령어는 4, 5, 7, 10 또는 11 클럭 사이클을 사용한다. 결과적으로 프로세서는 초당 수십만 개의 명령어를 실행할 수 있다. 이후 3.125 MHz와 2.63 MHz의 클럭 주파수 한도를 가진 두 가지 더 빠른 변형인 8080A-1과 8080A-2가 출시되었다. 8080은 대부분의 응용 프로그램에서 작동하기 위해 i8224 클럭 생성기/드라이버와 i8228 버스 컨트롤러라는 두 개의 지원 칩이 필요하다. 8080은 비포화형 증강 모드 트랜지스터를 부하로 사용하는 N형 금속 산화물 반도체 논리(NMOS)로 구현되어 +12 V와 -5 V 전압이 필요하며, 주 트랜지스터-트랜지스터 논리(TTL) 호환 +5 V 전압도 필요하다.

이전의 마이크로프로세서는 계산기, 현금 등록기, 컴퓨터 터미널, 산업용 로봇 등 대량 생산 장치에 일반적으로 사용되었지만, 8080은 더 넓은 응용 분야에서 더 큰 성공을 거두었으며, 마이크로컴퓨터 산업의 시작을 크게 기여한 것으로 평가된다. 여러 요인이 8080의 인기에 기여했다. 40핀 패키지는 18핀 8008보다 인터페이스가 더 쉬웠고, 데이터 버스도 더 효율적이었다. NMOS 구현은 PMOS 8008보다 더 빠른 트랜지스터를 제공했으며, TTL 호환성을 통해 인터페이스를 단순화했다. 더 다양한 지원 칩이 제공되었고, 명령어 세트가 8008보다 향상되었다. 16비트 주소 버스(8008의 14비트 주소 버스에 비해)는 64 KB의 메모리에 접근할 수 있게 하여 8008의 16 KB 범위보다 네 배 더 많은 메모리를 사용할 수 있게 했다. 8080은 Altair 8800 및 이후의 S-100 버스 개인용 컴퓨터에 사용되었으며, 이후 Z80으로 대체되었다. 또한 Gary Kildall이 개발한 CP/M 운영 체제의 원래 대상 CPU였다.

8080은 이후 x86 아키텍처에 직접적인 영향을 미쳤다. 인텔은 8086을 설계할 때 8080의 어셈블리 언어와 유사하게 만들어 대부분의 명령어가 직접 매핑되도록 하여 8080 어셈블리 코드를 8086에서 실행할 수 있도록 했다.

 역사
마이크로프로세서 고객들은 단일 주소 지정 모드, 낮은 클럭 속도, 낮은 핀 수, 작은 온칩 스택과 같은 제한 사항 때문에 8008을 채택하는 데 주저했다. 8080에 대한 여러 가지 설계 제안이 있었으며, 8008에 스택 명령어를 추가하는 것부터 이전의 모든 인텔 아키텍처와 완전히 다른 설계까지 다양했다. 최종 설계는 이러한 제안들 사이의 타협이었다.

8080 아키텍처의 창시자인 Federico Faggin은 1972년 초에 인텔 경영진에게 칩을 제안하고 구현을 추진했다. 그는 9개월 후 개발 허가를 받았다. Faggin은 1972년 11월 일본에서 4004의 논리 설계를 도운 Masatoshi Shima를 고용했다. Shima는 Faggin의 지시에 따라 4000 시리즈와 8008을 위해 Faggin이 만든 실리콘 게이트를 사용한 랜덤 논리 설계 방법론을 사용하여 상세 설계를 수행했다.

8080은 더 많은 고객을 위한 범용 마이크로프로세서로 명시적으로 설계되었다. 개발 노력의 많은 부분은 8008의 보조 칩 기능을 하나의 패키지에 통합하려는 시도에 집중되었다. 8080은 8008과 이진 호환되지 않도록 초기 개발 단계에서 결정되었으며, 대신 트랜스파일러를 통해 실행된 후 소스 호환성을 선택하여 새로운 소프트웨어가 8008과 동일한 제한을 받지 않도록 했다. 같은 이유로, 스택 기반 루틴과 인터럽트의 기능을 확장하기 위해 스택을 외부 메모리로 이동했다. 메인프레임 시스템에서 프로그래머가 범용 레지스터를 전문적으로 사용하는 것을 주목한 Faggin은 Shima 및 Stanley Mazor와 함께 8080의 레지스터를 전문화하기로 결정했으며, 레지스터 쌍이 다른 용도를 가지도록 했다. 이는 엔지니어들이 트랜지스터를 다른 용도로 더 효과적으로 사용할 수 있게 했다.

Shima는 1973년 8월에 레이아웃을 완료했다. NMOS 제조 규정 후, 8080의 프로토타입은 1974년 1월에 완성되었다. 표준 TTL 장치로 구동할 때 높은 전류가 좁은 라인으로 흐르기 때문에 접지 전압이 증가하는 결함이 있었다. 인텔은 판매 부서의 지시에 따라 8080의 40,000개 유닛을 이미 생산했으며, Shima가 프로토타입을 특성화하기 전에 LS TTL 장치가 필요하다고 발표했다. 8080A는 이 결함을 수정했다.

인텔은 8080용 명령어 세트 시뮬레이터인 INTERP/80을 제공했으며, 이는 Gary Kildall이 인텔의 컨설턴트로 일하면서 FORTRAN IV로 작성했다.

 설명
 프로그래밍 모델
인텔 8080은 8008의 후속 제품이다. 8008과 동일한 기본 명령어 세트와 레지스터 모델을 사용하지만, 소스 코드 호환성이나 이진 코드 호환성은 없다. 8008의 모든 명령어는 8080에서 동등한 명령어를 가지고 있다. 8080은 명령어 세트에 16비트 연산을 추가했다. 8008은 HL 레지스터 쌍을 사용하여 14비트 메모리 공간에 간접적으로 접근해야 했지만, 8080은 전체 16비트 메모리 공간에 직접 접근할 수 있는 주소 지정 모드를 추가했다. 8008의 내부 7단계 푸시다운 호출 스택은 전용 16비트 스택 포인터(SP) 레지스터로 대체되었다. 8080의 40핀 DIP 패키징은 16비트 주소 버스와 8비트 데이터 버스를 제공하여 64 KiB(216 바이트)의 메모리에 접근할 수 있게 한다.

 레지스터
프로세서에는 7개의 8비트 레지스터(A, B, C, D, E, H, L)가 있으며, A는 주요 8비트 누산기이다. 다른 6개의 레지스터는 특정 명령어에 따라 개별 8비트 레지스터 또는 3개의 16비트 레지스터 쌍(BC, DE, HL, 인텔 문서에서는 B, D, H로 언급됨)으로 사용할 수 있다. 일부 명령어는 HL 레지스터 쌍을 제한된 16비트 누산기로 사용할 수 있게 한다. HL이 가리키는 메모리 위치를 참조하는 가상 레지스터 M은 다른 레지스터가 사용될 수 있는 거의 모든 곳에서 사용할 수 있다. 8080은 8008의 내부 스택을 대체하는 16비트 스택 포인터와 16비트 프로그램 카운터를 가지고 있다.

 플래그
프로세서는 산술 및 논리 명령어의 결과를 나타내는 내부 플래그 비트(상태 레지스터)를 유지한다. 특정 명령어만 플래그에 영향을 미친다. 플래그는 다음과 같다:

- 부호(S): 결과가 음수일 때 설정된다.
- 제로(Z): 결과가 0일 때 설정된다.
- 패리티(P): 결과의 1 비트 수가 짝수일 때 설정된다.
- 캐리(C): 마지막 덧셈 연산에서 캐리가 발생했거나 마지막 뺄셈 연산에서 차용이 필요할 때 설정된다.
- 보조 캐리(AC 또는 H): 이진 코드화된 십진수 산술(BCD)에 사용된다.

캐리 비트는 특정 명령어에 의해 설정되거나 보완될 수 있다. 조건부 분기 명령어는 다양한 플래그 상태 비트를 테스트한다. 누산기와 플래그를 합쳐 PSW(프로그램 상태 워드)라고 한다. PSW는 스택에 푸시되거나 스택에서 팝될 수 있다.

 명령어
다른 많은 8비트 프로세서와 마찬가지로, 모든 명령어는 한 바이트로 인코딩된다(레지스터 번호 포함, 즉시 데이터 제외). 일부 명령어는 즉시 피연산자, 메모리 주소 또는 포트 번호가 될 수 있는 한두 바이트의 데이터를 따를 수 있다. 더 고급 프로세서와 마찬가지로, 다중 레벨 프로시저 호출 및 반환을 위한 자동 CALL 및 RET 명령어(분기처럼 조건부로 실행될 수 있음)와 기계 스택에서 16비트 레지스터 쌍을 저장하고 복원하는 명령어가 있다. 고정 주소 00h, 08h, 10h, ..., 38h에서 서브루틴을 위한 8개의 한 바이트 호출 명령어(RST)가 있다. 이는 외부 하드웨어에 의해 제공되어 해당 인터럽트 서비스 루틴을 호출하기 위한 것이지만, 종종 빠른 시스템 호출로 사용된다. 가장 느리게 실행되는 명령어는 XTHL로, 스택 포인터가 가리키는 주소에 저장된 값과 HL 레지스터 쌍을 교환하는 데 사용된다.

 8비트 명령어
두 피연산자가 있는 모든 8비트 연산은 8비트 누산기(A 레지스터)에서만 수행할 수 있다. 다른 피연산자는 즉시 값, 다른 8비트 레지스터 또는 16비트 레지스터 쌍 HL이 주소 지정한 메모리 바이트일 수 있다. 증감 연산은 모든 8비트 레지스터 또는 HL이 주소 지정한 메모리 바이트에서 수행할 수 있다. 직접 복사는 모든 두 8비트 레지스터 간 및 모든 8비트 레지스터와 HL이 주소 지정한 메모리 바이트 간에 지원된다. MOV 명령어의 체계적인 인코딩으로 인해(사용 가능한 오피코드 공간의 4분의 1 사용), 레지스터를 자체로 복사하는 중복 코드(MOV B,B 등)가 있으며, 이는 지연 외에는 거의 사용되지 않는다. 그러나 MOV M,M의 체계적인 오피코드는 대신 외부 리셋 또는 인터럽트가 발생할 때까지 실행을 중지하는 HLT 명령어를 인코딩하는 데 사용된다.

 16비트 명령어
8080은 일반적으로 8비트 프로세서이지만, 제한된 16비트 연산을 수행할 수 있는 능력이 있다. 세 개의 16비트 레지스터 쌍(BC, DE, HL, 인텔 문서에서는 B, D, H로 언급됨) 또는 SP는 즉시 16비트 값으로 로드(LXI 사용), 증가(INX 사용) 또는 감소(DCX 사용)하거나 HL에 추가(DAD 사용)할 수 있다. HL을 자체에 추가함으로써, 한 명령어로 16비트 산술적 왼쪽 시프트와 동일한 결과를 얻을 수 있다. 플래그에 영향을 미치는 유일한 16비트 명령어는 DAD로, CY(캐리) 플래그를 설정하여 프로그래밍된 24비트 또는 32비트 산술(또는 더 큰)을 허용한다. BC, DE, HL 또는 PSW는 PUSH 및 POP을 사용하여 스택에 복사하거나 스택에서 복사할 수 있다. DAD SP 및 SPHL을 사용하여 스택 프레임을 할당할 수 있다. PCHL을 사용하여 계산된 포인터로 분기할 수 있다. LHLD는 직접 주소 지정된 메모리에서 HL을 로드하고, SHLD는 HL을 동일하게 저장한다. XCHG 명령어는 HL과 DE 레지스터 쌍의 값을 교환한다. XTHL은 스택에 마지막으로 푸시된 항목과 HL을 교환한다.


 

 


The Intel 8080 ("eighty-eighty") is the second 8-bit microprocessor designed and manufactured by Intel. It first appeared in April 1974 and is an extension and improvement of the previous 8008 design, but it is not binary compatible. The initially specified clock speed or frequency limit was 2 MHz, and typical instructions use between 4, 5, 7, 10, or 11 clock cycles. As a result, the processor can execute hundreds of thousands of instructions per second. Later, two faster variants, the 8080A-1 and 8080A-2, with clock frequency limits of 3.125 MHz and 2.63 MHz, respectively, were released. The 8080 requires two support chips, the i8224 clock generator/driver and the i8228 bus controller, to operate in most applications. The 8080 is implemented using NMOS logic with unsaturated enhancement mode transistors as loads, requiring +12 V and -5 V voltages, as well as the main TTL-compatible +5 V voltage.

 

Previous microprocessors were commonly used in mass-produced devices such as calculators, cash registers, computer terminals, and industrial robots, but the 8080 achieved greater success in a wider range of applications and is credited with significantly contributing to the start of the microcomputer industry. Several factors contributed to the popularity of the 8080. The 40-pin package made interfacing easier than the 18-pin 8008, and the data bus was more efficient. The NMOS implementation provided faster transistors than the PMOS 8008, and TTL compatibility simplified interfacing. More diverse support chips were available, and the instruction set was improved over the 8008. The 16-bit address bus (compared to the 14-bit address bus of the 8008) allowed access to 64 KB of memory, four times the 16 KB range of the 8008. The 8080 was used in the Altair 8800 and later S-100 bus personal computers and was later replaced by the Z80. It was also the original target CPU for the CP/M operating system developed by Gary Kildall.

The 8080 had a direct influence on the subsequent x86 architecture. When designing the 8086, Intel made it similar to the 8080's assembly language so that most instructions could be directly mapped, allowing 8080 assembly code to run on the 8086.

 

History

 

Microprocessor customers were hesitant to adopt the 8008 due to limitations such as a single addressing mode, low clock speed, low pin count, and a small on-chip stack. There were several design proposals for the 8080, ranging from adding stack instructions to the 8008 to completely different designs from all previous Intel architectures. The final design was a compromise between these proposals.Federico Faggin, the creator of the 8080 architecture, proposed the chip to Intel management in early 1972 and pushed for its implementation. He received development approval nine months later. In November 1972, Faggin hired Masatoshi Shima, who had helped with the logic design of the 4004 in Japan. Shima performed the detailed design using the random logic design methodology with silicon gates that Faggin had created for the 4000 series and 8008. The 8080 was explicitly designed as a general-purpose microprocessor for more customers. Much of the development effort focused on integrating the auxiliary chip functions of the 8008 into a single package. It was decided early in the development stage that the 8080 would not be binary compatible with the 8008, opting instead for source compatibility through a transpiler to avoid the same limitations as the 8008. For the same reason, the stack was moved to external memory to expand the functionality of stack-based routines and interrupts. Noting that programmers on mainframe systems used general-purpose registers professionally, Faggin, along with Shima and Stanley Mazor, decided to specialize the registers of the 8080, with register pairs serving different purposes. This allowed engineers to use transistors more effectively for other purposes.

Shima completed the layout in August 1973. After NMOS manufacturing rules, the prototype of the 8080 was completed in January 1974. There was a defect where the ground voltage increased due to high current flowing through narrow lines when driven by standard TTL devices. Intel had already produced 40,000 units of the 8080 at the direction of the sales department, and Shima announced that LS TTL devices were needed before characterizing the prototype. The 8080A fixed this defect.

Intel provided an instruction set simulator for the 8080 called INTERP/80, written in FORTRAN IV by Gary Kildall while working as a consultant for Intel.

Description
Programming Model
The Intel 8080 is a successor to the 8008. It uses the same basic instruction set and register model as the 8008 but has no source code or binary code compatibility. All instructions of the 8008 have equivalent instructions in the 8080. The 8080 adds 16-bit operations to the instruction set. While the 8008 had to indirectly access the 14bit memory space using the HL register pair, the 8080 added addressing modes that could directly access the entire 16-bit memory space. The internal 7-level pushdown call stack of the 8008 was replaced with a dedicated 16-bit stack pointer (SP) register. The 40-pin DIP packaging of the 8080 provides a 16-bit address bus and an 8-bit data bus, allowing access to 64 KiB (2^16 bytes) of memory.

Registers
The processor has seven 8-bit registers (A, B, C, D, E, H, L), with A being the primary 8-bit accumulator. The other six registers can be used as individual 8-bit registers or as three 16-bit register pairs (BC, DE, HL, referred to as B, D, H in Intel documentation) depending on the instruction. Some instructions allow the HL register pair to be used as a limited 16-bit accumulator. The virtual register M, which refers to the memory location pointed to by HL, can be used in almost all places where other registers can be used. The 8080 has a 16-bit stack pointer and a 16-bit program counter, replacing the internal stack of the 8008.

 

Flags
The processor maintains internal flag bits (status register) that indicate the results of arithmetic and logical instructions. Only specific instructions affect the flags. The flags are as follows:

- Sign (S): Set when the result is negative.
- Zero (Z): Set when the result is zero.
- Parity (P): Set when the number of 1 bits in the result is even.
- Carry (C): Set when a carry occurs in the last addition operation or a borrow is needed in the last subtraction operation.
- Auxiliary Carry (AC or H): Used in binary-coded decimal (BCD) arithmetic.

The carry bit can be set or complemented by specific instructions. Conditional branch instructions test various flag state bits. The accumulator and flags together are called the PSW (program status word). The PSW can be pushed to or popped from the stack.

Instructions

 

Like many other 8bit processors, all instructions are encoded in one byte (including register numbers, excluding immediate data). Some instructions may be followed by one or two bytes of data, which can be immediate operands, memory addresses, or port numbers. Like more advanced processors, there are automatic CALL and RET instructions for multi-level procedure calls and returns (which can be executed conditionally like branches) and instructions to save and restore 16-bit register pairs on the machine stack. There are eight one-byte call instructions (RST) for subroutines at fixed addresses 00h, 08h, 10h, ..., 38h. These are intended to be provided by external hardware to call the corresponding interrupt service routine but are often used as fast system calls. The slowest executing instruction is XTHL, which exchanges the value stored at the address pointed to by the stack pointer with the HL register pair.

8-bit Instructions

All 8-bit operations with two operands can only be performed in the 8-bit accumulator (A register). The other operand can be an immediate value, another 8-bit register, or a memory byte addressed by the 16-bit register pair HL. Increment and decrement operations can be performed on any 8-bit register or memory byte addressed by HL. Direct copying is supported between any two 8-bit registers and between any 8-bit register and a memory byte addressed by HL. Due to the systematic encoding of the MOV instruction (using a quarter of the available opcode space), there are redundant codes for copying a register to itself (e.g., MOV B,B), which are rarely used except for delays. However, the systematic opcode for MOV M,M is instead used to encode the HLT instruction, which halts execution until an external reset or interrupt occurs.

16-bit Instructions
Although the 8080 is generally an 8-bit processor, it has the ability to perform limited 16-bit operations. The three 16-bit register pairs (BC, DE, HL, referred to as B, D, H in Intel documentation) or SP can be loaded with an immediate 16-bit value (using LXI), incremented (using INX), or decremented (using DCX), or added to HL (using DAD). By adding HL to itself, the same result as a 16-bit arithmetic left shift can be obtained in one instruction. The only 16-bit instruction that affects the flags is DAD, which sets the CY (carry) flag to allow programmed 24-bit or 32-bit arithmetic (or larger). BC, DE, HL, or PSW can be copied to or from the stack using PUSH and POP. DAD SP and SPHL can be used to allocate stack frames. PCHL can be used to branch to a calculated pointer. LHLD loads HL from directly addressed memory, and SHLD stores HL similarly. The XCHG instruction exchanges the values of the HL and DE register pairs. XTHL exchanges the last item pushed onto the stack with HL.



インテル8080(「エイティ・エイティ」)は、インテルが設計および製造した2番目の8ビットマイクロプロセッサです。1974年4月に初めて登場し、以前の8008設計を拡張および改良したものですが、バイナリ互換性はありません。最初に指定されたクロック速度または周波数の上限は2 MHzで、一般的な命令は4、5、7、10、または11クロックサイクルを使用します。その結果、プロセッサは毎秒数十万の命令を実行できます。その後、3.125 MHzと2.63 MHzのクロック周波数上限を持つ2つの高速バリアント、8080A-1と8080A-2がリリースされました。8080は、ほとんどのアプリケーションで動作するために、i8224クロックジェネレーター/ドライバーとi8228バスコントローラーという2つのサポートチップが必要です。8080は、負荷として非飽和型エンハンスメントモードトランジスタを使用するNMOSロジックで実装されており、+12 Vと-5 Vの電圧が必要で、主なTTL互換+5 V電圧も必要です。

以前のマイクロプロセッサは、計算機、レジスター、コンピュータ端末、産業用ロボットなどの大量生産装置に一般的に使用されていましたが、8080はより広範なアプリケーションで大きな成功を収め、マイクロコンピュータ産業の始まりに大きく貢献したと評価されています。8080の人気にはいくつかの要因が寄与しました。40ピンパッケージは18ピンの8008よりもインターフェースが容易で、データバスもより効率的でした。NMOS実装はPMOS 8008よりも高速なトランジスタを提供し、TTL互換性によりインターフェースが簡素化されました。より多様なサポートチップが提供され、命令セットが8008よりも向上しました。16ビットアドレスバス(8008の14ビットアドレスバスに比べて)は64 KBのメモリにアクセスでき、8008の16 KB範囲よりも4倍多くのメモリを使用できるようにしました。8080はAltair 8800およびその後のS-100バスパーソナルコンピュータに使用され、その後Z80に置き換えられました。また、Gary Kildallが開発したCP/Mオペレーティングシステムの元々の対象CPUでもありました。

8080はその後のx86アーキテクチャに直接的な影響を与えました。インテルは8086を設計する際に、8080のアセンブリ言語に似せて設計し、ほとんどの命令が直接マッピングされるようにして、8080のアセンブリコードが8086で実行できるようにしました。

歴史
マイクロプロセッサの顧客は、単一のアドレッシングモード、低クロック速度、低ピン数、小さなオンチップスタックなどの制限のために8008を採用することに躊躇していました。8080に対するいくつかの設計提案があり、8008にスタック命令を追加するものから、以前のすべてのインテルアーキテクチャとは完全に異なる設計までさまざまでした。最終的な設計はこれらの提案の妥協点でした。

8080アーキテクチャの創始者であるFederico Fagginは、1972年初頭にインテルの経営陣にチップを提案し、その実装を推進しました。彼は9か月後に開発の承認を受けました。Fagginは1972年11月に、日本で4004の論理設計を支援したMasatoshi Shimaを雇いました。ShimaはFagginの指示に従い、Fagginが4000シリーズおよび8008のために作成したシリコンゲートを使用したランダムロジック設計方法論を使用して詳細設計を行いました。

8080は、より多くの顧客のための汎用マイクロプロセッサとして明示的に設計されました。開発努力の多くは、8008の補助チップ機能を1つのパッケージに統合しようとする試みに集中しました。8080は8008とバイナリ互換性がないように初期開発段階で決定され、代わりにトランスパイラーを通じて実行された後、ソース互換性を選択して、新しいソフトウェアが8008と同じ制限を受けないようにしました。同じ理由で、スタックベースのルーチンと割り込みの機能を拡張するために、スタックを外部メモリに移動しました。

メインフレームシステムでプログラマーが汎用レジスタを専門的に使用することに注目したFagginは、ShimaおよびStanley Mazorとともに、8080のレジスタを専門化することを決定し、レジスタペアが異なる用途を持つようにしました。これにより、エンジニアはトランジスタを他の用途により効果的に使用できるようになりました。

Shimaは1973年8月にレイアウトを完了しました。NMOS製造規則の後、8080のプロトタイプは1974年1月に完成しました。標準TTLデバイスで駆動する際に、高電流が狭いラインを流れるため、接地電圧が上昇する欠陥がありました。インテルは販売部門の指示に従って8080の40,000ユニットをすでに生産しており、Shimaがプロトタイプを特性化する前にLS TTLデバイスが必要であると発表しました。8080Aはこの欠陥を修正しました。

インテルは8080用の命令セットシミュレータであるINTERP/80を提供し、これはGary Kildallがインテルのコンサルタントとして働いている間にFORTRAN IVで作成しました。

説明
プログラミングモデル
インテル8080は8008の後継製品です。8008と同じ基本命令セットとレジスタモデルを使用していますが、ソースコード互換性やバイナリコード互換性はありません。8008のすべての命令は8080で同等の命令を持っています。8080は命令セットに16ビット演算を追加しました。8008はHLレジスタペアを使用して14ビットメモリ空間に間接的にアクセスする必要がありましたが、8080は全16ビットメモリ空間に直接アクセスできるアドレッシングモードを追加しました。8008の内部7段プッシュダウンコールスタックは、専用の16ビットスタックポインタ(SP)レジスタに置き換えられました。8080の40ピンDIPパッケージは16ビットアドレスバスと8ビットデータバスを提供し、64 KiB(2^16バイト)のメモリにアクセスできるようにします。

レジスタ
プロセッサには7つの8ビットレジスタ(A、B、C、D、E、H、L)があり、Aは主要な8ビットアキュムレータです。他の6つのレジスタは、命令に応じて個別の8ビットレジスタまたは3つの16ビットレジスタペア(BC、DE、HL、インテル文書ではB、D、Hと呼ばれる)として使用できます。一部の命令は、HLレジスタペアを制限付きの16ビットアキュムレータとして使用できるようにします。HLが指すメモリ位置を参照する仮想レジスタMは、他のレジスタが使用できるほぼすべての場所で使用できます。8080は8008の内部スタックを置き換える16ビットスタックポインタと16ビットプログラムカウンタを持っています。

フラグ
プロセッサは、算術および論理命令の結果を示す内部フラグビット(ステータスレジスタ)を保持します。特定の命令のみがフラグに影響を与えます。フラグは次のとおりです:

- 符号(S):結果が負の場合に設定されます。
- ゼロ(Z):結果が0の場合に設定されます。
- パリティ(P):結果の1ビットの数が偶数の場合に設定されます。
- キャリー(C):最後の加算演算でキャリーが発生した場合、または最後の減算演算で借用が必要な場合に設定されます。
- 補助キャリー(ACまたはH):2進化10進数算術(BCD)で使用されます。

キャリービットは特定の命令によって設定または補完されることがあります。条件付き分岐命令はさまざまなフラグ状態ビットをテストします。アキュムレータとフラグを合わせてPSW(プログラムステータスワード)と呼びます。PSWはスタックにプッシュまたはスタックからポップすることができます。

命令
他の多くの8ビットプロセッサと同様に、すべての命令は1バイトでエンコードされます(レジスタ番号を含む、即値データを除く)。一部の命令は、即値オペランド、メモリアドレス、またはポート番号となる1バイトまたは2バイトのデータが続く場合があります。より高度なプロセッサと同様に、マルチレベルのプロシージャコールおよびリターンのための自動CALLおよびRET命令(分岐のように条件付きで実行可能)および16ビットレジスタペアをマシンスタックに保存および復元する命令があります。固定アドレス00h、08h、10h、...、38hでサブルーチンのための8つの1バイトコール命令(RST)があります。これらは外部ハードウェアによって提供され、対応する割り込みサービスルーチンを呼び出すためのものですが、しばしば高速システムコールとして使用されます。最も遅く実行される命令はXTHLで、スタックポインタが指すアドレスに保存された値とHLレジスタペアを交換するために使用されます。

8ビット命令
2つのオペランドを持つすべての8ビット演算は、8ビットアキュムレータ(Aレジスタ)でのみ実行できます。他のオペランドは即値、他の8ビットレジスタ、または16ビットレジスタペアHLがアドレス指定するメモリバイトである場合があります。インクリメントおよびデクリメント演算は、すべての8ビットレジスタまたはHLがアドレス指定するメモリバイトで実行できます。直接コピーは、任意の2つの8ビットレジスタ間および任意の8ビットレジスタとHLがアドレス指定するメモリバイト間でサポートされます。MOV命令の体系的なエンコードのために(利用可能なオペコード空間の4分の1を使用)、レジスタを自分自身にコピーする冗長コード(MOV B,Bなど)があり、遅延以外にはほとんど使用されません。しかし、MOV M,Mの体系的なオペコードは、代わりに外部リセットまたは割り込みが発生するまで実行を停止するHLT命令をエンコードするために使用されます。

16ビット命令
8080は一般的に8ビットプロセッサですが、制限された16ビット演算を実行する能力があります。3つの16ビットレジスタペア(BC、DE、HL、インテル文書ではB、D、Hと呼ばれる)またはSPは、即値16ビット値でロード(LXI使用)、インクリメント(INX使用)またはデクリメント(DCX使用)するか、HLに追加(DAD使用)できます。HLを自分自身に追加することにより、1つの命令で16ビット算術左シフトと同じ結果を得ることができます。フラグに影響を与える唯一の16ビット命令はDADで、CY(キャリー)フラグを設定してプログラムされた24ビットまたは32ビット算術(またはそれ以上)を許可します。BC、DE、HLまたはPSWは、PUSHおよびPOPを使用してスタックにコピーまたはスタックからコピーできます。DAD SPおよびSPHLを使用してスタックフレームを割り当てることができます。PCHLを使用して計算されたポインタに分岐することができます。LHLDは直接アドレス指定されたメモリからHLをロードし、SHLDは同様にHLを保存します。XCHG命令はHLとDEレジスタペアの値を交換します。XTHLはスタックに最後にプッシュされた項目とHLを交換します。

728x90
반응형

'Computer > CPU' 카테고리의 다른 글

INTEL 8008 [INTEL / 1972]  (0) 2024.09.19
INTEL 4040 [INTEL / 1974]  (0) 2024.09.18
INTEL 4004 [INTEL / November 15, 1971]  (0) 2024.09.17
IBM 701 [IBM / 1952]  (0) 2024.09.08