8000 GitHub - hubertchoo/tunablecore
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

hubertchoo/tunablecore

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyCore V2

Instruction Format

32-bit instructions. 4 bytes.

  • Byte 0: opcode
  • Byte 1: higher 4 bits for subfunction; lower 4 bits for Rz
  • Byte 2:
    • (R-type) higher 4 bits for Rx; lower 4 bits for Ry
    • (I-type) all 8 bits for the upper 8 bits of the immediate value
  • Byte 3:
    • (R-type) not used
    • (I-type) all 8 bits for the lower 8 bits of the immediate value

Opcode

General format: ooooiitt

  • Lower 2 bits tt for operations:
    • tt = 00: R-type instruction
      • ooooii = 000000: (nop)
      • ooooii = 000001: (add) Rz <- Rx + Ry
      • ooooii = 000010: (sub) Rz <- Rx - Ry
      • ooooii = 000011: (mul) Rz <- Rx * Ry
      • ooooii = 000100: (div) Rz <- Rx / Ry
      • ooooii = 001000: (load) Rz <- M[Rx + Ry]
      • ooooii = 001001: (store) M[Rx + Ry] <- Rz
    • tt = 01: I-type instruction
      • ii = 00: Imm as unsigned memory address
        • oooo = 0010: (jz) go to (PC+Imm) if Rz = 0
        • oooo = 0011: (jp) go to (PC+Imm) if Rz > 0
      • ii = 01: Imm as signed integer
        • oooo = 0000: (li) load Rz with (extended) Imm

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 94.4%
  • Makefile 3.4%
  • Assembly 2.2%
0