File:  [Isaki's NoNo m68k/m88k emulator] / nono / debugger / disasm.h
Revision 1.1.1.8 (vendor branch): download - view: text, annotated - select for diffs
Wed Apr 29 17:05:58 2026 UTC (2 months, 3 weeks ago) by root
Branches: MAIN, Isaki
CVS tags: v027, HEAD
nono 1.7.0

//
// nono
// Copyright (C) 2020 nono project
// Licensed under nono-license.txt
//

//
// 逆アセンブラ (共通部分)
//

#pragma once

#include "debugger_private.h"

// 逆アセンブラ(1行分)の基本クラス。
class DisasmLine
{
 public:
	virtual ~DisasmLine();

	// mem の位置を1命令逆アセンブルする。
	// 成功すれば true、失敗すれば false を返す?
	// 成功すれば text に出力文字列、ir に命令バイナリがセットされている。
	virtual bool Exec(DebuggerMemoryStream *memp) = 0;

	// 出力文字列(ダンプ)
	std::string dump {};

	// 出力文字列(命令)
	std::string text {};

	// 別名 (m88k で使う)
	std::string alttext {};

	// この命令のバイナリ列
	// (メモリイメージ順)
	std::vector<uint8> bin {};

	// メモリアクセス
	DebuggerMemoryStream *mem {};

 protected:
	// 継承先の Exec() の先頭で呼び出すこと。
	void ExecInit(DebuggerMemoryStream *mem_) {
		mem = mem_;
		dump.clear();
		text.clear();
		alttext.clear();
		bin.clear();
	}
};

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.