MCPcopy Create free account
hub / github.com/TASEmulators/fceux / updateAssemblyView

Method updateAssemblyView

src/drivers/Qt/ConsoleDebugger.cpp:3824–4118  ·  view source on GitHub ↗

static int InstructionDown(int from) { int tmp = opsize[GetMem(from)]; if ((tmp)) return from + tmp; else return from + 1; // this is data or undefined instruction } ----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

3822//}
3823//----------------------------------------------------------------------------
3824void QAsmView::updateAssemblyView(void)
3825{
3826 int starting_address, start_address_lp, addr, size;
3827 int instruction_addr, asmFlags = 0;
3828 std::string line;
3829 char chr[64];
3830 uint8 opcode[3];
3831 char asmTxt[256];
3832 dbg_asm_entry_t *a, *d;
3833 char pc_found = 0;
3834
3835 start_address_lp = starting_address = X.PC;
3836
3837 for (int i=0; i < 0xFFFF; i++)
3838 {
3839 //printf("%i: Start Address: 0x%04X \n", i, start_address_lp );
3840
3841 starting_address = InstructionUp( start_address_lp );
3842
3843 if ( starting_address == start_address_lp )
3844 {
3845 break;
3846 }
3847 if ( starting_address < 0 )
3848 {
3849 starting_address = start_address_lp;
3850 break;
3851 }
3852 start_address_lp = starting_address;
3853 }
3854
3855 maxLineLen = 0;
3856
3857 asmClear();
3858
3859 addr = starting_address;
3860 asmPC = NULL;
3861
3862 if ( symbolicDebugEnable )
3863 {
3864 asmFlags |= ASM_DEBUG_SYMS | ASM_DEBUG_REPLACE;
3865
3866 if ( registerNameEnable )
3867 {
3868 asmFlags |= ASM_DEBUG_REGS;
3869 }
3870 }
3871
3872 if ( showTraceData )
3873 {
3874 asmFlags |= ASM_DEBUG_TRACES;
3875 }
3876
3877 for (int i=0; i < 0xFFFF; i++)
3878 {
3879 line.clear();
3880
3881 // PC pointer

Callers 5

changeAsmFontCBMethod · 0.45
reloadSymbolsCBMethod · 0.45
updateWindowDataMethod · 0.45
asmLookAheadPopupMethod · 0.45

Calls 11

GetNesFileAddressFunction · 0.85
getBankFunction · 0.85
GetMemFunction · 0.85
DisassembleWithDebugFunction · 0.85
getSymbolAtBankOffsetMethod · 0.80
hideMethod · 0.80
showMethod · 0.80
InstructionUpFunction · 0.70
clearMethod · 0.45
sizeMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected