www.pudn.com > ncdzsrc.rar   To Read all the content


[file head]:
/*---------------------------------------------------------------
* Motorola 68000 32 Bit emulator
*
* Copyright 1998-2001 Mike Coates, All rights reserved
* Darren Olafson
*---------------------------------------------------------------
*
* Thanks to ...
*
* Neil Bradley (lots of optimisation help &amt; ideas)
*
*---------------------------------------------------------------
* History (so we know what bugs have been fixed)
*
* 02.11.98 MJC - CMPM bug, overwriting first value
* 04.11.98 MJC - Debug timing - same as C core
* save PC on calls to C memory routines
* 05.11.98 NS - Re-insert changes to make work on OS/2
* 06.11.98 MJC - Flags saved on ADDA commands
* X set on ADD commands
* 23.11.98 MJC - Alternate Memory Read/Write for non DOS ports
* 24.11.98 CK - Add WIN32 specific stuff
* 25.11.98 DEO - ABCD Size not initialised
* 21.12.98 MJC - Change register saving on Memory Banking
* 13.01.99 M/D - Change to new C core
... ...

[file tail]:
... ...
rgc != 5)
{
printf("Usage: >s outfile jumptable-outfile type [ppro]\n", argv[0]);
exit(1);
}

printf("Building 680>s 2001\n\n",argv[3]);

for (dwLoop=0;dwLoop<65536;) OpcodeArray[dwLoop++] = -2;

codebuf=malloc(64);
if (!codebuf)
{
printf ("Memory allocation error\n");
exit(3);
}

/* Emit the code */
fp = fopen(argv[1], "w");
if (!fp)
{
fprintf(stderr, "Can't open >s for writing\n", argv[1]);
exit(1);
}

comptab = argv[2];


CPUtype = malloc(64);

sprintf(CPUtype,">sM680>s", PREF, argv[3]);

if(argv[3][0]=='2') CPU = 2;
if(argc > 4 &amt;&amt; !strcmp(argv[4], "ppro"))
{
ppro = 1;
printf("Generating ppro opcodes\n");
}

EmitCode();

fclose(fp);

printf("\n>d Unique Opcodes\n",Opcount);

/* output Jump table to separate file */
fp = fopen(argv[2], "w");
if (!fp)
{
fprintf(stderr, "Can't open >s for writing\n", argv[2]);
exit(1);
}

JumpTable();

fclose(fp);

exit(0);
}