MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / CmdMemoryEnterByte

Function CmdMemoryEnterByte

source/Debugger/Debug.cpp:4294–4321  ·  view source on GitHub ↗

MEB addr 8_bit_value ===========================================================================

Source from the content-addressed store, hash-verified

4292// MEB addr 8_bit_value
4293//===========================================================================
4294Update_t CmdMemoryEnterByte (int nArgs)
4295{
4296 if ((nArgs < 2) ||
4297 ((g_aArgs[2].sArg[0] != '0') && (!g_aArgs[2].nValue))) // arg2 not numeric or not specified
4298 {
4299 Help_Arg_1( CMD_MEMORY_ENTER_WORD );
4300 }
4301
4302 WORD nAddress = g_aArgs[1].nValue;
4303 while (nArgs >= 2)
4304 {
4305 WORD nData = g_aArgs[nArgs].nValue;
4306
4307 if (nData > 0xFF)
4308 {
4309 WriteByteToMemory(nAddress + nArgs - 2, (BYTE)(nData >> 0));
4310 WriteByteToMemory(nAddress + nArgs - 1, (BYTE)(nData >> 8));
4311 }
4312 else
4313 {
4314 WriteByteToMemory(nAddress + nArgs - 2, (BYTE)nData);
4315 }
4316
4317 nArgs--;
4318 }
4319
4320 return UPDATE_ALL;
4321}
4322
4323// MEW addr 16-bit_vaue
4324//===========================================================================

Callers

nothing calls this directly

Calls 2

Help_Arg_1Function · 0.85
WriteByteToMemoryFunction · 0.85

Tested by

no test coverage detected