From b4d0f5d108d46b9f3d6ad1f85c86e8b3be3e3438 Mon Sep 17 00:00:00 2001 From: g1n Date: Fri, 15 Oct 2021 12:18:37 +0300 Subject: [PATCH] Add styles --- .gitignore | 2 + index.html | 623 +++++++++++++++++++++++++++++++++++++++++++++++++++++ ocpu.org | 18 +- style.css | 24 +++ 4 files changed, 662 insertions(+), 5 deletions(-) create mode 100644 .gitignore create mode 100644 index.html create mode 100644 style.css diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7e54a90 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*#* +*~ diff --git a/index.html b/index.html new file mode 100644 index 0000000..4f11411 --- /dev/null +++ b/index.html @@ -0,0 +1,623 @@ + + + + + + +ocpu + + + + + + +
+

ocpu

+ +
+

GRU ocpu - yet another cpu design

+
+
+
+

Features

+
+
    +
  • little endian
  • +
  • 8-bit (maybe will be changed in future)
  • +
+
+
+
+

Registers

+
+ + + +++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RegisterCategoryDescription
AGeneral0x0A
BGeneral0x0B
CGeneral0x0C
D 0x0D
E 0x0E
F 0x0F
PCPointerProgram Counter
SPPoinerStack Pointer
ZFFlagZero Flag
NFFlagNegative Flag
CFFlagCarry Flag
   
OFFlagOverflow Flag
+
+
+ +
+

Instuctions

+
+ + + +++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
InstructionsOpcodeDescription
MOV0x01Place value to register.
  Takes 2 bytes as arguments:
  1 - Opcode of register
  2 - Value
   
ADD0x10 
ADC0x11 
SUB0x12 
MUL0x13 
DIV0x14 
INC0x15Increment
DEC0x16Decrement
AND0x20 
OR0x21 
NOR0x22 
XOR0x23 
NAND0x24 
CMP0x25 
PUSH0x30 
POP0x31 
JMP0x40 
JSR0x41Jump to subroutine
JC0x42Jump with carry
JNC0x43Jump without carry
JZ0x44Jump if zero
JNZ0x45Jump if non-zero
RTS0x42Return from subroutine
INB0x50Copies value from I/O port to destination
OUTB0x51Copies value from operand to I/O port
NOP0x90No operation
+ + +

+0x0* - MOV instructions (maybe it will for LDA or something) +

+ +

+0x1* - Arithmetic (ADD, SUB and others) +

+ +

+0x2* - Logic (AND, OR and others) +

+ +

+0x3* - Stack Operations (PUSH, POP) +

+ +

+0x4* - Jumps +

+ +

+0x5* - Ports Operations +

+ +

+0x90 - NOP +

+ + +

+TODO: add interrupts +

+ +

+TODO: add HLT +

+ +

+TODO: make instructions for memory use +

+
+
+
+
+ + diff --git a/ocpu.org b/ocpu.org index c648949..ab9f95d 100644 --- a/ocpu.org +++ b/ocpu.org @@ -1,12 +1,12 @@ +#+OPTIONS: toc:nil num:nil <:nil \n:nil ::nil timestamp:nil *:nil ':nil +#+HTML_HEAD: +#+EXPORT_FILE_NAME: index.html #+title: ocpu -* GRU ocpu - maybe it will processor sometime -** TODO ocpu: fix description - -** Other +* GRU ocpu - yet another cpu design +** Features - little endian - 8-bit (maybe will be changed in future) - ** Registers |----------+----------+-----------------| @@ -100,14 +100,22 @@ 0x0* - MOV instructions (maybe it will for LDA or something) + 0x1* - Arithmetic (ADD, SUB and others) + 0x2* - Logic (AND, OR and others) + 0x3* - Stack Operations (PUSH, POP) + 0x4* - Jumps + 0x5* - Ports Operations 0x90 - NOP + TODO: add interrupts + TODO: add HLT + TODO: make instructions for memory use diff --git a/style.css b/style.css new file mode 100644 index 0000000..7cdbb9e --- /dev/null +++ b/style.css @@ -0,0 +1,24 @@ +body { + background:#1c1c1c; + color:#a7d129; + font-family: 'Inconsolata', monospace; +} +div { + /*padding:5px;*/ + width:100%; + max-width:874px; + margin:24px auto; +} +hr{ + color:#32302f; +} +ul{ + list-style: none; +} +li{ + color:#81b214; +} +a{ + text-decoration:none; + color:#9ede73; +}