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

Annotation of /M6502/M6502.xs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 86 - (hide annotations)
Wed Aug 1 22:25:37 2007 UTC (16 years, 9 months ago) by dpavlin
File size: 573 byte(s)
and here it segfaults again :-)
1 dpavlin 80 #include "EXTERN.h"
2     #include "perl.h"
3     #include "XSUB.h"
4    
5     #include "ppport.h"
6    
7 dpavlin 82 #include "M6502.h"
8     #include "config.h"
9    
10     M6502 *R;
11    
12 dpavlin 80 void
13     run (void) {
14 dpavlin 82 debugf(("M6502::run"));
15 dpavlin 80 run_forever();
16     }
17    
18 dpavlin 84 int
19 dpavlin 82 reset (void) {
20     debugf(("M6502::reset called"));
21 dpavlin 83 if ( ! R ) {
22     debugf(("allocating space for R"));
23     R = malloc(sizeof(M6502));
24     if (!R) {
25     printf("can't alloc %d bytes for M6502", sizeof(M6502));
26     exit(1);
27     }
28     }
29 dpavlin 82 Reset6502(R);
30 dpavlin 84 debugf(("Reset6502 over"));
31 dpavlin 86 push_R();
32 dpavlin 82 dump_R;
33 dpavlin 84 return 1;
34 dpavlin 82 }
35    
36 dpavlin 86
37 dpavlin 80 MODULE = M6502 PACKAGE = M6502
38    
39     PROTOTYPES: DISABLE
40    
41     void
42     run()
43 dpavlin 82
44 dpavlin 84 int
45 dpavlin 82 reset()

  ViewVC Help
Powered by ViewVC 1.1.26