ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/mon/src/mon_68k.cpp
(Generate patch)

Comparing mon/src/mon_68k.cpp (file contents):
Revision 1.1.1.1 by cebix, 1999-10-04T19:31:09Z vs.
Revision 1.5 by cebix, 2000-04-24T13:10:08Z

# Line 1 | Line 1
1   /*
2   *  mon_m68k.cpp - 68k disassembler
3   *
4 < *  (C) 1997-1999 Marc Hellwig
4 > *  mon (C) 1997-2000 Christian Bauer, Marc Hellwig
5 > *
6 > *  This program is free software; you can redistribute it and/or modify
7 > *  it under the terms of the GNU General Public License as published by
8 > *  the Free Software Foundation; either version 2 of the License, or
9 > *  (at your option) any later version.
10 > *
11 > *  This program is distributed in the hope that it will be useful,
12 > *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 > *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 > *  GNU General Public License for more details.
15 > *
16 > *  You should have received a copy of the GNU General Public License
17 > *  along with this program; if not, write to the Free Software
18 > *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19   */
20  
21   /*
22 < * TODO
23 < * - add missing f-lines
24 < * - MULx.L/DIVx.L
25 < * - use tab instead of spaces
12 < */
13 <
14 < /*
15 < * LOG
16 < *
17 < * 5.11.97      added TODO and LOG section.
22 > *  TODO
23 > *   - add missing f-lines
24 > *   - MULx.L/DIVx.L
25 > *   - use tab instead of spaces
26   */
27  
28 < #include <stdio.h>
29 < #include <string.h>
28 > #include "sysdeps.h"
29 >
30 > #include <stdlib.h>
31  
32   #include "mon.h"
33   #include "mon_68k.h"
# Line 38 | Line 47 | static void add_int32_str (char *old,int
47   static void add_int16_str (char *old,int16 value);
48   static void add_int8_str (char *old,int8 value);
49   static void add_dec_int_str (char *old,int32 value);
41 static void add_uint16_str (char *old,uint16 value);
50   static void print_range (int from,int to);
51   static int decode_address_mode (uint16 eee,uint16 aaa,t_size size);
52   static void diss (char *ndest,uint16 *nmem,int &npos,unsigned int adr);
# Line 633 | Line 641 | static void add_dec_int_str (char *old,i
641          sprintf (&(old[strlen(old)]),"%d",value);
642   }
643  
636 static void add_uint16_str (char *old,uint16 value) {
637        sprintf (&(old[strlen(old)]),"$%04x",value);
638 }
639
644   static void print_range (int from,int to) {
645          if (from < 8) dest = strcat (dest,"d"); else dest = strcat(dest,"a");
646          add_dec_int_str(dest,from & 7);
# Line 801 | Line 805 | static int decode_address_mode (uint16 e
805                          case LONG_SILENT:
806                          case LONG:      add_int32_str(dest, read_int32()+old_mem*2+adr_off);
807                                                  break;
808 +                        default:
809 +                                                abort();
810 +                                                break;
811                          }
812                          break;
813          case AD_MULT: {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines