Skip to content

Commit 397f52d

Browse files
committed
initial commit
0 parents  commit 397f52d

13 files changed

Lines changed: 1319 additions & 0 deletions

File tree

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.dub
2+
docs.json
3+
__dummy.html
4+
docs/
5+
/emu6502
6+
emu6502.so
7+
emu6502.dylib
8+
emu6502.dll
9+
emu6502.a
10+
emu6502.lib
11+
emu6502-test-*
12+
*.exe
13+
*.o
14+
*.obj
15+
*.lst
16+
*.pdb

asm/cat.bin

9 Bytes
Binary file not shown.

asm/cat.s

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.org $8000
2+
loop:
3+
lda $E000
4+
sta $E000
5+
jmp loop

asm/hello.bin

29 Bytes
Binary file not shown.

asm/hello.s

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.org $8000
2+
main:
3+
ldx #0
4+
loop:
5+
lda data,x
6+
sta $E000
7+
cmp #0
8+
inx
9+
bne loop
10+
brk
11+
data:
12+
.byte 'Hello, World!', $0A, $00

asm/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Example Programs
2+
A few example programs to test the emulator on. Should be assembled with the VASM (oldstyle) assembler with the flags `-Fbin -dotdir`.

asm/test.bin

61 Bytes
Binary file not shown.

asm/test.s

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.org $8000
2+
main:
3+
; get num 1
4+
lda $E000
5+
sta $E000
6+
sta num1
7+
lda #$0A
8+
sta $E000
9+
; get num 2
10+
lda $E000
11+
sta $E000
12+
sta num2
13+
lda #$0A
14+
sta $E000
15+
; write num1
16+
lda num1
17+
sta $E000
18+
; compare
19+
cmp num2
20+
bcc lt
21+
lda #$3E
22+
sta $E000
23+
jmp end
24+
lt:
25+
lda #$3C
26+
sta $E000
27+
end:
28+
lda num2
29+
sta $E000
30+
brk
31+
32+
num1: .byte $00
33+
num2: .byte $00

asm/truth-machine.bin

17 Bytes
Binary file not shown.

asm/truth-machine.s

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.org $8000
2+
main:
3+
lda $E000
4+
sta $E000
5+
cmp #$31
6+
bne end
7+
loop:
8+
sta $E000
9+
jmp loop
10+
end:
11+
brk

0 commit comments

Comments
 (0)