added v2.0

This commit is contained in:
Michael Schröder
2023-01-11 11:13:09 +01:00
parent 2a5a64ca91
commit 971b323822
584 changed files with 159319 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
/**
* This library provides two services: direct access to the computer's main
* memory (RAM), and allocation and recycling of memory blocks. The Hack RAM
* consists of 3840 words, each holding a 16-bit binary number.
*/
class Memory {
/** Initializes the class. start is the first memory address of the heap.
* end is the last memory address of the heap */
function void init(int start, int end) {
}
/** Returns the RAM value at the given address. */
function int peek(int address) {
}
/** Sets the RAM value at the given address to the given value. */
function void poke(int address, int value) {
}
/** Finds an available RAM block of the given size and returns
* a reference to its base address. */
function int alloc(int size) {
}
/** De-allocates the given object (cast as an array) by making
* it available for future allocations. */
function void deAlloc(Array o) {
}
}