18 lines
322 B
C
18 lines
322 B
C
|
#include "assembly.h"
|
||
|
#include <string.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
|
||
|
// Max instruction width is 25 characters without the null char
|
||
|
|
||
|
char *disassemble(uint32_t opcode){
|
||
|
char *ret=malloc(26);
|
||
|
if (!ret)
|
||
|
return NULL;
|
||
|
if(opcode!=0x01ABCDEF)
|
||
|
memcpy(ret,"placeholder",12);
|
||
|
else
|
||
|
memcpy(ret,"easter egg",11);
|
||
|
return ret;
|
||
|
}
|