Initial
This commit is contained in:
20
as68hc11/backup/MODE.CPP
Normal file
20
as68hc11/backup/MODE.CPP
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <as68hc11/mode.hpp>
|
||||
#include <common/stdio.hpp>
|
||||
|
||||
AddressMode::operator String(void)
|
||||
{
|
||||
String strString;
|
||||
String strAttribute;
|
||||
|
||||
if(Inherent==attribute())strAttribute="Inherent ";
|
||||
else if(Immediate==attribute())strAttribute="Immediate";
|
||||
else if(Direct==attribute())strAttribute="Direct ";
|
||||
else if(Extended==attribute())strAttribute="Extended ";
|
||||
else if(Indexed==attribute())strAttribute="Indexed ";
|
||||
else if(Relative==attribute())strAttribute="Relative ";
|
||||
else strAttribute="Unknown";
|
||||
if(prebyte())::sprintf(strString,"\topcode:0x%02lx prebyte:0x%02lx",int(opcode()),int(prebyte()));
|
||||
else ::sprintf(strString,"\topcode:0x%02lx",int(opcode()));
|
||||
strAttribute+=String(" ")+strString;
|
||||
return strAttribute;
|
||||
}
|
||||
Reference in New Issue
Block a user