/[VRac]/M6502/perl.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /M6502/perl.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 85 by dpavlin, Wed Aug 1 22:02:09 2007 UTC revision 86 by dpavlin, Wed Aug 1 22:25:37 2007 UTC
# Line 7  static PerlInterpreter *my_perl; Line 7  static PerlInterpreter *my_perl;
7    
8  static M6502 *R;  static M6502 *R;
9    
10  void pull_R(M6502 *R) {  void pull_R(void) {
11          R->A = SvIV( get_sv("M6502::A", FALSE) );          R->A = SvIV( get_sv("M6502::A", FALSE) );
12          R->P = SvIV( get_sv("M6502::P", FALSE) );          R->P = SvIV( get_sv("M6502::P", FALSE) );
13          R->X = SvIV( get_sv("M6502::X", FALSE) );          R->X = SvIV( get_sv("M6502::X", FALSE) );
# Line 24  void pull_R(M6502 *R) { Line 24  void pull_R(M6502 *R) {
24          dump_R;          dump_R;
25  }  }
26    
27  void push_R(M6502 *R) {  void push_R(void) {
28            debugf(("push_R"));
29          dSP;          dSP;
30          ENTER;          ENTER;
31          SAVETMPS;          SAVETMPS;
# Line 44  void push_R(M6502 *R) { Line 45  void push_R(M6502 *R) {
45          XPUSHs( sv_2mortal( newSViv( R->Trace ) ) );          XPUSHs( sv_2mortal( newSViv( R->Trace ) ) );
46          PUTBACK;          PUTBACK;
47          call_pv("M6502::push_R", G_DISCARD );          call_pv("M6502::push_R", G_DISCARD );
48          printf("push_R called\n");          debugf(("push_R called"));
49          dump_R;          dump_R;
50          FREETMPS;          FREETMPS;
51          LEAVE;          LEAVE;
# Line 176  void run_forever(void) { Line 177  void run_forever(void) {
177                  dSP;                  dSP;
178                  PUSHMARK(SP);                  PUSHMARK(SP);
179                  call_pv("Arch::cli", G_DISCARD | G_NOARGS );                  call_pv("Arch::cli", G_DISCARD | G_NOARGS );
180                  pull_R(R);                  pull_R;
181                  FREETMPS;                  FREETMPS;
182                  LEAVE;                  LEAVE;
183                  cycles = SvIV( get_sv("M6502::run_for", FALSE) );                  cycles = SvIV( get_sv("M6502::run_for", FALSE) );
# Line 186  void run_forever(void) { Line 187  void run_forever(void) {
187                          //Run6502(R);                          //Run6502(R);
188                          Exec6502(R, cycles);                          Exec6502(R, cycles);
189                          dump_R;                          dump_R;
190                          push_R(R);                          push_R;
191                          printf("end of %d cycles CPU run\n", cycles);                          printf("end of %d cycles CPU run\n", cycles);
192                  } else {                  } else {
193                          printf("no cpu cycles set for run\n");                          printf("no cpu cycles set for run\n");

Legend:
Removed from v.85  
changed lines
  Added in v.86

  ViewVC Help
Powered by ViewVC 1.1.26