/* * $Id: dlxdisasm.c,v 1.5 2005/01/24 12:17:27 mah Exp $ * Christoph Berg * * 011213 */ #include #include #include #include #include #include #include "dlx.h" #include "help.h" #include "hex.h" #include "memory.h" #define VERSION "v4.0alpha" int main(int argc, char **argv) { int start; int length; printf("dlxsim " VERSION " (" __DATE__ ")\n"); if(argc != 2 && argc != 4) { printf("Usage: %s object [start length]\n", argv[0]); exit(1); } init_memory(INIT_MEMORY_SIZE); load_file(argv[1]); if(argc == 2) { start = state.text; length = state.textsize; } else { start = str2int(argv[2]); length = str2int(argv[3]); } disassemble_memory(state.memory, start, length); return 0; }