@@ -36,7 +36,7 @@ void error(char *msg)
3636
3737
3838
39- int run_file (const char * filename ,int dump_registers , int instructions )
39+ int run_file (const char * filename ,int instructions )
4040{
4141struct stat sb ;
4242
@@ -56,14 +56,13 @@ int run_file(const char *filename, int dump_registers, int instructions)
5656 }
5757
5858unsignedchar * code = malloc (size );
59- memset (code ,'\0' ,size );
60-
6159if (!code )
6260 {
6361printf ("Failed to allocate RAM for program-file %s\n" ,filename );
6462fclose (fp );
6563return 1 ;
6664 }
65+ memset (code ,'\0' ,size );
6766
6867/**
6968 * Abort on a short-read, or error.
@@ -99,7 +98,7 @@ int run_file(const char *filename, int dump_registers, int instructions)
9998/**
10099 * Dump?
101100 */
102- if (dump_registers )
101+ if (getenv ( "DEBUG" ) != NULL )
103102svm_dump_registers (cpu );
104103
105104
@@ -122,7 +121,6 @@ int run_file(const char *filename, int dump_registers, int instructions)
122121 */
123122int main (int argc ,char * * argv )
124123{
125- int dump_registers = 0 ;
126124int max_instructions = 0 ;
127125
128126if (argc < 2 )
@@ -134,9 +132,6 @@ int main(int argc, char **argv)
134132if (argc > 2 )
135133max_instructions = atoi (argv [2 ]);
136134
137- if (getenv ("DEBUG" )!= NULL )
138- dump_registers = 1 ;
139-
140- return (run_file (argv [1 ],dump_registers ,max_instructions ));
135+ return (run_file (argv [1 ],max_instructions ));
141136
142137}