! This method /attempts/ to retrieve a message -- It may not be possible, as in the case of an empty receive buffer. If a message is available, ?BX? is set to the message's label, and ~?BX? is set to its data. */
| 8284 | to its data. |
| 8285 | */ |
| 8286 | bool cHardwareCPU::Inst_RetrieveMessage(cAvidaContext&) |
| 8287 | { |
| 8288 | std::pair<bool, cOrgMessage> retrieved = m_organism->RetrieveMessage(); |
| 8289 | if (!retrieved.first) { |
| 8290 | return false; |
| 8291 | } |
| 8292 | |
| 8293 | const int label_reg = FindModifiedRegister(REG_BX); |
| 8294 | const int data_reg = FindNextRegister(label_reg); |
| 8295 | |
| 8296 | GetRegister(label_reg) = retrieved.second.GetLabel(); |
| 8297 | GetRegister(data_reg) = retrieved.second.GetData(); |
| 8298 | if(m_world->GetConfig().NET_LOG_RETMESSAGES.Get()) m_world->GetStats().LogRetMessage(retrieved.second); |
| 8299 | return true; |
| 8300 | } |
| 8301 | |
| 8302 | bool cHardwareCPU::Inst_Alarm_MSG_multihop(cAvidaContext& ctx) |
| 8303 | { |
nothing calls this directly
no test coverage detected