Rocket 68
A Motorola 68000 CPU emulator in C
Loading...
Searching...
No Matches
disasm.c File Reference

68000 instruction disassembler implementation. More...

#include "disasm.h"
#include <stdio.h>
#include <string.h>

Macros

#define snprintf_s(buf, sz, fmt, ...)
#define DISASM_EA_SIZE   24
#define DISASM_OP_SIZE   32
#define DISASM_ARGS_SIZE   64

Functions

int m68k_disasm (M68kCpu *cpu, u32 pc, char *buffer, int buf_size)
 Disassemble one instruction at a program counter.

Detailed Description

68000 instruction disassembler implementation.

Macro Definition Documentation

◆ DISASM_ARGS_SIZE

#define DISASM_ARGS_SIZE   64

◆ DISASM_EA_SIZE

#define DISASM_EA_SIZE   24

◆ DISASM_OP_SIZE

#define DISASM_OP_SIZE   32

◆ snprintf_s

#define snprintf_s ( buf,
sz,
fmt,
... )
Value:
snprintf(buf, sz, fmt, ##__VA_ARGS__)

Function Documentation

◆ m68k_disasm()

int m68k_disasm ( M68kCpu * cpu,
u32 pc,
char * buffer,
int buf_size )

Disassemble one instruction at a program counter.

Parameters
cpuCPU instance used for instruction fetches.
pcProgram counter to disassemble from.
bufferDestination text buffer.
buf_sizeSize of buffer in bytes.
Returns
Number of bytes consumed by the instruction.