mirror of
https://github.com/raxracks/6502.git
synced 2024-12-02 00:11:10 +13:00
a
This commit is contained in:
parent
12f7acaa7f
commit
86384b76a3
6 changed files with 37 additions and 11 deletions
BIN
emulator
BIN
emulator
Binary file not shown.
|
@ -44,6 +44,13 @@ int main(int argc, char** argv) {
|
||||||
printf("%d: 0x%02X (h_nib: 0x%X, l_nib: 0x%X)\n", cpu.PC, opcode, h_nib, l_nib);
|
printf("%d: 0x%02X (h_nib: 0x%X, l_nib: 0x%X)\n", cpu.PC, opcode, h_nib, l_nib);
|
||||||
|
|
||||||
switch(h_nib) {
|
switch(h_nib) {
|
||||||
|
case 0x0:
|
||||||
|
switch(l_nib) {
|
||||||
|
case 0x0:
|
||||||
|
printf("%c", cpu.A);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 0x8:
|
case 0x8:
|
||||||
switch(l_nib) {
|
switch(l_nib) {
|
||||||
case 0x1:
|
case 0x1:
|
||||||
|
|
BIN
hello
BIN
hello
Binary file not shown.
32
hello.asm
32
hello.asm
|
@ -1,5 +1,27 @@
|
||||||
LDY #%00000100
|
LDX #0
|
||||||
LDX #$5
|
LDA hello, X
|
||||||
STY $10
|
BRK
|
||||||
STY $10, X
|
INX
|
||||||
STY $1000
|
LDA hello, X
|
||||||
|
BRK
|
||||||
|
INX
|
||||||
|
LDA hello, X
|
||||||
|
BRK
|
||||||
|
INX
|
||||||
|
LDA hello, X
|
||||||
|
BRK
|
||||||
|
INX
|
||||||
|
LDA hello, X
|
||||||
|
BRK
|
||||||
|
INX
|
||||||
|
LDA hello, X
|
||||||
|
BRK
|
||||||
|
INX
|
||||||
|
LDA hello, X
|
||||||
|
BRK
|
||||||
|
INX
|
||||||
|
LDA hello, X
|
||||||
|
BRK
|
||||||
|
|
||||||
|
.DATA
|
||||||
|
hello: .byte "hello\n", 0
|
||||||
|
|
BIN
hello.o
BIN
hello.o
Binary file not shown.
9
temp.asm
9
temp.asm
|
@ -1,6 +1,3 @@
|
||||||
LDA hello, X
|
LDA #10
|
||||||
INX
|
LDX #$10
|
||||||
LDA hello, X
|
LDY #%10
|
||||||
|
|
||||||
.DATA
|
|
||||||
hello: .byte "hello world", 0
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue