# COSMAC

## COSMAC 1802 OR & AND

Introduction to COSMAC 1802 OR & AND Statements COSMAC 1802 OR & AND instructions allow us to manipulate data. These instructions work on all 8 bits of a word at a time. These instructions work just like standard bit level logic gates work. They just perform the operation bit by

## COSMAC 1802 Subroutines

Introduction to COSMAC 1802 Subroutines We use COSMAC 1802 Subroutines to execute a specific set of instructions. For example, we might have a subroutine that causes a delay every time we execute it. You could also have a subroutine that converts Celsius to Fahrenheit, or vice versa. We might call

## COSMAC 1802 Basic Branching

Introduction to COSMAC 1802 Basic Branching COSMAC 1802 Basic Branching instructions allow you to execute different parts of code based on certain conditions. These conditions might include inputs that are high, or results of an operation that return a zero value, negative value, etc. In this section, we’ll cover the

## COSMAC 1802 Subtract Instructions

Introduction to COSMAC 1802 Subtract Instructions COSMAC 1802 Subtract Instructions will subtract the accumulator (D Register) from an immediate value, or a memory location (or vice-versa) In this post, we’ll go over each of these instructions, and how you would use them in your logic. There are eight subtract instructions

Introduction to the COSMAC 1802 Addition Instructions There are four COSMAC 1802 Addition Instructions: ADD, ADI, ADC, and ADCI. In this section we’ll take a closer look at each one of these instructions. Basically, the ADD statement will add a memory location to the value in the accumulator. The ADI

## COSMAC 1802 Store Instructions

Introduction to the COSMAC 1802 Store Instructions The COSMAC 1802 Store Instructions allow us to store data to memory from the accumulator. We’ll discuss the different types of store instructions, and how they operate. You only have two store instructions, the STR (Store), and STXD (Store and Decrement). You can,

Introduction to COSMAC 1802 Load Instructions The COSMAC 1802 Load Instructions are probably the most important instructions to understand in the COSMAC. The main register of the 1802 (COSMAC) processor is the “D” register. Effectively, we know this as the “Accumulator”. We might load data into the accumulator and manipulate

## COSMAC UART Communication

Introduction to COSMAC UART Communication I’ll be using the CDP1802 Microprocessor kit to demonstrate COSMAC UART Communication. This setup uses the INS8250 chip for communication. The monitor initializes the IC. In this section, we’ll be sending data out of the serial port. UART is short for Universal Asynchronous Receive and

## COSMAC Processor Stack Operation

Introduction to the COSMAC Processor Stack Operation The COSMAC Processor Stack Operation will allow us to store data on the fly that we need to retrieve later. This will usually be an address contained in a register. Examples would be a program counter, or a memory location that contains data

## COSMAC LED Display Timer

Introduction to the COSMAC LED Display Timer For this post, I used the CDP1802 Microprocessor kit. The 1802 processor was on several space missions. This includes Gallileo craft which explored Jupiter. This kit has several nice features for learning purposes. It has an LED display, and you can add an