pr-mittal / PersonalComputer

Bulding a personal computer from scratch , including the software and harware architectture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PersonalComputer

  • ALU/CPU design and implementation using elementary logic gates and flip flops in HDLWriting
  • Assembler , VMTranslator and Compiler to parse Java like high level language responsible for converting bytecode to machine-specific code
  • Understanding Object-based design and programming, abstract data types, scoping rules, syntax and semantics, references

Summary

  1. The HACK Computer
    1. THE ISA
  2. The JACK Compiler
    1. Memory Segements
    2. Function Implementation
    3. The JACK Tokenizer
    4. Compiling Epxressions
    5. Crafting the Compiler
    6. Symbol Tables
    7. Object Construction
    8. Array Implementation
  3. The OS
    1. Heap Management
  4. The Big Picture

References

  1. http://www.craftinginterpreters.com/contents.html
  2. The Elements of Computing Systems: Building a Modern Computer from First Principles : Book by Noam Nisan and Shimon Schocken

The HACK Computer

image-20220828162415935

THE ISA

image-20220828162617873

image-20220828162710318

image-20220828162800039

image-20220828162817807

image-20220828162806366

The JACK Compiler

Memory Segements

image-20220828163053252

image-20220828163136023

Function Implementation

image-20220828163250025

image-20220828163257863

The JACK Tokenizer

image-20220828163538187

Compiling Epxressions

image-20220828163616283

Crafting the Compiler

http://www.craftinginterpreters.com/contents.html

Symbol Tables

image-20220828163742908

image-20220828163754149

image-20220828163801873

Object Construction

image-20220828164045063

  1. A constructor allocates memory for the object on the memory heap based on the number of fields and returns the reference to the start of memory segment allocated fot this object
  2. For further calls we use the this pointer(containing the memory address of start of class) to access the variables stored for that class

Array Implementation

image-20220828164527729

  • We use the that pointer for this approach , it stores the address of the location from which we want to read/write the data
  • We push the data at that = arr+expression1

The OS

image-20220828163431105

Heap Management

image-20220828165012033

image-20220828165020918

The Big Picture

image-20220828163336325

image-20220828165059901

Exposure: Computer Architecture , Machine Language , Compiler Design , Operating System

About

Bulding a personal computer from scratch , including the software and harware architectture

License:MIT License


Languages

Language:Hack 56.9%Language:Assembly 22.8%Language:Scilab 7.9%Language:C++ 6.7%Language:C 3.3%Language:HTML 2.2%Language:Makefile 0.2%