Add licencing information to each source file

Remove some debug messages.
This commit is contained in:
Hugo Villeneuve 2008-11-05 06:49:45 +00:00
parent 82756d9818
commit 6a65dca9d5
37 changed files with 770 additions and 98 deletions

View File

@ -1,5 +1,8 @@
Hugo Villeneuve
Jonathan St-André
Pascal Fecteau
Jimmy Ringuette

View File

@ -1,3 +1,11 @@
------------------------------------------------------------------------------
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>

3
NEWS
View File

@ -1,4 +1,7 @@
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

View File

@ -1,7 +1,7 @@
# 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)

View File

@ -1,4 +1,23 @@
/* 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>

View File

@ -1,3 +1,24 @@
/*
* 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_

View File

@ -1,4 +1,23 @@
// 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_

View File

@ -1,8 +1,29 @@
/* 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>
@ -14,14 +35,7 @@
# 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

View File

@ -1,5 +1,23 @@
/* 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

View File

@ -1,5 +1,23 @@
/* 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

View File

@ -1,3 +1,24 @@
/*
* 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

View File

@ -1,5 +1,23 @@
/* 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"
@ -38,7 +56,9 @@ extern char *hex_file;
static void
WindowDestroyEvent( GtkWidget *widget, gpointer data )
{
#ifdef EMU8051_DEBUG
g_print( "emugtk_DestroyEvent(...)\n" );
#endif
gtk_main_quit();
}
@ -241,7 +261,9 @@ AddMenuSeparator( GtkWidget *menu )
void
emugtk_UpdateDisplay( void )
{
#ifdef EMU8051_DEBUG
g_print( "emugtk_UpdateDisplay()\n" );
#endif
regwin_Show();
pgmwin_Disasm();
@ -292,7 +314,9 @@ emugtk_Step( void )
void
emugtk_ResetEvent( GtkWidget *widget, GdkEvent *event, gpointer data )
{
#ifdef EMU8051_DEBUG
g_print( "emugtk_ResetEvent(...)\n" );
#endif
emugtk_StopRunning( );
emugtk_Reset( );
}
@ -304,7 +328,9 @@ emugtk_ResetEvent( GtkWidget *widget, GdkEvent *event, gpointer data )
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( );
@ -322,7 +348,9 @@ emugtk_RunEvent( GtkWidget *widget, GdkEvent *event, gpointer data )
void
emugtk_StopEvent( GtkWidget *widget, GdkEvent *event, gpointer data )
{
#ifdef EMU8051_DEBUG
g_print( "emugtk_StopEvent(...)\n" );
#endif
emugtk_StopRunning( );
}
@ -333,7 +361,9 @@ emugtk_StopEvent( GtkWidget *widget, GdkEvent *event, gpointer data )
void
emugtk_StepEvent( GtkWidget *widget, GdkEvent *event, gpointer data )
{
#ifdef EMU8051_DEBUG
g_print( "emugtk_StepEvent(...)\n" );
#endif
emugtk_StopRunning( );
emugtk_Step();
}
@ -347,7 +377,9 @@ emugtk_Running( )
{
cpu8051_Exec( );
if( pgmwin_IsBreakpoint( cpu8051.pc ) ) {
#ifdef EMU8051_DEBUG
g_print( "Breakpoint Hit, stopping!\n" );
#endif
emugtk_StopRunning( );
}
}
@ -371,9 +403,9 @@ void
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 );
@ -393,7 +425,9 @@ void
emugtk_StopRunning( )
{
if (RunningState) {
#ifdef EMU8051_DEBUG
printf( "emugtk_StopRunning( )\n" );
#endif
gtk_idle_remove( RunFuncTag );
RunningState = 0;
//gtk_widget_hide( GTK_WIDGET( ButtonStop ) );

View File

@ -1,5 +1,23 @@
/* 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
@ -9,16 +27,12 @@
#include "gtksizes.h"
void
AddMenuSeparator( GtkWidget *menu );
void
emugtk_new_file( char *file );
void
emugtk_StopRunning( void );
@ -28,14 +42,8 @@ emugtk_Reset( 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 );
@ -45,8 +53,4 @@ void emugtk_StartRunning( );
void emugtk_Running( );
#endif /* EMUGTK_H */

View File

@ -1,5 +1,23 @@
// 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_

View File

@ -1,5 +1,23 @@
/* 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"

View File

@ -1,5 +1,23 @@
/* 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

View File

@ -1,3 +1,24 @@
/*
* 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_

View File

@ -1,5 +1,23 @@
/* 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"

View File

@ -1,5 +1,23 @@
/* 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

View File

@ -1,6 +1,23 @@
/* 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"

View File

@ -1,12 +1,30 @@
/* 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 */

View File

@ -1,5 +1,23 @@
/* 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"

View File

@ -1,5 +1,23 @@
/* 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

View File

@ -1,5 +1,23 @@
/* 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"

View File

@ -1,5 +1,23 @@
/* 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

View File

@ -1,5 +1,23 @@
/* 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"

View File

@ -1,5 +1,23 @@
/* 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

View File

@ -1,14 +1,51 @@
#!/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";
@ -16,13 +53,33 @@ print INST_IMP "#include \"cpu8051.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;
@ -757,10 +814,31 @@ for ($i=0 ; $i< 256; $i++) {
# ------------------------------------------------------------------------------
# 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";
@ -801,5 +879,3 @@ close DISASM_H;
close OPCODELST;
close INST_DEF;
close INST_IMP;

View File

@ -1,6 +1,22 @@
/* 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"

View File

@ -1,4 +1,22 @@
/* 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

View File

@ -1,5 +1,23 @@
/* 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"

View File

@ -1,5 +1,23 @@
/* 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

View File

@ -1,5 +1,23 @@
/* 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

View File

@ -1,5 +1,23 @@
/* 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"

View File

@ -1,5 +1,23 @@
/* 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

View File

@ -1,5 +1,23 @@
/* 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"

View File

@ -1,5 +1,23 @@
/* 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