aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Isom <kyle@tyrfingr.is>2014-01-29 11:09:37 -0700
committerKyle Isom <kyle@tyrfingr.is>2014-01-29 11:09:37 -0700
commit0c2a35d8a6d9759efd274581a88dec8c9c84618f (patch)
treec13fb5c70227a7384589c7b69276c4f9dc99db61
parent8f62b1f757d2b7eb62201facd712bb3af21d23df (diff)
downloadk6502-0c2a35d8a6d9759efd274581a88dec8c9c84618f.tar.gz
k6502-0c2a35d8a6d9759efd274581a88dec8c9c84618f.tar.bz2
k6502-0c2a35d8a6d9759efd274581a88dec8c9c84618f.zip
Add easy6502 stack example.
-rw-r--r--src/easy6502.cc33
1 files changed, 26 insertions, 7 deletions
diff --git a/src/easy6502.cc b/src/easy6502.cc
index 9b8a64c..3de5b75 100644
--- a/src/easy6502.cc
+++ b/src/easy6502.cc
@@ -32,6 +32,7 @@ void test4(void);
void test5(void);
void test6(void);
void test7(void);
+void test8(void);
static void
@@ -172,14 +173,32 @@ test7()
}
+void
+test8()
+{
+ std::cerr << "\nStarting test 8\n";
+ std::cerr << "\t(Stack manipulation 1)\n";
+
+
+ unsigned char program[] = {
+ 0xa2, 0x00, 0xa0, 0x00, 0x8a, 0x99, 0x00, 0x02,
+ 0x48, 0xe8, 0xc8, 0xc0, 0x10, 0xd0, 0xf5, 0x68,
+ 0x99, 0x00, 0x02, 0xc8, 0xc0, 0x20, 0xd0, 0xf7,
+ 0x00
+ };
+ run(program, 25, false);
+}
+
+
int
main(void)
{
- test1();
- test2();
- test3();
- test4();
- test5();
- test6();
- test7();
+ // test1();
+ // test2();
+ // test3();
+ // test4();
+ // test5();
+ // test6();
+ // test7();
+ test8();
}