Skip to content

Latest commit

 

History

History
131 lines (108 loc) · 8.48 KB

manual.org

File metadata and controls

131 lines (108 loc) · 8.48 KB

AC-63 CPU

The AC-63 is an 18-bit CPU designed

Registers

RegisterPurposeBitsDescription
ACCAccumumlator18Stores results of operations.
PCProgram Counter18Current location in memory of CPU.
GP1-3General Purpose18Three general purpose registers
SPStack Pointer18Allows function calls by storing address of the top of the stack

Word Layout

OOOOIZRRXXXXXXXXXX

O

The 1st 4 bits of the word are the 4-bit opcode.

I

The 5th bit is the Addressing Mode bit. It specifies which addressing mode is used for this operation.

  1. Direct: Use the 10-bits directly
  2. Indirect: Use the 10-bits to construct a 18-bit address, which contains the operand

Z

The 6th bit is the Zero or Page bit. It specifies how the additional 8 bits needed to make an 18 bit word are treated. This is essentially the paging bit.

  1. Filled with zeros.
  2. Uses the 8 high order bits of the PC.

R

The 7th and 8th bits are the Register Select bits. When zeroed no register is used, but when set to 1-3 they will alter the current operation to include a register.

X

The remaining 10 bits are the operand. As per the previous flags these will be used either directly, or to redirect

Operation Codes

There are 16 base instructions.

Indirect addressing works as per above, and registers cannot be used for indirect addressing. If the value of the reg sel bits is 0, then they will not be used, however most operations are “Multi Function”, in that they will perform an additional step involving registers if the reg sel bits are set. All operations which additionally operate on a register can be run with an operand of 0, as if to operate only on the register

  • A means operand section of word, commonly an address
  • R means register specified by select bits
OperationDecBinDescriptionReg step
NOP00000No Operation
DAM R A10001Deposit ACC into A and clear ACC
LDR R A20010Load A into Rn/a
DPR R A30011Deposit R into An/a
JMP R A40100Jump to AStore return address in R
JEZ R A50101Jump to A if ACC = 0Store return address in R
JNZ R A60110Jump to A if ACC != 0Store return address in R
SHL A70111binary shift A left, store in ACC
SHR A81000binary shift A right, store in ACC
AND A91001binary and A with ACC
OR A101010binary OR A with ACC
ADD R A111011Add A to ACCalso add R
SUB R A121100Subtract A from ACCalso subtract R
POP A131101Copy mem at SP into A, then dec SP
PSH A141110Copy A into mem at SP, then inc SP

Hand Assembly

AsmBin
ADD 50101000000000110010
ADD 30101000000000011110
DAM 3000000000000000011

Panel Interface

 ________________________________________________________________________________________________________________________
/  ____________________________________________________________________________________________________________________  \
| /                                                                                     +++++++++++++++++++++++++++++++\ |
| |   |START|SINGL|     |                                                               ++Astral Computing Inc. AC-63++| |
| |   |     |     |     |                                                               +++++++++++++++++++++++++++++++| |
| |   | / \ | /_\ |     |                                                                                              | |
| |   | \|/ | \ / |     |                                                                                              | |
| |   |  ^  |     |     |                                                                                              | |
| |   |STOP |STEP |     |                                                                                              | |
| |                                                                                                                    | |
| |____________________________________________________________________________________________________________________| |
| |                           !           !           !                                                                | |
| |                           !           !1.         !                                                                | |
| |     / \   / \   / \   / \ ! / \   / \ ! / \   / \ ! / \   / \   / \   / \   / \   / \   / \   / \   / \   / \      | |
| |     \ /   \ /   \ /   \ / ! \ /   \ / ! \ /   \ / ! \ /   \ /   \ /   \ /   \ /   \ /   \ /   \ /   \ /   \ /      | |
| |                           !           !           !                                                                | |
| |                           !           !           !                                                                | |
| |                           !           !           !                                                                | |
| |                           !           !2.         !                                                                | |
| |     / \   / \   / \   / \ ! / \   / \ ! / \   / \ ! / \   / \   / \   / \   / \   / \   / \   / \   / \   / \      | |
| |     \ /   \ /   \ /   \ / ! \ /   \ / ! \ /   \ / ! \ /   \ /   \ /   \ /   \ /   \ /   \ /   \ /   \ /   \ /      | |
| |                           !           !           !                                                                | |
| |                           !           !           !                                                                | |
| |                           !           !           !                                                                | |
| |                           !           !3.         !                                                                | |
| |     / \   / \   / \   / \ ! / \   / \ ! / \   / \ ! / \   / \   / \   / \   / \   / \   / \   / \   / \   / \      | |
| |     \|/   \|/   \|/   \|/ ! \|/   \|/ ! \|/   \|/ ! \|/   \|/   \|/   \|/   \|/   \|/   \|/   \|/   \|/   \|/      | |
| |      ^     ^     ^     ^  !  ^     ^  !  ^     ^  !  ^     ^     ^     ^     ^     ^     ^     ^     ^     ^       | |
| |                           !           !           !                                                                | |
| \____________________________________________________________________________________________________________________/ |
\________________________________________________________________________________________________________________________/

  1. Address Lights
  2. Data Lights
  3. Main Switches
  4. Control Switches

Notice the two vertical lines, these visually separate parts of the memory word into Instruction, Zero and Indirect bits, and Data segments respectively.