Classes | Macros | Functions | Variables
test_m680x.c File Reference
#include <stdio.h>
#include <string.h>
#include <capstone/platform.h>
#include <capstone/capstone.h>
Include dependency graph for test_m680x.c:

Go to the source code of this file.

Classes

struct  platform
 

Macros

#define ARR_SIZE(a)   (sizeof(a)/sizeof(a[0]))
 
#define CPU12_CODE
 
#define HCS08_CODE
 
#define HD6301_CODE   "\x6b\x10\x00\x71\x10\x00\x72\x10\x10\x39"
 
#define HD6309_CODE
 
#define M6800_CODE   "\x01\x09\x36\x64\x7f\x74\x10\x00\x90\x10\xA4\x10\xb6\x10\x00\x39"
 
#define M6801_CODE   "\x04\x05\x3c\x3d\x38\x93\x10\xec\x10\xed\x10\x39"
 
#define M6805_CODE
 
#define M6808_CODE
 
#define M6809_CODE
 
#define M6811_CODE
 
#define WITH_DETAILS
 

Functions

static bool consistency_checks ()
 
int main ()
 
static void print_insn_detail (csh handle, cs_insn *insn)
 
static void print_read_write_regs (csh handle, cs_detail *detail)
 
static void print_string_hex (const char *comment, unsigned char *str, size_t len)
 
static void print_string_hex_short (unsigned char *str, size_t len)
 
static void test ()
 

Variables

static const char * s_access []
 

Macro Definition Documentation

◆ ARR_SIZE

#define ARR_SIZE (   a)    (sizeof(a)/sizeof(a[0]))

Definition at line 10 of file test_m680x.c.

◆ CPU12_CODE

#define CPU12_CODE
Value:
"\x00\x04\x01\x00\x0c\x00\x80\x0e\x00\x80\x00\x11\x1e\x10\x00\x80\x00" \
"\x3b\x4a\x10\x00\x04\x4b\x01\x04\x4f\x7f\x80\x00\x8f\x10\x00\xb7\x52" \
"\xb7\xb1\xa6\x67\xa6\xfe\xa6\xf7\x18\x02\xe2\x30\x39\xe2\x10\x00" \
"\x18\x0c\x30\x39\x10\x00\x18\x11\x18\x12\x10\x00\x18\x19\x00\x18\x1e\x00" \
"\x18\x3e\x18\x3f\x00"

◆ HCS08_CODE

#define HCS08_CODE
Value:
"\x32\x10\x00\x9e\xae\x9e\xce\x7f\x9e\xbe\x10\x00\x9e\xfe\x7f" \
"\x3e\x10\x00\x9e\xf3\x7f\x96\x10\x00\x9e\xff\x7f\x82"

◆ HD6301_CODE

#define HD6301_CODE   "\x6b\x10\x00\x71\x10\x00\x72\x10\x10\x39"

◆ HD6309_CODE

#define HD6309_CODE
Value:
"\x01\x10\x10\x62\x10\x10\x7b\x10\x10\x00\xcd\x49\x96\x02\xd2" \
"\x10\x30\x23\x10\x38\x10\x3b\x10\x53\x10\x5d" \
"\x11\x30\x43\x10\x11\x37\x25\x10\x11\x38\x12\x11\x39\x23\x11\x3b\x34" \
"\x11\x8e\x10\x00\x11\xaf\x10\x11\xab\x10\x11\xf6\x80\x00"

◆ M6800_CODE

#define M6800_CODE   "\x01\x09\x36\x64\x7f\x74\x10\x00\x90\x10\xA4\x10\xb6\x10\x00\x39"

◆ M6801_CODE

#define M6801_CODE   "\x04\x05\x3c\x3d\x38\x93\x10\xec\x10\xed\x10\x39"

◆ M6805_CODE

#define M6805_CODE
Value:
"\x04\x7f\x00\x17\x22\x28\x00\x2e\x00\x40\x42\x5a\x70\x8e\x97\x9c" \
"\xa0\x15\xad\x00\xc3\x10\x00\xda\x12\x34\xe5\x7f\xfe"

◆ M6808_CODE

#define M6808_CODE
Value:
"\x31\x22\x00\x35\x22\x45\x10\x00\x4b\x00\x51\x10\x52\x5e\x22\x62" \
"\x65\x12\x34\x72\x84\x85\x86\x87\x8a\x8b\x8c\x94\x95\xa7\x10\xaf\x10" \
"\x9e\x60\x7f\x9e\x6b\x7f\x00\x9e\xd6\x10\x00\x9e\xe6\x7f"

◆ M6809_CODE

#define M6809_CODE
Value:
"\x06\x10\x19\x1a\x55\x1e\x01\x23\xe9\x31\x06\x34\x55\xa6\x81" \
"\xa7\x89\x7f\xff\xa6\x9d\x10\x00\xa7\x91\xa6\x9f\x10\x00" \
"\x11\xac\x99\x10\x00\x39" \
\
"\xA6\x07\xA6\x27\xA6\x47\xA6\x67\xA6\x0F\xA6\x10" \
"\xA6\x80\xA6\x81\xA6\x82\xA6\x83\xA6\x84\xA6\x85\xA6\x86" \
"\xA6\x88\x7F\xA6\x88\x80\xA6\x89\x7F\xFF\xA6\x89\x80\x00" \
"\xA6\x8B\xA6\x8C\x10\xA6\x8D\x10\x00" \
\
"\xA6\x91\xA6\x93\xA6\x94\xA6\x95\xA6\x96" \
"\xA6\x98\x7F\xA6\x98\x80\xA6\x99\x7F\xFF\xA6\x99\x80\x00" \
"\xA6\x9B\xA6\x9C\x10\xA6\x9D\x10\x00\xA6\x9F\x10\x00"

◆ M6811_CODE

#define M6811_CODE
Value:
"\x02\x03\x12\x7f\x10\x00\x13\x99\x08\x00\x14\x7f\x02\x15\x7f\x01" \
"\x1e\x7f\x20\x00\x8f\xcf" \
"\x18\x08\x18\x30\x18\x3c\x18\x67\x18\x8c\x10\x00\x18\x8f" \
"\x18\xce\x10\x00\x18\xff\x10\x00" \
"\x1a\xa3\x7f\x1a\xac\x1a\xee\x7f\x1a\xef\x7f\xcd\xac\x7f"

◆ WITH_DETAILS

#define WITH_DETAILS

Definition at line 12 of file test_m680x.c.

Function Documentation

◆ consistency_checks()

static bool consistency_checks ( )
static

Definition at line 189 of file test_m680x.c.

◆ main()

int main ( )

Definition at line 394 of file test_m680x.c.

◆ print_insn_detail()

static void print_insn_detail ( csh  handle,
cs_insn *  insn 
)
static

Definition at line 71 of file test_m680x.c.

◆ print_read_write_regs()

static void print_read_write_regs ( csh  handle,
cs_detail *  detail 
)
static

Definition at line 46 of file test_m680x.c.

◆ print_string_hex()

static void print_string_hex ( const char *  comment,
unsigned char *  str,
size_t  len 
)
static

Definition at line 22 of file test_m680x.c.

◆ print_string_hex_short()

static void print_string_hex_short ( unsigned char *  str,
size_t  len 
)
static

Definition at line 34 of file test_m680x.c.

◆ test()

static void test ( )
static

Definition at line 194 of file test_m680x.c.

Variable Documentation

◆ s_access

const char* s_access[]
static
Initial value:
= {
"UNCHANGED", "READ", "WRITE", "READ | WRITE",
}

Definition at line 42 of file test_m680x.c.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:34