Line 4... |
Line 4... |
//
|
//
|
// Project: Zip CPU -- a small, lightweight, RISC CPU core
|
// Project: Zip CPU -- a small, lightweight, RISC CPU core
|
//
|
//
|
// Purpose: A quick test of whether we can decode opcodes properly. This
|
// Purpose: A quick test of whether we can decode opcodes properly. This
|
// test bypasses the assembler, and is useful when the assembler
|
// test bypasses the assembler, and is useful when the assembler
|
// isn't working. Now that we've got the assembler running, this
|
// isn't working. Now that we've got the assembler running, this code
|
// code isn't nearly as useful anymore.
|
// isn't nearly as useful anymore.
|
|
//
|
|
// Even more, now that we switched instruction sets, this code is all the
|
|
// more useless ... until updated.
|
//
|
//
|
// Creator: Dan Gisselquist, Ph.D.
|
// Creator: Dan Gisselquist, Ph.D.
|
// Gisselquist Technology, LLC
|
// Gisselquist Technology, LLC
|
//
|
//
|
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
Line 40... |
Line 43... |
|
|
#include "zopcodes.h"
|
#include "zopcodes.h"
|
|
|
|
|
void optest(const ZIPI ins) {
|
void optest(const ZIPI ins) {
|
char line[512];
|
char la[80], lb[80];
|
|
|
zipi_to_string(ins, line);
|
zipi_to_string(ins, la, lb);
|
printf("0x%08x ->\t%s\n", ins, line);
|
printf("0x%08x ->\t%-24s\t%-24s\n", ins, la, lb);
|
}
|
}
|
|
|
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
char line[512];
|
char line[512];
|
|
|