Remove some debug messages.
-
Hugo Villeneuve
Jonathan St-André
+
+Pascal Fecteau
+
+Jimmy Ringuette
+------------------------------------------------------------------------------
+2008/11/05 Hugo Villeneuve <hugo@hugovil.com>
+ -Added licencing informations for each source file.
+ -Removed some debugging messages.
+
+------------------------------------------------------------------------------
+2008/04/28 Hugo Villeneuve <hugo@hugovil.com>
+ Removed gtk+-1.0 support, now requires gtk+-2
------------------------------------------------------------------------------
2004/05/07 Hugo Villeneuve <hugo@hugovil.com>
+2008-11-05: emu8051-1.0.1 has been released.
+ See the file 'ChangeLog' for further details.
+
2008-04-28: emu8051-1.0.0 has been released.
Removed gtk+-1.0 support, now requires gtk+-2
# configure.ac -- Process this file with autoconf to produce configure
dnl Initialization stuff.
-AC_INIT(emu8051, 1.0.0)
+AC_INIT(emu8051, 1.0.1)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR(src/cpu8051.c)
AM_CONFIG_HEADER(config.h:config-h.in)
-/* EmuConsole.cpp */
+/*
+ * EmuConsole.cpp
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#include <stdio.h>
#include <iostream>
+/*
+ * EmuConsole.hpp
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
#ifndef _EMUCONSOLE_HPP_
#define _EMUCONSOLE_HPP_
-// Keyboard.hpp
+/*
+ * Keyboard.hpp
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#ifndef _KEYBOARD_HPP_
#define _KEYBOARD_HPP_
-/* common.h */
+/*
+ * common.h
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#ifndef COMMON_H
#define COMMON_H 1
+/* Define this to have debugging output. */
+/* #define EMU8051_DEBUG 1 */
#include <stdio.h>
#include <stdlib.h>
# include <strings.h>
#endif
-
-#if ( GTK_MAJOR_VERSION == 2 )
-# define FIXED_FONT "monospace 12"
-#else
-/*# define FIXED_FONT "-misc-fixed-medium-r-*-*-*-140-*-*-*-*-*-*"*/
-# define FIXED_FONT "-adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1"
-#endif
-
+#define FIXED_FONT "monospace 12"
/* Common constants. */
#ifndef EXIT_SUCCESS
-/* cpu8051.c */
-
+/*
+ * cpu8051.c
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
/* Define only here, for not having extern scope on local variables. */
#define CPU8051_M 1
-/* cpu8051.h */
-
+/*
+ * emu8051.h
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#ifndef CPU8051_H
#define CPU8051_H 1
+/*
+ * disasm.hpp
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
#ifndef __DISASM_HPP_
#define __DISASM_HPP_
// Do not modify this file directly, it was created by Opcode2cpp.pl
-/* emugtk.c */
-
+/*
+ * emugtk.c
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#include <stdio.h>
#include "config.h"
static void
WindowDestroyEvent( GtkWidget *widget, gpointer data )
{
+#ifdef EMU8051_DEBUG
g_print( "emugtk_DestroyEvent(...)\n" );
+#endif
gtk_main_quit();
}
void
emugtk_UpdateDisplay( void )
{
+#ifdef EMU8051_DEBUG
g_print( "emugtk_UpdateDisplay()\n" );
+#endif
regwin_Show();
pgmwin_Disasm();
void
emugtk_ResetEvent( GtkWidget *widget, GdkEvent *event, gpointer data )
{
+#ifdef EMU8051_DEBUG
g_print( "emugtk_ResetEvent(...)\n" );
+#endif
emugtk_StopRunning( );
emugtk_Reset( );
}
void
emugtk_RunEvent( GtkWidget *widget, GdkEvent *event, gpointer data )
{
+#ifdef EMU8051_DEBUG
g_print( "emugtk_RunEvent(...)\n" );
+#endif
if ( RunningState ) {
// g_print( "Getting out of RunningState! \n" );
emugtk_StopRunning( );
void
emugtk_StopEvent( GtkWidget *widget, GdkEvent *event, gpointer data )
{
+#ifdef EMU8051_DEBUG
g_print( "emugtk_StopEvent(...)\n" );
+#endif
emugtk_StopRunning( );
}
void
emugtk_StepEvent( GtkWidget *widget, GdkEvent *event, gpointer data )
{
+#ifdef EMU8051_DEBUG
g_print( "emugtk_StepEvent(...)\n" );
+#endif
emugtk_StopRunning( );
emugtk_Step();
}
{
cpu8051_Exec( );
if( pgmwin_IsBreakpoint( cpu8051.pc ) ) {
+#ifdef EMU8051_DEBUG
g_print( "Breakpoint Hit, stopping!\n" );
+#endif
emugtk_StopRunning( );
}
}
emugtk_StartRunning( void )
{
if ( !RunningState ) {
-
+#ifdef EMU8051_DEBUG
printf( "emugtk_StartRunning( )\n" );
-
+#endif
/*RunFuncTag = gtk_idle_add( GtkFunction( RunningFunction ), 0 );*/
RunFuncTag = gtk_idle_add( RunningFunction, 0 );
emugtk_StopRunning( )
{
if (RunningState) {
+#ifdef EMU8051_DEBUG
printf( "emugtk_StopRunning( )\n" );
+#endif
gtk_idle_remove( RunFuncTag );
RunningState = 0;
//gtk_widget_hide( GTK_WIDGET( ButtonStop ) );
-/* emugtk.h */
-
+/*
+ * emugtk.h
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#ifndef EMUGTK_H
#define EMUGTK_H 1
#include "gtksizes.h"
-
-
void
AddMenuSeparator( GtkWidget *menu );
void
emugtk_new_file( char *file );
-
-
void
emugtk_StopRunning( void );
void
emugtk_UpdateDisplay( void );
-
-
-
void emugtk_Step( );
-
-
-
void emugtk_ResetEvent( GtkWidget *widget, GdkEvent *event, gpointer data );
void emugtk_RunEvent( GtkWidget *widget, GdkEvent *event, gpointer data );
void emugtk_StopEvent( GtkWidget *widget, GdkEvent *event, gpointer data );
void emugtk_Running( );
-
-
-
-
#endif /* EMUGTK_H */
-// Exceptions.hpp
-// Gestion des erreurs pour le programme d'emulation du 8051.
+/*
+ * Exceptions.hpp
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#ifndef _EXCEPTION_HPP_
#define _EXCEPTION_HPP_
-/* file.c */
-
+/*
+ * filemenu.c
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#if HAVE_CONFIG_H
# include "config.h"
-/* filemenu.h */
-
+/*
+ * filemenu.h
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#ifndef FILEMENU_H
#define FILEMENU_H 1
+/*
+ * gtksizes.h
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
#ifndef _GTKSIZES_HPP_
#define _GTKSIZES_HPP_
-/* help.c */
-
+/*
+ * helpmenu.c
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#if HAVE_CONFIG_H
# include "config.h"
-/* helpmenu.h */
-
+/*
+ * helpmenu.h
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#ifndef HELPMENU_H
#define HELPMENU_H 1
-/* file.c -- functions for loading an Intel HEX file
- Copyright (C) 2004 Hugo Villeneuve */
-
+/*
+ * Functions for loading an Intel HEX file.
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#if HAVE_CONFIG_H
# include "config.h"
-/* file.h */
+/*
+ * hexfile.h
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
-
-#ifndef FILE_H
-#define FILE_H 1
+#ifndef HEXFILE_H
+#define HEXFILE_H 1
void
LoadHexFile( const char *filename );
-#endif /* FILE_H */
+#endif /* HEXFILE_H */
-/* memory.c */
-
+/*
+ * memory.c
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#include "memory.h"
-/* memory.h */
-
+/*
+ * memory.h
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#ifndef MEMORY_H
#define MEMORY_H 1
-/* memwin.c */
-
+/*
+ * memwin.c
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#if HAVE_CONFIG_H
# include "config.h"
-/* memwin.h */
-
+/*
+ * memwin.h
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#ifndef MEMWIN_H
#define MEMWIN_H 1
-/* messagebox.c */
-
+/*
+ * messagebox.c
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#if HAVE_CONFIG_H
# include "config.h"
-/* messagebox.h */
-
+/*
+ * messagebox.h
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#ifndef MESSAGEBOX_H
#define MESSAGEBOX_H 1
#!/usr/bin/perl
-
+#
+# Copyright (C) 1999 Jonathan St-André
+# Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
open INST_DEF, ">instructions_8051.h" or die "Error creating <instructions_8051.h> : $!\n";
open INST_IMP, ">instructions_8051.c" or die "Error creating <instructions_8051.c> : $!\n";
open OPCODELST, "opcodes.lst" or die "Error opening <opcodes.lst> : $!\n";
open DISASM_H, ">disasm.h" or die "Error creating <disasm.h> : $!\n";
-print INST_IMP "/* instructions_8051.c */\n\n\n";
-print INST_IMP "/* Do not modify this file directly, as it was created by opcode2c.pl\n";
-print INST_IMP " * Any modifications made directly to this file will be lost. */\n\n\n";
+# Header for instructions_8051.c
+print INST_IMP "/*\n";
+print INST_IMP " * instructions_8051.c\n";
+print INST_IMP " *\n";
+print INST_IMP " * Do not modify this file directly, as it was created by opcode2c.pl\n";
+print INST_IMP " * Any modifications made directly to this file will be lost.\n";
+print INST_IMP " *\n";
+print INST_IMP " * Copyright (C) 1999 Jonathan St-André\n";
+print INST_IMP " * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>\n";
+print INST_IMP " *\n";
+print INST_IMP " * This program is free software; you can redistribute it and/or modify\n";
+print INST_IMP " * it under the terms of the GNU General Public License as published by\n";
+print INST_IMP " * the Free Software Foundation; either version 2 of the License, or\n";
+print INST_IMP " * (at your option) any later version.\n";
+print INST_IMP " *\n";
+print INST_IMP " * This program is distributed in the hope that it will be useful,\n";
+print INST_IMP " * but WITHOUT ANY WARRANTY; without even the implied warranty of\n";
+print INST_IMP " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n";
+print INST_IMP " * GNU General Public License for more details.\n";
+print INST_IMP " *\n";
+print INST_IMP " * You should have received a copy of the GNU General Public License\n";
+print INST_IMP " * along with this program; if not, write to the Free Software\n";
+print INST_IMP " * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n";
+print INST_IMP "*/\n\n";
print INST_IMP "/* Define only here, for not having extern scope on local variables. */\n";
print INST_IMP "#define INSTRUCTIONS_8051_M 1\n\n\n";
print INST_IMP "#include \"reg8051.h\"\n";
print INST_IMP "#include \"memory.h\"\n";
print INST_IMP "#include \"instructions_8051.h\"\n\n\n";
-print DISASM_H "/* disasm.h */\n\n\n";
-print DISASM_H "/* Do not modify this file directly, as it was created by opcode2c.pl\n";
-print DISASM_H " * Any modifications made directly to this file will be lost. */\n\n\n";
+# Header for disasm.h
+print DISASM_H "/*\n";
+print DISASM_H " * disasm.h\n";
+print DISASM_H " *\n";
+print DISASM_H " * Do not modify this file directly, as it was created by opcode2c.pl\n";
+print DISASM_H " * Any modifications made directly to this file will be lost.\n";
+print DISASM_H " *\n";
+print DISASM_H " * Copyright (C) 1999 Jonathan St-André\n";
+print DISASM_H " * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>\n";
+print DISASM_H " *\n";
+print DISASM_H " * This program is free software; you can redistribute it and/or modify\n";
+print DISASM_H " * it under the terms of the GNU General Public License as published by\n";
+print DISASM_H " * the Free Software Foundation; either version 2 of the License, or\n";
+print DISASM_H " * (at your option) any later version.\n";
+print DISASM_H " *\n";
+print DISASM_H " * This program is distributed in the hope that it will be useful,\n";
+print DISASM_H " * but WITHOUT ANY WARRANTY; without even the implied warranty of\n";
+print DISASM_H " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n";
+print DISASM_H " * GNU General Public License for more details.\n";
+print DISASM_H " *\n";
+print DISASM_H " * You should have received a copy of the GNU General Public License\n";
+print DISASM_H " * along with this program; if not, write to the Free Software\n";
+print DISASM_H " * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n";
+print DISASM_H "*/\n\n";
print DISASM_H "#ifndef DISASM_H\n";
print DISASM_H "#define DISASM_H 1\n\n\n";
-
$nbinst=0;
$nbaddr=0;
$nbargs=0;
# ------------------------------------------------------------------------------
+# Header for instructions_8051.h
+print INST_DEF "/*\n";
+print INST_DEF " * instructions_8051.h\n";
+print INST_DEF " *\n";
+print INST_DEF " * Do not modify this file directly, as it was created by opcode2c.pl\n";
+print INST_DEF " * Any modifications made directly to this file will be lost.\n";
+print INST_DEF " *\n";
+print INST_DEF " * Copyright (C) 1999 Jonathan St-André\n";
+print INST_DEF " * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>\n";
+print INST_DEF " *\n";
+print INST_DEF " * This program is free software; you can redistribute it and/or modify\n";
+print INST_DEF " * it under the terms of the GNU General Public License as published by\n";
+print INST_DEF " * the Free Software Foundation; either version 2 of the License, or\n";
+print INST_DEF " * (at your option) any later version.\n";
+print INST_DEF " *\n";
+print INST_DEF " * This program is distributed in the hope that it will be useful,\n";
+print INST_DEF " * but WITHOUT ANY WARRANTY; without even the implied warranty of\n";
+print INST_DEF " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n";
+print INST_DEF " * GNU General Public License for more details.\n";
+print INST_DEF " *\n";
+print INST_DEF " * You should have received a copy of the GNU General Public License\n";
+print INST_DEF " * along with this program; if not, write to the Free Software\n";
+print INST_DEF " * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n";
+print INST_DEF "*/\n\n";
-print INST_DEF "/* instructions_8051.h */\n\n\n";
-print INST_DEF "/* Do not modify this file directly, as it was created by opcode2c.pl\n";
-print INST_DEF " * Any modifications made directly to this file will be lost. */\n\n\n";
print INST_DEF "#ifndef INSTRUCTIONS_8051_H\n";
print INST_DEF "#define INSTRUCTIONS_8051_H 1\n\n\n";
print INST_DEF "#define BANKPSW ( cpu8051_ReadD( _PSW_ ) & 0x18 )\n\n";
close OPCODELST;
close INST_DEF;
close INST_IMP;
-
-
-/* options.c -- functions for processing command-line options and arguments
- Copyright (C) 2003 Hugo Villeneuve */
-
+/*
+ * Processing command-line options and arguments.
+ *
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#if HAVE_CONFIG_H
# include "config.h"
-/* options.h */
+/*
+ * options.h
+ *
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#ifndef OPTIONS_H
#define OPTIONS_H 1
-/* pgmwin.c */
-
+/*
+ * pgmwin.c
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#if HAVE_CONFIG_H
# include "config.h"
-/* pgmwin.h */
-
+/*
+ * pgmwin.h
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#ifndef PGMWIN_H
#define PGMWIN_H 1
-/* reg8051.h */
-
+/*
+ * reg8051.h
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#ifndef REG8051_H
#define REG8051_H 1
-/* regwin.cpp */
-
+/*
+ * regwin.cpp
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#if HAVE_CONFIG_H
# include "config.h"
-/* regwin.h */
-
+/*
+ * regwin.h
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#ifndef REGWIN_H
#define REGWIN_H 1
-/* viewmenu.c */
-
+/*
+ * viewmenu.c
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#if HAVE_CONFIG_H
# include "config.h"
-/* viewmenu.h */
-
+/*
+ * viewmenu.h
+ *
+ * Copyright (C) 1999 Jonathan St-André
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
#ifndef VIEWMENU_H
#define VIEWMENU_H 1