-
Notifications
You must be signed in to change notification settings - Fork 0
/
machine.s
32 lines (30 loc) · 1003 Bytes
/
machine.s
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
29
30
31
32
.globl ram
.globl regs
.globl pc
.globl sp
.globl stack
.globl screen
.globl ireg
.globl dt
.globl st
.data
ram: .byte 0xF0,0x90,0x90,0x90,0xF0,0x20,0x60,0x20
.byte 0x20,0x70,0xF0,0x10,0xF0,0x80,0xF0,0xF0
.byte 0x10,0xF0,0x10,0xF0,0x90,0x90,0xF0,0x10
.byte 0x10,0xF0,0x80,0xF0,0x10,0xF0,0xF0,0x80
.byte 0xF0,0x90,0xF0,0xF0,0x10,0x20,0x40,0x40
.byte 0xF0,0x90,0xF0,0x90,0xF0,0xF0,0x90,0xF0
.byte 0x10,0xF0,0xF0,0x90,0xF0,0x90,0x90,0xE0
.byte 0x90,0xE0,0x90,0xE0,0xF0,0x80,0x80,0x80
.byte 0xF0,0xE0,0x90,0x90,0x90,0xE0,0xF0,0x80
.byte 0xF0,0x80,0xF0,0xF0,0x80,0xF0,0x80,0x80
.space (0xFFF-80)
.bss
regs: .space 0x10
pc: .space 2
sp: .space 1
ireg: .space 2
dt: .space 2
st: .space 2
stack: .space 16*2 # Stack is 16 16-bit array
screen: .space 64*32 # Screen size is 64*32 pixels