1
0
mirror of https://github.com/brouhaha/dis6502.git synced 2024-11-27 07:50:58 +00:00

added -7 option. added copyright notice.

This commit is contained in:
Eric Smith 2003-09-15 21:46:32 +00:00
parent a3cba2411d
commit a627dee5e4
5 changed files with 86 additions and 3 deletions

26
dis.h
View File

@ -1,3 +1,29 @@
/*
* dis6502 by Robert Bond, Udi Finkelstein, and Eric Smith
*
* $Id: dis.h,v 1.5 2003/09/15 21:46:32 eric Exp $
* Copyright 2000-2003 Eric Smith <eric@brouhaha.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. Note that permission is
* not granted to redistribute this program under the terms of any
* other version of the General Public License.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111 USA
*/
extern int sevenbit; /* if true, mask character data with 0x7f
to ignore MSB */
typedef uint16_t addr_t;
#define NPREDEF 10

View File

@ -45,7 +45,10 @@ Read in the predefine file \fIpfile\fP.
Up to 20 \fI-p\fP options may be included.
.TP
.I \-v \fIaddress\fP
Usa an alternate address for the reset and interrupt vectors.
Use an alternate address for the reset and interrupt vectors.
.TP
.I \-7
Mask off MSB of character data.
.PP
Lines in pfile consist of:
.PP
@ -69,6 +72,6 @@ the trace process to continue at the address given.
.I .stop
causes the
trace process to stop at the address given.
.SH AUTHOR
.SH AUTHORS
Robert Bond, Udi Finkelstein, and Eric Smith
.SH BUGS

View File

@ -29,7 +29,8 @@ void usage (void)
" -c Commodore 64\n"
" options: -a assembly output\n"
" -p <file> predefs\n"
" -v <address> alternate vector address\n",
" -v <address> alternate vector address\n"
" -7 mask character data to 7-bit",
progname);
exit (1);
}
@ -81,6 +82,9 @@ void initopts (int argc, char *argv[])
case 'b':
bopt = ATARI_BOOT;
break;
case '7':
sevenbit = 1;
break;
default: crash("Invalid option letter");
}
}

25
main.c
View File

@ -1,9 +1,34 @@
/*
* dis6502 by Robert Bond, Udi Finkelstein, and Eric Smith
*
* $Id: main.c,v 1.7 2003/09/15 21:46:32 eric Exp $
* Copyright 2000-2003 Eric Smith <eric@brouhaha.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. Note that permission is
* not granted to redistribute this program under the terms of any
* other version of the General Public License.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111 USA
*/
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "dis.h"
int sevenbit = 0; /* if true, mask character data with 0x7f to ignore MSB */
#define NTSTART 500
char *cur_file = NULL; /* the file thats open */

25
print.c
View File

@ -1,3 +1,26 @@
/*
* dis6502 by Robert Bond, Udi Finkelstein, and Eric Smith
*
* $Id: print.c,v 1.7 2003/09/15 21:46:32 eric Exp $
* Copyright 2000-2003 Eric Smith <eric@brouhaha.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. Note that permission is
* not granted to redistribute this program under the terms of any
* other version of the General Public License.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111 USA
*/
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@ -116,6 +139,8 @@ void dumpitout (void)
int pchar (int c)
{
if (sevenbit)
c &= 0x7f;
if (isascii(c) && isprint(c))
return(c);
return('.');