Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 1001 Bytes

README.md

File metadata and controls

26 lines (21 loc) · 1001 Bytes

NanoProc

NanoProc is a Fantasy Computer. It consists of a 32-bit fantasy CPU with a fairly flexible instruction set.

The following is example assembly code to loop through the numbers 0 through 100 then halt the computer:

            MOVE  $ACC,   0  ; Initialize register ACC to 0
loop_begin: CMPGE $ACC, 100  ; Compare if register ACC is greater than or equal
                             ; to 100
            JUMPC loop_end   ; If the previous condition was true jump to the end
                             ; of the loop
            INC   $ACC       ; Increment register ACC by 1
            JUMP  loop_begin ; Jump to beginning of loop
loop_end:   HALT             ; Halt CPU execution

Subprojects

  • NP-EMU - The Emulator for the NanoProc system
    • NP-TERM - A terminal virtual hardware device for the NanoProc system.
  • NP-ASM - The Assembler for generating binaries for the NanoProc system