diff --git a/emulator b/emulator index 6e2b794..bd7e067 100755 Binary files a/emulator and b/emulator differ diff --git a/emulator.c b/emulator.c index a127071..565ab09 100644 --- a/emulator.c +++ b/emulator.c @@ -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); switch(h_nib) { + case 0x0: + switch(l_nib) { + case 0x0: + printf("%c", cpu.A); + break; + } + break; case 0x8: switch(l_nib) { case 0x1: diff --git a/hello b/hello index 1a3c4f8..91e08f7 100644 Binary files a/hello and b/hello differ diff --git a/hello.asm b/hello.asm index 3de943c..d02624e 100644 --- a/hello.asm +++ b/hello.asm @@ -1,5 +1,27 @@ -LDY #%00000100 -LDX #$5 -STY $10 -STY $10, X -STY $1000 +LDX #0 +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 +INX +LDA hello, X +BRK + +.DATA +hello: .byte "hello\n", 0 diff --git a/hello.o b/hello.o index d076a5d..2858793 100644 Binary files a/hello.o and b/hello.o differ diff --git a/temp.asm b/temp.asm index 136b5a0..6cef098 100644 --- a/temp.asm +++ b/temp.asm @@ -1,6 +1,3 @@ -LDA hello, X -INX -LDA hello, X - -.DATA -hello: .byte "hello world", 0 +LDA #10 +LDX #$10 +LDY #%10