John Mavrick's Garden

Search IconIcon to open search

Last updated Unknown

Status: Tags: Links: HACK Programming


HACK Registers and Memory

Registers

D: Data Register

A: Address/Data Register

Random

Symbols

Examples of Register Manipulation

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// D=10
@10
D=A

// D++
D=D+1

//D=RAM[17]
@17
D=M

// RAM[17]=0
@17
M=0

// RAM[17]=10
@10
D=A
@17
M=D

// RAM[5]=RAM[3]
@3
D=M
@5
M=D
___
References:

Interactive Graph