OSDN Git Service

- php/plp supported.
authorastoria-d <astoria-d@mail.goo.ne.jp>
Sun, 11 Aug 2013 12:31:33 +0000 (21:31 +0900)
committerastoria-d <astoria-d@mail.goo.ne.jp>
Sun, 11 Aug 2013 12:31:33 +0000 (21:31 +0900)
simulation/cpu/decoder.vhd
tools/test-image/sample1.asm

index a919c5e..6e38524 100644 (file)
@@ -2131,6 +2131,10 @@ end  procedure;
                 -- A.5.1 push/pull
                 elsif instruction = conv_std_logic_vector(16#08#, dsize) then
                     d_print("php");
+                    a51_push;
+                    if exec_cycle = T2 then
+                        stat_bus_oe_n <= '0';
+                    end if;
 
                 elsif instruction = conv_std_logic_vector(16#48#, dsize) then
                     d_print("pha");
@@ -2141,6 +2145,11 @@ end  procedure;
 
                 elsif instruction = conv_std_logic_vector(16#28#, dsize) then
                     d_print("plp");
+                    a52_pull;
+                    if exec_cycle = T3 then
+                        stat_dec_oe_n <= '1';
+                        stat_bus_all_n <= '0';
+                    end if;
 
                 elsif instruction = conv_std_logic_vector(16#68#, dsize) then
                     d_print("pla");
index 1d8070e..200868a 100644 (file)
@@ -683,6 +683,15 @@ bl_test4:
     ;07|c9=cf\r
     ora ($07), y\r
 \r
+    ;;php/plp test\r
+    sec\r
+    sei\r
+    php\r
+\r
+    clc\r
+    cli\r
+    plp\r
+\r
 \r
     ;;done...\r
     ;;infinite loop.\r