mirror of
https://github.com/brouhaha/dis6502.git
synced 2024-05-30 06:41:27 +00:00
added -7 option. added copyright notice.
This commit is contained in:
parent
a3cba2411d
commit
a627dee5e4
26
dis.h
26
dis.h
|
@ -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;
|
typedef uint16_t addr_t;
|
||||||
|
|
||||||
#define NPREDEF 10
|
#define NPREDEF 10
|
||||||
|
|
|
@ -45,7 +45,10 @@ Read in the predefine file \fIpfile\fP.
|
||||||
Up to 20 \fI-p\fP options may be included.
|
Up to 20 \fI-p\fP options may be included.
|
||||||
.TP
|
.TP
|
||||||
.I \-v \fIaddress\fP
|
.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
|
.PP
|
||||||
Lines in pfile consist of:
|
Lines in pfile consist of:
|
||||||
.PP
|
.PP
|
||||||
|
@ -69,6 +72,6 @@ the trace process to continue at the address given.
|
||||||
.I .stop
|
.I .stop
|
||||||
causes the
|
causes the
|
||||||
trace process to stop at the address given.
|
trace process to stop at the address given.
|
||||||
.SH AUTHOR
|
.SH AUTHORS
|
||||||
Robert Bond, Udi Finkelstein, and Eric Smith
|
Robert Bond, Udi Finkelstein, and Eric Smith
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
|
|
|
@ -29,7 +29,8 @@ void usage (void)
|
||||||
" -c Commodore 64\n"
|
" -c Commodore 64\n"
|
||||||
" options: -a assembly output\n"
|
" options: -a assembly output\n"
|
||||||
" -p <file> predefs\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);
|
progname);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
@ -81,6 +82,9 @@ void initopts (int argc, char *argv[])
|
||||||
case 'b':
|
case 'b':
|
||||||
bopt = ATARI_BOOT;
|
bopt = ATARI_BOOT;
|
||||||
break;
|
break;
|
||||||
|
case '7':
|
||||||
|
sevenbit = 1;
|
||||||
|
break;
|
||||||
default: crash("Invalid option letter");
|
default: crash("Invalid option letter");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
25
main.c
25
main.c
|
@ -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 <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "dis.h"
|
#include "dis.h"
|
||||||
|
|
||||||
|
int sevenbit = 0; /* if true, mask character data with 0x7f to ignore MSB */
|
||||||
|
|
||||||
#define NTSTART 500
|
#define NTSTART 500
|
||||||
|
|
||||||
char *cur_file = NULL; /* the file thats open */
|
char *cur_file = NULL; /* the file thats open */
|
||||||
|
|
25
print.c
25
print.c
|
@ -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 <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -116,6 +139,8 @@ void dumpitout (void)
|
||||||
|
|
||||||
int pchar (int c)
|
int pchar (int c)
|
||||||
{
|
{
|
||||||
|
if (sevenbit)
|
||||||
|
c &= 0x7f;
|
||||||
if (isascii(c) && isprint(c))
|
if (isascii(c) && isprint(c))
|
||||||
return(c);
|
return(c);
|
||||||
return('.');
|
return('.');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user