Do you receive the Programmer's Heaven newsletter? If not, why not subscribe?
*/
*/

View \SIM.H

MC68705R3 simulator with source

Submitted By: WEBMASTER
Rating: Not rated (Rate It)


typedef int (*PFI)();    /* Pointer to Function Returning Integer */

/* Pick one of the following two: */
#define MSC     /* Uncomment for IBM-PC, Microsoft C 5.0 */
   /* MSC screen control uses microsoft's graphics library and DOS BIOS 6 */
/* #define VT52      Uncomment for ATARI ST, Mark Williams C 3.0 */
   /* ST screen control uses VT52 escape sequences.  The ST emulates a VT52 */

#define DIRECT 0
#define ACCUM 1
#define X_REGISTER 2
#define AT_X_BYTE_OFFSET 3
#define AT_X 4
#define INH 5
#define IMM 6
#define EXT 7
#define AT_X_WORD_OFFSET 8
#define REL 9
#define BTB 10
/* Actually, table says INH for things that read/store X */
/* The following is used by instr routines to call get_ea, etc */
#define XREG 11

struct program_model {
    int a;
    int x;
    int pc;
    int sp;
    int ccr;
};

#define CC_C 1
#define CC_Z 2
#define CC_N 4
#define CC_I 8
#define CC_H 16

#ifndef INSTR_C
extern struct program_model pgm_model;
extern char rw[], opcode[], mne[];
#endif

#ifndef SIMR3_C
extern int display_enabled, log_enabled, promptline_full;
extern int external_intr, timer_external_input;
extern int disassemble;
extern long int cycle_count;
#endif

#define PORT_A_DATA 0
#define PORT_B_DATA 1
#define PORT_C_DATA 2
#define PORT_D_DATA 3
#define PORT_A_DDR 4
#define PORT_B_DDR 5
#define PORT_C_DDR 6
#define TIMER_DATA 8
#define TIMER_CONTROL 9
#define MISC_REGISTER 10
#define EPROM_PGM_CTRL 11
#define AD_CTRL_REG 14
#define AD_REG 15
#define RAM_START 0x10
#define RAM_END 0x7F
#define PROM_START 0x80
#define PROM_END 0xF37
#define MASK_OPT_REG 0xF38
#define NOT_USED_START 0xF39
#define NOT_USED_END 0xF7F
#define BOOTSTRAP_ROM_START 0xF80
#define BOOTSTRAP_ROM_END 0xFF7
#define VECTORS_START 0xFF8
#define VECTORS_END 0xFFF
   /* timer int, ext int, swi, reset */

/* display: lines 1-4 title and menu; line 5 separator; */
#define PROMPTLINE 6
/* lines 7 - 24 simulator trace */

/* Defines for registers understood by get_ea, sim_read, sim_write */
#define RW_A -1
#define RW_X -2
#define RW_SP -3

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.
Resource Listings