First/assembly.c

18 lines
322 B
C
Raw Normal View History

2024-01-29 12:48:53 +00:00
#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;
}