input
stringlengths
16
454k
output
stringlengths
13
350k
function_name
stringlengths
1
100
repo_name
stringlengths
6
43
category
stringclasses
76 values
sample_id
stringlengths
22
88
decompiler
stringclasses
1 value
opt_level
stringclasses
1 value
gint lw_word_get_incorrect_guesses(LwWord *word) { return word->incorrect_guesses; }
gint lw_word_get_incorrect_guesses(LwWord *word) { return word->incorrect_guesses; }
lw_word_get_incorrect_guesses
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
const gchar *lw_word_get_kanji(LwWord *word) { return word->fields[0]; }
const gchar *lw_word_get_kanji(LwWord *word) { return word->fields[LW_WORD_FIELD_KANJI]; }
lw_word_get_kanji
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
gint lw_word_get_score(LwWord *word) { gint total; total = word->correct_guesses + word->incorrect_guesses; if (total) return 100 * word->correct_guesses / total; else return 0; }
gint lw_word_get_score(LwWord *word) { gint total = word->correct_guesses + word->incorrect_guesses; if (total == 0) return 0.0; else return (word->correct_guesses * 100 / total); }
lw_word_get_score
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
const gchar *lw_word_get_score_as_string(LwWord *word) { char *v1; gchar *v2; gint score; if (!word->score) { if (word->correct_guesses + word->incorrect_guesses) { score = lw_word_get_score(word); v2 = (gchar *)g_strdup_printf("%3d%%", score); } else { v1 = gettext("Untested"); ...
const gchar *lw_word_get_score_as_string(LwWord *word) { gint total; if (word->score == NULL) { total = word->correct_guesses + word->incorrect_guesses; if (total == 0) word->score = g_strdup(gettext("Untested")); else word->score = g_strdup_printf("%3d%%", lw_word_get_score(word)); } ...
lw_word_get_score_as_string
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
const gchar *lw_word_get_timestamp_as_string(LwWord *word) { gint64 real_time; const char *v2; char *v3; char *v4; gchar *v5; char *v6; guint32 days; guint32 difference; if (!word->days) { days = lw_word_get_hours(word) / 0x18; real_time = g_get_real_time(); difference = lw_word_timestamp...
const gchar *lw_word_get_timestamp_as_string(LwWord *word) { if (word->days == NULL) { guint32 days = lw_word_get_hours(word) / 24; guint32 today = lw_word_timestamp_to_hours(g_get_real_time()) / 24; guint32 difference = today - days; if (difference < 0) difference = 0; if (days == 0) ...
lw_word_get_timestamp_as_string
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
LwWord *lw_word_new() { return (LwWord *)g_malloc0_n(1, 80); }
LwWord *lw_word_new() { LwWord *word; word = g_new0(LwWord, 1); return word; }
lw_word_new
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
LwWord *lw_word_new_from_string(const gchar *text) { long v1; long v2; gint v3; gint v4; gint32 v5; gint i; gint ia; gchar *endptr; LwWord *word; gchar **atoms; gchar *ptr; unsigned long v13; v13 = __readfsqword(0x28u); word = (LwWord *)g_malloc0_n(1, 80); if (word) { atoms = (gchar *...
LwWord *lw_word_new_from_string(const gchar *text) { LwWord *word; gchar *ptr; gchar *endptr; gchar **atoms; gint i; word = g_new0(LwWord, 1); if (word != NULL) { atoms = g_strsplit(text, ";", TOTAL_LW_WORD_FIELDS); if (atoms != NULL) { for (i = 0; atoms[i] != NULL && i < TOTAL_LW_WORD_F...
lw_word_new_from_string
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
void lw_word_set_correct_guesses(LwWord *word, gint number) { if (word->fields[3]) g_free(word->fields[3]); word->fields[3] = (gchar *)g_strdup_printf("%d", number); word->correct_guesses = number; if (word->score) g_free(word->score); word->score = 0; }
void lw_word_set_correct_guesses(LwWord *word, gint number) { if (word->fields[LW_WORD_FIELD_CORRECT_GUESSES] != NULL) g_free(word->fields[LW_WORD_FIELD_CORRECT_GUESSES]); word->fields[LW_WORD_FIELD_CORRECT_GUESSES] = g_strdup_printf("%d", number); word->correct_guesses = number; if (word->score != NULL) ...
lw_word_set_correct_guesses
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
void lw_word_set_definitions(LwWord *word, const gchar *text) { if (word->fields[2]) g_free(word->fields[2]); word->fields[2] = (gchar *)g_strdup(text); }
void lw_word_set_definitions(LwWord *word, const gchar *text) { if (word->fields[LW_WORD_FIELD_DEFINITIONS] != NULL) g_free(word->fields[LW_WORD_FIELD_DEFINITIONS]); word->fields[LW_WORD_FIELD_DEFINITIONS] = g_strdup(text); }
lw_word_set_definitions
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
void lw_word_set_furigana(LwWord *word, const gchar *text) { if (word->fields[1]) g_free(word->fields[1]); word->fields[1] = (gchar *)g_strdup(text); }
void lw_word_set_furigana(LwWord *word, const gchar *text) { if (word->fields[LW_WORD_FIELD_FURIGANA] != NULL) g_free(word->fields[LW_WORD_FIELD_FURIGANA]); word->fields[LW_WORD_FIELD_FURIGANA] = g_strdup(text); }
lw_word_set_furigana
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
void lw_word_set_hours(LwWord *word, guint32 hours) { word->timestamp = hours; if (word->days) g_free(word->days); word->days = 0; if (word->fields[5]) g_free(word->fields[5]); word->fields[5] = (gchar *)g_strdup_printf("%u", word->timestamp); }
void lw_word_set_hours(LwWord *word, guint32 hours) { word->timestamp = hours; if (word->days != NULL) g_free(word->days); word->days = NULL; if (word->fields[LW_WORD_FIELD_TIMESTAMP] != NULL) g_free(word->fields[LW_WORD_FIELD_TIMESTAMP]); word->fields[LW_WORD_FIELD_TIMESTAMP] = g_strdup_print...
lw_word_set_hours
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
void lw_word_set_incorrect_guesses(LwWord *word, gint number) { if (word->fields[4]) g_free(word->fields[4]); word->fields[4] = (gchar *)g_strdup_printf("%d", number); word->incorrect_guesses = number; if (word->score) g_free(word->score); word->score = 0; }
void lw_word_set_incorrect_guesses(LwWord *word, gint number) { if (word->fields[LW_WORD_FIELD_INCORRECT_GUESSES] != NULL) g_free(word->fields[LW_WORD_FIELD_INCORRECT_GUESSES]); word->fields[LW_WORD_FIELD_INCORRECT_GUESSES] = g_strdup_printf("%d", number); word->incorrect_guesses = number; if (word->score !...
lw_word_set_incorrect_guesses
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
void lw_word_set_kanji(LwWord *word, const gchar *text) { if (word->fields[0]) g_free(word->fields[0]); word->fields[0] = (gchar *)g_strdup(text); }
void lw_word_set_kanji(LwWord *word, const gchar *text) { if (word->fields[LW_WORD_FIELD_KANJI] != NULL) g_free(word->fields[LW_WORD_FIELD_KANJI]); word->fields[LW_WORD_FIELD_KANJI] = g_strdup(text); }
lw_word_set_kanji
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
void lw_word_set_timestamp(LwWord *word, gint64 timestamp) { guint32 v2; v2 = lw_word_timestamp_to_hours(timestamp); lw_word_set_hours(word, v2); }
void lw_word_set_timestamp(LwWord *word, gint64 timestamp) { guint32 hours = lw_word_timestamp_to_hours(timestamp); lw_word_set_hours(word, hours); }
lw_word_set_timestamp
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
guint32 lw_word_timestamp_to_hours(gint64 timestamp) { return timestamp / 1000000 / 60 / 60; }
guint32 lw_word_timestamp_to_hours(gint64 timestamp) { const gint MICROSECONDS = 1000000; const gint SECONDS = 60; const gint MINUTES = 60; return (guint32)(timestamp / MICROSECONDS / SECONDS / MINUTES); }
lw_word_timestamp_to_hours
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
gchar *lw_word_to_string(LwWord *word) { return lw_strjoinv(59, word->fields, 6); }
gchar *lw_word_to_string(LwWord *word) { gchar *text; text = lw_strjoinv(';', word->fields, TOTAL_LW_WORD_FIELDS); return text; }
lw_word_to_string
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
void lw_word_update_timestamp(LwWord *word) { gint64 real_time; real_time = g_get_real_time(); lw_word_set_timestamp(word, real_time); }
void lw_word_update_timestamp(LwWord *word) { lw_word_set_timestamp(word, g_get_real_time()); }
lw_word_update_timestamp
gwaei-3.6.2
app-dicts
O0/app-dicts/gwaei-3.6.2/libwaei.so.2.0.0
ida
O0
int het_bsb(HETB *hetb) { uint32_t cblk; uint32_t v2; int result; uint8_t flags1; cblk = hetb->cblk; if (!cblk) return -3; v2 = cblk - 1; if (cblk == 1) return het_rewind(hetb); if (fseeko(hetb->fd, -((hetb->chdr.clen[1] << 8) + hetb->chdr.clen[0] + 6), 1) == -1) return -1; ...
DLL_EXPORT int het_bsb(HETB *hetb) { int rc; int newblk; int offset; int tapemark = FALSE; if (hetb->cblk == 0) { return (HETE_BOT); } newblk = hetb->cblk - 1; if (newblk == 0) { return (het_rewind(hetb)); } offset = -((int)(HETHDR_CLEN(hetb) + sizeof(HETHDR))); do { rc = fseek(...
het_bsb
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int het_bsf(HETB *hetb) { int result; do result = het_bsb(hetb); while (result >= 0); if ((unsigned int)(result + 3) <= 1) return hetb->cblk; return result; }
DLL_EXPORT int het_bsf(HETB *hetb) { int rc; do { rc = het_bsb(hetb); } while (rc >= 0); if ((rc == HETE_BOT) || (rc == HETE_TAPEMARK)) { return (hetb->cblk); } return (rc); }
het_bsf
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int het_close(HETB **hetb) { HETB *v2; v2 = *hetb; if (v2) { if (v2->fd) { fclose(v2->fd); v2 = *hetb; } free(v2); } *hetb = 0; return 0; }
DLL_EXPORT int het_close(HETB **hetb) { if (*(hetb) != NULL) { if ((*hetb)->fd != NULL) { fclose((*hetb)->fd); } free(*(hetb)); } *hetb = NULL; return (0); }
het_close
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int het_cntl(HETB *hetb, int func, unsigned long val) { int result; switch (func & 0xFFFFFEFF) { case 1u: if ((func & 0x100) != 0) { *((_BYTE *)hetb + 30) = (8 * (val != 0)) | *((_BYTE *)hetb + 30) & 0xF7; result = 0; } else { result = (*((_BYTE *)hetb + 30) & 8) != 0; } break; ...
DLL_EXPORT int het_cntl(HETB *hetb, int func, unsigned long val) { int mode; mode = func & HETCNTL_SET; switch (func & (~(HETCNTL_GET | HETCNTL_SET))) { case HETCNTL_COMPRESS: if (mode == HETCNTL_GET) { return (hetb->compress); } hetb->compress = (val ? TRUE : FALSE); break; case HET...
het_cntl
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
const char *het_error(int rc) { const char *result; result = "No error"; if (rc < 0) { result = "Invalid error code"; if (rc >= -23) return het_errstr[-rc]; } return result; }
DLL_EXPORT const char *het_error(int rc) { if (rc >= 0) { rc = 0; } rc = -rc; if (rc >= (int)HET_ERRSTR_MAX) { rc = HET_ERRSTR_MAX - 1; } return (het_errstr[rc]); }
het_error
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int het_fsb(HETB *hetb) { int result; while (1) { result = het_read_header(hetb); if (result < 0) break; result = fseeko(hetb->fd, hetb->chdr.clen[0] + (hetb->chdr.clen[1] << 8), 1); if (result == -1) break; if ((hetb->chdr.flags1 & 0x20) != 0) { result = hetb->cblk; ...
DLL_EXPORT int het_fsb(HETB *hetb) { int rc; do { rc = het_read_header(hetb); if (rc < 0) { return (rc); } rc = fseek(hetb->fd, HETHDR_CLEN(hetb), SEEK_CUR); if (rc == -1) { return (HETE_ERROR); } } while (!(hetb->chdr.flags1 & HETHDR_FLAGS1_EOR)); hetb->truncated = FALSE...
het_fsb
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int het_fsf(HETB *hetb) { int result; do result = het_fsb(hetb); while (result >= 0); if (result == -2) return hetb->cblk; return result; }
DLL_EXPORT int het_fsf(HETB *hetb) { int rc; do { rc = het_fsb(hetb); } while (rc >= 0); if (rc == HETE_TAPEMARK) { return (hetb->cblk); } return (rc); }
het_fsf
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int het_locate(HETB *hetb, int block) { int result; result = het_rewind(hetb); if (result >= 0) { do { result = hetb->cblk; if (result >= block) break; result = het_fsb(hetb); } while (result >= 0 || result == -2); } return result; }
DLL_EXPORT int het_locate(HETB *hetb, int block) { int rc; rc = het_rewind(hetb); if (rc < 0) { return (rc); } while ((int)hetb->cblk < block) { rc = het_fsb(hetb); if (rc < 0 && HETE_TAPEMARK != rc) { return (rc); } } return (hetb->cblk); }
het_locate
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int het_open(HETB **hetb, char *filename, int flags) { char v3; FILE **v4; FILE **v5; short v6; int v7; const char *v8; FILE *v9; int result; int v11; int *v12; int v13; int *v14; char pathname[4096]; unsigned long v16; v3 = flags; v16 = __readfsqword(0x28u); *hetb = 0; hostpath(pat...
DLL_EXPORT int het_open(HETB **hetb, char *filename, int flags) { HETB *thetb; char *omode; int rc; int fd; int oflags; char pathname[MAX_PATH]; *hetb = NULL; hostpath(pathname, filename, sizeof(pathname)); thetb = calloc(1, sizeof(HETB)); if (thetb == NULL) { return (HETE_NOMEM); } thetb...
het_open
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int het_read(HETB *hetb, void *sbuf) { signed char flags2; unsigned long v3; char *v4; signed char flags1; unsigned long v6; uint8_t v7; int result; signed char v9; uint32_t v10; char v11; char v12; int v13; unsigned long slen; char tbuf[65535]; unsigned long v16; flags2 = 0; v3 = 0; ...
DLL_EXPORT int het_read(HETB *hetb, void *sbuf) { char *tptr; int rc; unsigned long slen; int flags1, flags2; unsigned long tlen; char tbuf[HETMAX_BLOCKSIZE]; flags1 = flags2 = 0; tlen = 0; tptr = sbuf; do { rc = het_read_header(hetb); if (rc < 0) { return (rc); } if (!(fla...
het_read
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int het_read_header(HETB *hetb) { int flags1; if ((unsigned int)fread(&hetb->chdr, 6u, 1u, hetb->fd) != 1) return feof(hetb->fd) == 0 ? -1 : 0xFFFFFFFC; flags1 = hetb->chdr.flags1; if ((flags1 & 0x60) != 0) ++hetb->cblk; return (flags1 << 25 >> 31) & 0xFFFFFFFE; }
DLL_EXPORT int het_read_header(HETB *hetb) { int rc; rc = fread(&hetb->chdr, sizeof(HETHDR), 1, hetb->fd); if (rc != 1) { if (feof(hetb->fd)) { return (HETE_EOT); } return (HETE_ERROR); } #if defined(HETDEBUGR) printf("read hdr: pl=%d, cl=%d, f1=%02x, f2=%02x\n", HETHDR_PLEN(hetb), ...
het_read_header
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int het_rewind(HETB *hetb) { int result; result = fseeko(hetb->fd, 0, 0); if (result != -1) { *((_BYTE *)hetb + 30) &= ~4u; hetb->cblk = 0; *(_DWORD *)hetb->chdr.clen = 0; *(_WORD *)&hetb->chdr.flags1 = 0; return 0; } return result; }
DLL_EXPORT int het_rewind(HETB *hetb) { int rc; rc = fseek(hetb->fd, 0, SEEK_SET); if (rc == -1) { return (HETE_ERROR); } hetb->cblk = 0; memset(&hetb->chdr, 0, sizeof(hetb->chdr)); hetb->truncated = FALSE; return (hetb->cblk); }
het_rewind
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int het_sync(HETB *hetb) { int v1; int v2; if ((*((_BYTE *)hetb + 30) & 1) != 0) return -14; do { v1 = fileno(hetb->fd); v2 = fdatasync(v1); } while (v2 == 4); return -(v2 != 0); }
DLL_EXPORT int het_sync(HETB *hetb) { int rc; if (hetb->writeprotect) { return (HETE_PROTECTED); } do rc = fdatasync(fileno(hetb->fd)); while (EINTR == rc); if (rc != 0) { return (HETE_ERROR); } return (0); }
het_sync
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int het_tapemark(HETB *hetb) { int result; __off_t v2; int v3; int v4; result = het_write_header(hetb, 0, 64, 0); if (result >= 0) { do { v2 = ftello(hetb->fd); v3 = fileno(hetb->fd); v4 = ftruncate(v3, v2); } while (v4 == 4); return -(v4 != 0); } return result; }
DLL_EXPORT int het_tapemark(HETB *hetb) { int rc; rc = het_write_header(hetb, 0, HETHDR_FLAGS1_TAPEMARK, 0); if (rc < 0) { return (rc); } do rc = ftruncate(fileno(hetb->fd), ftell(hetb->fd)); while (EINTR == rc); if (rc != 0) { return (HETE_ERROR); } return (0); }
het_tapemark
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
off_t het_tell(HETB *hetb) { off_t result; result = ftello(hetb->fd); if (result < 0) return -1; return result; }
DLL_EXPORT off_t het_tell(HETB *hetb) { off_t rwptr = ftell(hetb->fd); if (rwptr < 0) { return HETE_ERROR; } return rwptr; }
het_tell
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int het_write(HETB *hetb, void *sbuf, int slen) { unsigned char v3; char *v4; int v5; uint32_t v6; int v7; int v8; unsigned long chksize; int v10; int result; __off_t v12; int v13; int v14; char v15; unsigned short v16; int v17; unsigned short v18; unsigned long tlen; char tbuf[65613...
DLL_EXPORT int het_write(HETB *hetb, void *sbuf, int slen) { int rc; int flags; unsigned long tlen; #if defined(HAVE_LIBZ) || defined(HET_BZIP2) char tbuf[((((HETMAX_BLOCKSIZE * 1001) + 999) / 1000) + 12)]; #endif if (slen > HETMAX_BLOCKSIZE) { return (HETE_BADLEN); } flags = HETHDR_FLAGS1_BOR; h...
het_write
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int het_write_header(HETB *hetb, int len, int flags1, int flags2) { char v4; short v5; uint8_t v6; uint8_t v7; __off_t v8; int v9; short v10; FILE *fd; int result; if (len > 0xFFFF) return -13; v4 = *((_BYTE *)hetb + 30); if ((v4 & 1) != 0) return -14; v5 = len; v6 = flags1; if ((...
int het_write_header(HETB *hetb, int len, int flags1, int flags2) { int rc; off_t rcoff; #if defined(HETDEBUGW) printf("write hdr: pl=%d, cl=%d, f1=%02x, f2=%02x\n", HETHDR_PLEN(hetb), HETHDR_CLEN(hetb), hetb->chdr.flags1, hetb->chdr.flags2); #endif if (len > HETMAX_CHUNKSIZE) { return (HETE_BADL...
het_write_header
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
char *sl_atoe(void *dbuf, void *sbuf, int slen) { char *v3; long v4; v3 = (char *)dbuf; if (!dbuf) v3 = (char *)sbuf; if (slen > 0) { v4 = slen; do { v3[v4 - 1] = host_to_guest((unsigned char)*((char *)sbuf + v4 - 1)); --v4; } while ((int)v4 > 0); } return v3; }
DLL_EXPORT char *sl_atoe(void *dbuf, void *sbuf, int slen) { unsigned char *sptr; unsigned char *dptr; sptr = sbuf; dptr = dbuf; if (dptr == NULL) { dptr = sptr; } while (slen > 0) { slen--; dptr[slen] = host_to_guest(sptr[slen]); } return ((char *)dptr); }
sl_atoe
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int sl_ds1(SLLABEL *lab, int type, char *dsn, char *volser, int volseq, int dsseq, char *expdt, int blocks) { __m128i si128; size_t v15; size_t v16; int v17; long v20; long v21; long v22; long v23; long v24; long v25; long v26; long v27; long v28; const unsigned short **v29; con...
DLL_EXPORT int sl_ds1(SLLABEL *lab, int type, char *dsn, char *volser, int volseq, int dsseq, char *expdt, int blocks) { int gdg; size_t len; size_t ndx; char wbuf[80]; memset(lab, ' ', sizeof(SLLABEL)); if ((type != SLT_HDR) && (type != SLT_EOF) && (type != SLT_EOV)) { return (SLE_INVALIDT...
sl_ds1
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int sl_ds2(SLLABEL *lab, int type, char *recfm, int lrecl, int blksize, char *jobname, char *stepname, char *trtch) { __m128i si128; const char *v11; const const struct __attribute__((aligned(8))) { char *recfm; char f; char b; char c; } *v12; const char *v13; int v14; int v15; ...
DLL_EXPORT int sl_ds2(SLLABEL *lab, int type, char *recfm, int lrecl, int blksize, char *jobname, char *stepname, char *trtch) { int i; size_t len; char wbuf[80]; memset(lab, ' ', sizeof(SLLABEL)); if ((type != SLT_HDR) && (type != SLT_EOF) && (type != SLT_EOV)) { return (SLE_INVALIDTYPE); ...
sl_ds2
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
const char *sl_error(int rc) { const char *result; result = "No error"; if (rc < 0) { result = "Invalid error code"; if (rc >= -15) return sl_errstr[-rc]; } return result; }
DLL_EXPORT const char *sl_error(int rc) { if (rc >= 0) { rc = 0; } rc = -rc; if (rc >= (int)SL_ERRSTR_MAX) { rc = SL_ERRSTR_MAX - 1; } return (sl_errstr[rc]); }
sl_error
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
char *sl_etoa(void *dbuf, void *sbuf, int slen) { char *v3; long v4; v3 = (char *)dbuf; if (!dbuf) v3 = (char *)sbuf; if (slen > 0) { v4 = slen; do { v3[v4 - 1] = guest_to_host((unsigned char)*((char *)sbuf + v4 - 1)); --v4; } while ((int)v4 > 0); } return v3; }
DLL_EXPORT char *sl_etoa(void *dbuf, void *sbuf, int slen) { unsigned char *sptr; unsigned char *dptr; sptr = sbuf; dptr = dbuf; if (dptr == NULL) { dptr = sptr; } while (slen > 0) { slen--; dptr[slen] = guest_to_host(sptr[slen]); } return ((char *)dptr); }
sl_etoa
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
char *sl_fmtdate(char *dest, char *src, int fromto) { char *v3; short v4; char *v5; size_t v6; const char *v7; struct tm *v9; time_t curtime; tm tm; char wbuf[9]; char sbuf[9]; unsigned long v14; v3 = src; v14 = __readfsqword(0x28u); if (fromto) { if (src) { if (src[5] == 48) { ...
DLL_EXPORT char *sl_fmtdate(char *dest, char *src, int fromto) { char wbuf[9]; char sbuf[9]; char *ptr; time_t curtime; struct tm tm; int ret; if (fromto) { if (src == NULL) { return (NULL); } if (src[5] == '0') { dest[0] = src[1]; dest[1] = src[2]; } else if (src[0] ==...
sl_fmtdate
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
void sl_fmtlab(SLFMT *fmt, SLLABEL *lab) { unsigned long v3; bool v4; __m128i v5; __m128i v6; __m128i v7; __m128i v8; long v9; __m128i v10; char v11; __m128i v12; char v13; SLLABEL templab; unsigned long vars58; v3 = (unsigned long)&fmt->key[1]; vars58 = __readfsqword(0x28u); *(_QWORD *...
DLL_EXPORT void sl_fmtlab(SLFMT *fmt, SLLABEL *lab) { SLLABEL templab; memset(fmt, 0, sizeof(SLFMT)); if (sl_islabel(&templab, lab, sizeof(SLLABEL)) == FALSE) { return; } lab = &templab; fmt->key[0] = "Label"; fmt->val[0] = fmt->type; memcpy(fmt->type, lab->id, 4); if (memcmp(lab->id, "VOL", 3...
sl_fmtlab
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int sl_islabel(SLLABEL *lab, void *buf, int len) { int v3; const const struct { int min; int max; } *v4; long v5; const char *i; const char *v7; int v8; int v10; v3 = 0; if (len == 80) { v4 = sl_ranges; v5 = 1; for (i = (const char *)&unk_5000;; i = sl_elabs[v5]) { if (*(_...
DLL_EXPORT int sl_islabel(SLLABEL *lab, void *buf, int len) { int i; int num; unsigned char *ptr; if (len != sizeof(SLLABEL)) { return FALSE; } for (i = 1; i < (int)SL_ELABS_MAX; i++) { if (memcmp(sl_elabs[i], buf, 3) == 0) { ptr = buf; num = ptr[3] - (unsigned char)'\xF0'; if ((...
sl_islabel
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int sl_istype(void *buf, int type, int num) { const char *v3; short v4; const char *v5; int v6; char v8; int v9; const char *v10; v3 = sl_elabs[type]; v4 = *(_WORD *)buf; if (*(_WORD *)buf != *(_WORD *)v3 || (v8 = *((_BYTE *)buf + 2), v8 != v3[2])) { v5 = sl_alabs[type]; if (v4 != *(_...
DLL_EXPORT int sl_istype(void *buf, int type, int num) { unsigned char *ptr; ptr = buf; if (memcmp(buf, sl_elabs[type], 3) == 0) { if ((num == 0) || (ptr[3] == (((unsigned char)'\xF0') + num))) { return (TRUE); } } if (memcmp(buf, sl_alabs[type], 3) == 0) { if ((num == 0) || (ptr[3] == ((...
sl_istype
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int sl_usr(SLLABEL *lab, int type, int num, char *data) { __m128i si128; const char *v6; size_t v7; si128 = _mm_load_si128((const __m128i *)&xmmword_54C0); *(__m128i *)lab->id = si128; *(__m128i *)&lab->u.usr.data[12] = si128; *(__m128i *)&lab->u.usr.data[28] = si128; *(__m128i *)&lab->u.usr.data[44] =...
DLL_EXPORT int sl_usr(SLLABEL *lab, int type, int num, char *data) { size_t len; memset(lab, ' ', sizeof(SLLABEL)); if ((type != SLT_UHL) && (type != SLT_UTL)) { return (SLE_INVALIDTYPE); } memcpy(lab->id, sl_elabs[type], 3); if ((num < 1) || (num > 8)) { return (SLE_INVALIDNUM); } lab->num[0...
sl_usr
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int sl_vol(SLLABEL *lab, char *volser, char *owner) { __m128i si128; size_t v5; size_t v6; size_t v7; si128 = _mm_load_si128((const __m128i *)&xmmword_54C0); *(__m128i *)lab->id = si128; *(__m128i *)&lab->u.usr.data[12] = si128; *(_WORD *)lab->id = 20310; lab->id[2] = 76; lab->num[0] = 49; *(__m1...
DLL_EXPORT int sl_vol(SLLABEL *lab, char *volser, char *owner) { size_t len; memset(lab, ' ', sizeof(SLLABEL)); memcpy(lab->id, sl_alabs[SLT_VOL], 3); lab->num[0] = '1'; if (volser == NULL) { return (SLE_VOLSER); } len = strlen(volser); if ((len > 6) || (strspn(volser, sl_cset) != len)) { r...
sl_vol
hercules-3.13-r1
app-emulation
O0/app-emulation/hercules-3.13-r1/libherct.so
ida
O0
int do_login(int argc, char *outfile, char *outtyp, char *outcomp, int forcehead) { const char *v5; const char *v6; const char *v7; const char *v8; const char *v9; dsk_phead_t dg_heads; dsk_pcyl_t dg_cylinders; const char *v12; const char *v13; dsk_psect_t dg_sectors; dsk_psect_t dg_s...
int do_login(int argc, char *outfile, char *outtyp, char *outcomp, int forcehead) { DSK_PDRIVER outdr = NULL; dsk_err_t e; DSK_GEOMETRY dg; unsigned char drv_status; const char *comp; char *comment; int indent = 0; int opt, any; dsk_reportfunc_set(report, report_end); e = dsk_open(&out...
do_login
libdsk-1.5.18
app-emulation
O0/app-emulation/libdsk-1.5.18/dskid
ida
O0
int help(int argc, char **argv) { char *v2; char *v3; char *v4; char *v5; v2 = __xpg_basename(*argv); v3 = __xpg_basename(*argv); fprintf(stderr, "Syntax: \n" " %s { options} dskimage \n" "\n" "Options:\n" " -type <type> Type of disk image fil...
int help(int argc, char **argv) { fprintf(stderr, "Syntax: \n" " %s { options} dskimage \n\n" "Options:\n" " -type <type> Type of disk image file to read.\n" " '%s -types' lists valid types.\n" " -retry <count> Set number...
help
libdsk-1.5.18
app-emulation
O0/app-emulation/libdsk-1.5.18/dskid
ida
O0
int main(int argc, const char **argv, const char **envp) { int argca; int n; int err; int forcehead; char *outtyp; char *outcomp; argca = argc; if (!standard_args(argc, (char **)argv)) return 0; if (argca <= 1) return help(argca, (char **)argv); ignore_arg("-itype", 2, &argca, (char **)argv...
int main(int argc, char **argv) { char *outtyp; char *outcomp; int forcehead; int n, err; int stdret = standard_args(argc, argv); if (!stdret) return 0; if (argc < 2) return help(argc, argv); ignore_arg("-itype", 2, &argc, argv); ignore_arg("-iside", 2, &argc, argv); ignore_arg("-icomp", 2...
main
libdsk-1.5.18
app-emulation
O0/app-emulation/libdsk-1.5.18/dskid
ida
O0
void report_end() { fprintf(stderr, "\r%-79.79s\r", (const char *)&unk_4162); fflush(stderr); }
static void report_end(void) { fprintf(stderr, "\r%-79.79s\r", ""); fflush(stderr); }
report_end
libdsk-1.5.18
app-emulation
O0/app-emulation/libdsk-1.5.18/dskid
ida
O0
const char *show_rate(dsk_rate_t r) { if (r == RATE_ED) return "ED"; if ((unsigned int)r > RATE_ED) return "??"; if (r == RATE_SD) return "SD"; if (r) return "DD"; return "HD"; }
const char *show_rate(dsk_rate_t r) { switch (r) { case RATE_HD: return "HD"; case RATE_DD: return "DD"; case RATE_SD: return "SD"; case RATE_ED: return "ED"; } return "??"; }
show_rate
libdsk-1.5.18
app-emulation
O0/app-emulation/libdsk-1.5.18/dskid
ida
O0
const char *show_recmode(int recmode) { const char *result; switch ((char)recmode) { case 0: result = "MFM"; break; case 1: result = "FM"; break; case 18: result = "GCR (Macintosh)"; break; case 20: result = "GCR (Apple II Prodos)"; break; case 34: result = "GCR (Lisa)...
const char *show_recmode(int recmode) { static char buf[50]; recmode &= RECMODE_MASK; switch (recmode) { case RECMODE_MFM: return "MFM"; case RECMODE_FM: return "FM"; case RECMODE_GCR_MAC: return "GCR (Macintosh)"; case RECMODE_GCR_LISA: return "GCR (Lisa)"; case RECMODE_GCR_PRODOS: ...
show_recmode
libdsk-1.5.18
app-emulation
O0/app-emulation/libdsk-1.5.18/dskid
ida
O0
const char *show_sidedness(dsk_sides_t r) { if (r == SIDES_EXTSURFACE) return "ExtSurface"; if ((unsigned int)r > SIDES_EXTSURFACE) return "Out-of-range value"; if (r == SIDES_OUTOUT) return "OutOut"; if (r) return "OutBack"; return "Alt"; }
const char *show_sidedness(dsk_sides_t r) { switch (r) { case SIDES_ALT: return "Alt"; case SIDES_OUTBACK: return "OutBack"; case SIDES_OUTOUT: return "OutOut"; case SIDES_EXTSURFACE: return "ExtSurface"; } return "Out-of-range value"; }
show_sidedness
libdsk-1.5.18
app-emulation
O0/app-emulation/libdsk-1.5.18/dskid
ida
O0
void AllocateMemory(STRPTR Cmd) { WORD pos; BOOL Blank; ULONG i; ULONG Val; STRPTR NewMem; unsigned long v6; v6 = __readfsqword(0x28u); pos = 1; Val = (unsigned short)ExtractDecNo(Cmd, &pos, &Blank); if (!Blank && Val) { Val <<= 10; if (Val > 0xFF000000) Val = 4278190080LL; NewMem...
VOID AllocateMemory(STRPTR Cmd) { ULONG i, Val; WORD pos; BOOL Blank; STRPTR NewMem; pos = 1; Val = (UWORD)ExtractDecNo(Cmd, &pos, &Blank); if (!Blank && Val) { Val = Val * 1024; if (Val > 0xFF000000) Val = 0xFF000000; NewMem = (STRPTR)calloc(1, Val); if (!NewMem) printf("...
AllocateMemory
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void BPMessage() { ULONG i; dlx.PC -= 4LL; for (i = 0; i < stru_19EE0.Num; ++i) { if (dlx.PC == stru_19EE0.BPs[i]) { printf("Breakpoint %d at $%08lX\n", i + 1, dlx.PC); break; } } StoreL(dlx.PC, stru_19EE0.Copy); stru_19EE0.Copy = 0; stru_19EE0.PC = dlx.PC; }
VOID BPMessage() { ULONG i; dlx.PC -= 4; for (i = 0; i < BP.Num; i++) if (dlx.PC == BP.BPs[i]) { printf("Breakpoint %d at $%08lX\n", i + 1, dlx.PC); break; } StoreL(dlx.PC, BP.Copy); BP.Copy = 0; BP.PC = dlx.PC; }
BPMessage
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void BreakpointTest() { WORD i; if (stru_19EE0.Num) { for (i = 0; i < stru_19EE0.Num; ++i) { if (stru_19EE0.BPs[i] == dlx.PC && dlx.PC != stru_19EE0.PC) { stru_19EE0.Copy = FetchL(dlx.PC); StoreL(dlx.PC, 0); --dlx.Instr; break; } } } stru_19EE0.PC = 0; }
VOID BreakpointTest() { WORD i; if (BP.Num) { for (i = 0; i < BP.Num; i++) if (BP.BPs[i] == dlx.PC && dlx.PC != BP.PC) { BP.Copy = FetchL(dlx.PC); StoreL(dlx.PC, 0L); dlx.Instr--; break; } } BP.PC = 0; }
BreakpointTest
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void CallDebug(ULONG Val1, ULONG Val2) { ULONG IR; switch (Val1) { case 0uLL: BreakpointTest(); break; case 1uLL: if ((DebugLevel & 1) != 0) { IR = FetchL(Val2); fprintf(Log, "%6ld %08lX : %08lX ", dlx.Instr, Val2, IR); DisassembleInstr(Val2, IR); } break; case 2uLL: ...
VOID CallDebug(ULONG Val1, ULONG Val2) { ULONG IR; switch (Val1) { case 0: BreakpointTest(); break; case 1: if (DebugLevel & DB_DISASSEM) { IR = FetchL(Val2); fprintf(Log, "%6ld %08lX : %08lX ", dlx.Instr, Val2, IR); DisassembleInstr(Val2, IR); } break; case 2: ...
CallDebug
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
BOOL CheckSize(WORD Size) { if (Size == 1 || Size == 2 || Size == 4) return 1; puts("Invalid value size (must be 1, 2 or 4)"); return 0; }
BOOL CheckSize(WORD Size) { if (Size == 1 || Size == 2 || Size == 4) return TRUE; printf("Invalid value size (must be 1, 2 or 4)\n"); return FALSE; }
CheckSize
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void ClearDLXRegs(BOOL All) { WORD i; WORD ia; dlx.IStart = 0; dlx.IDone = 0; dlx.Instr = 0; dlx.IStatus = 0; dlx.Cycles = 0; dlx.Clock = 0; dlx.Set = 0; dlx.ALU = 0; dlx.Stores = 0; dlx.Loads = 0; dlx.Convert = 0; dlx.Move = 0; dlx.JALs = 0; dlx.Jumps = 0; dlx.TrapRfe = 0; dlx.Bran...
VOID ClearDLXRegs(BOOL All) { WORD i; dlx.Instr = dlx.IDone = dlx.IStart = 0; dlx.Clock = dlx.Cycles = dlx.IStatus = 0; dlx.Loads = dlx.Stores = dlx.ALU = dlx.Set = 0; dlx.Jumps = dlx.JALs = dlx.Move = dlx.Convert = 0; dlx.BranchTaken = dlx.BranchNotTaken = dlx.TrapRfe = 0; BP.Copy = BP.PC = 0; dlx.T...
ClearDLXRegs
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
STRPTR CollectKeyword(STRPTR p, STRPTR Str) { unsigned int v2; WORD v3; WORD i; BOOL Loop; i = 0; Loop = 1; do { v2 = *p; if (v2 <= 0x3B && ((1LL << v2) & 0x800100100000600LL) != 0) { Loop = 0; } else { v3 = i++; Str[v3] = *p++; } } while (Loop); Str[i] = 0; return...
STRPTR CollectKeyword(STRPTR p, STRPTR Str) { WORD i = 0; BOOL Loop = TRUE; do { switch (*p) { case ' ': case ',': case '\t': case ';': case '\n': Loop = FALSE; break; default: Str[i++] = *p; p++; } } while (Loop); Str[i] = 0; return p; }
CollectKeyword
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
BOOL CreateHelpIndex(FILE *H) { UBYTE c; UBYTE i; BOOL First; FILE *I; LONG Addr; HelpIndexType HI; UBYTE Text[92]; unsigned long v9; v9 = __readfsqword(0x28u); First = 1; puts("Creating New Help Index - please wait...\n"); I = fopen("dlxhlp.idx", "wb"); if (I) { do { Addr = ftell(H...
BOOL CreateHelpIndex(FILE *H) { FILE *I; UBYTE Text[TEXTLEN], c, i; BOOL First = TRUE; LONG Addr; struct HelpIndexType HI; printf("Creating New Help Index - please wait...\n\n"); I = fopen("dlxhlp.idx", "wb"); if (!I) { fprintf(stderr, "Could not open new help index file\n"); return FALSE; ...
CreateHelpIndex
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DecodeIType(ULONG Instr, UBYTE *d, UBYTE *s, WORD *i) { *s = (Instr >> 21) & 0x1F; *d = BYTE2(Instr) & 0x1F; *i = Instr; }
VOID DecodeIType(ULONG Instr, UBYTE *d, UBYTE *s, WORD *i) { *s = (Instr & 0x03E00000) >> 21; *d = (Instr & 0x001F0000) >> 16; *i = Instr & 0x0000FFFF; }
DecodeIType
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DecodeJType(ULONG Instr, LONG *n) { *n = Instr & 0x3FFFFFF; if ((*n & 0x2000000) != 0) *n |= 0xFC000000uLL; }
VOID DecodeJType(ULONG Instr, LONG *n) { *n = Instr & 0x03FFFFFF; if (*n & 0x02000000) *n |= 0xFC000000; }
DecodeJType
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DecodeRType(ULONG Instr, UBYTE *d, UBYTE *s1, UBYTE *s2, WORD *f) { *s1 = (Instr >> 21) & 0x1F; *s2 = BYTE2(Instr) & 0x1F; *d = (Instr >> 11) & 0x1F; *f = Instr & 0x7FF; }
VOID DecodeRType(ULONG Instr, UBYTE *d, UBYTE *s1, UBYTE *s2, WORD *f) { *s1 = (Instr & 0x03E00000) >> 21; *s2 = (Instr & 0x001F0000) >> 16; *d = (Instr & 0x0000F800) >> 11; *f = Instr & 0x000007FF; }
DecodeRType
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DisMicrocode() { ULONG i; for (i = 0; i <= 0xFF; ++i) { if (!dlx.Microcode[i]) break; ShowMicrocode(i, 0); if (!((i + 1) % 0x14) && PauseForKey(1u) == 113) break; } }
VOID DisMicrocode() { ULONG i; for (i = 0; i < MICROSIZE && dlx.Microcode[i]; i++) { ShowMicrocode(i, FALSE); if ((i + 1) % 20 == 0) if (PauseForKey(1) == 'q') break; } }
DisMicrocode
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void Disassemble(STRPTR Cmd) { WORD Pos; BOOL Blank; ULONG Start; ULONG End; ULONG i; ULONG Instr; unsigned long v7; v7 = __readfsqword(0x28u); End = 0; Pos = 1; Start = ExtractNo(Cmd, &Pos, &Blank); if (Blank) { Start = LastAddr; } else { if ((Start & 3) != 0) { fwrite("Misalig...
VOID Disassemble(STRPTR Cmd) { ULONG Start, End = 0, Instr, i; WORD Pos = 1; BOOL Blank; Start = ExtractNo(Cmd, &Pos, &Blank); if (Blank) Start = LastAddr; else { if (Start % 4 != 0) { fprintf(Log, "Misaligned start address\n"); return; } End = ExtractNo(Cmd, &Pos, &Blank); ...
Disassemble
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DisassembleInstr(ULONG Addr, ULONG Instr) { int v2; int v3; int v4; UBYTE Dest; UBYTE Src1; WORD j; BOOL OSet; WORD i; LONG Offset26; ULONG Vector[2]; Vector[1] = __readfsqword(0x28u); i = Instr >> 26; switch (MainCodes[i].Type) { case '@': goto LABEL_47; case 'B': DecodeITyp...
VOID DisassembleInstr(ULONG Addr, ULONG Instr) { UBYTE Dest, Src1, Src2; WORD i, j, Offset16, Func; LONG Offset26; BOOL OSet; ULONG Vector; i = (WORD)(Instr >> 26); switch (MainCodes[i].Type) { case 'I': DecodeIType(Instr, &Dest, &Src1, &Offset16); fprintf(Log, "%-8.8s ", MainCodes[i].OpCode)...
DisassembleInstr
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DisplayDPRegisters() { WORD i; WORD j; for (i = 0; i <= 3; ++i) { for (j = 0; j <= 3; ++j) printf("D%-2d %12.4f ", 2 * (i + 4 * j), dlx.FP.D[4 * j + i]); putchar(10); } }
VOID DisplayDPRegisters() { WORD i, j; for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) printf("D%-2d %12.4f ", (i + j * 4) * 2, dlx.FP.D[i + j * 4]); printf("\n"); } }
DisplayDPRegisters
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DisplayIRegisters() { WORD i; WORD j; for (i = 0; i <= 7; ++i) { for (j = 0; j <= 3; ++j) printf("I%-2d $%08lX ", 8 * j + i, dlx.FP.I[8 * j + i]); putchar(10); } }
VOID DisplayIRegisters() { WORD i, j; for (i = 0; i < 8; i++) { for (j = 0; j < 4; j++) printf("I%-2d $%08lX ", i + j * 8, dlx.FP.I[i + j * 8]); printf("\n"); } }
DisplayIRegisters
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DisplayRegisters() { WORD i; WORD j; for (i = 0; i <= 7; ++i) { for (j = 0; j <= 3; ++j) printf("R%-2d $%08lX ", 8 * j + i, dlx.R[8 * j + i]); putchar(10); } }
VOID DisplayRegisters() { WORD i, j; for (i = 0; i < 8; i++) { for (j = 0; j < 4; j++) printf("R%-2d $%08lX ", i + j * 8, dlx.R[i + j * 8]); printf("\n"); } }
DisplayRegisters
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DisplaySPRegisters() { WORD i; WORD j; for (i = 0; i <= 7; ++i) { for (j = 0; j <= 3; ++j) printf("F%-2d %12.4f ", i + 8 * j, dlx.FP.F[8 * j + i]); putchar(10); } }
VOID DisplaySPRegisters() { WORD i, j; for (i = 0; i < 8; i++) { for (j = 0; j < 4; j++) printf("F%-2d %12.4f ", i + j * 8, dlx.FP.F[i + j * 8]); printf("\n"); } }
DisplaySPRegisters
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DisplaySettings() { unsigned long v0; printf("Type:\t"); v0 = dlx.Type & 3; if (v0 == 3) { printf("Pipelined"); } else if (v0 <= 3) { if (v0 == 1) { printf("Hardwired"); } else if (v0 == 2) { printf("Microcode"); } } printf(" CPU\n\t"); if ((dlx.Type & 0x10) != 0) p...
VOID DisplaySettings() { printf("Type:\t"); switch (SIMTYPE) { case HARDWIRED: printf("Hardwired"); break; case MICROCODE: printf("Microcode"); break; case PIPELINED: printf("Pipelined"); } printf(" CPU\n\t"); if (dlx.Type & TIMERON) printf("Timer enabled"); else print...
DisplaySettings
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DisplayStatRegisters() { printf("PC $%08lX IST $%08lX FPST $%08lX IAR $%08lX\n", dlx.PC, dlx.IStatus, dlx.FPStatus, dlx.IAR); }
VOID DisplayStatRegisters() { printf("PC $%08lX IST $%08lX FPST $%08lX IAR $%08lX\n", dlx.PC, dlx.IStatus, dlx.FPStatus, dlx.IAR); }
DisplayStatRegisters
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DisplayTitle() { printf("DLX RISC CPU Simulator\nVersion %s.%d (%s)\n", "1.5", LinkNo, LinkDate); puts("(CMP-3P4Y 1.1995/6 - D J Viner - u9323864)\n"); DisplaySettings(); }
VOID DisplayTitle() { printf("DLX RISC CPU Simulator\nVersion %s.%d (%s)\n", Version, LinkNo, LinkDate); printf("(CMP-3P4Y 1.1995/6 - D J Viner - u9323864)\n\n"); DisplaySettings(); }
DisplayTitle
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DoAluOp(UWORD Dest, UWORD AluOp, UWORD Src1, UWORD Src2, UWORD Const, UBYTE S1Type, UBYTE S2Type, BOOL Unsigned) { unsigned long v8; float v9; unsigned long v10; float v11; double v12; UBYTE AType; float FResult; long IResult; unsigned long ISrc1; ULONG ISrc2; ULONG Tmp; ULONG ...
VOID DoAluOp(UWORD Dest, UWORD AluOp, UWORD Src1, UWORD Src2, UWORD Const, UBYTE S1Type, UBYTE S2Type, BOOL Unsigned) { ULONG IResult = 0, ISrc1 = 0, ISrc2 = 0, Tmp, i; DOUBLE DResult = 0, DSrc1 = 0, DSrc2 = 0; FLOAT FResult = 0, FSrc1 = 0, FSrc2 = 0; UBYTE AType = INT; switch (Src1) { case SR...
DoAluOp
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DoEXStage() { if (!dlx.Pipe[2].Status) { if (!dlx.Pipe[2].IR) dlx.Trapped = 1; if (dlx.Pipe[2].Op > 3u) { if (dlx.Pipe[2].Op == 63) PExecuteRType(2u); else PExecuteIType(2u); } else { PExecuteJType(2u); } ++dlx.Instr; } }
VOID DoEXStage() { if (dlx.Pipe[EX].Status == RUN) { if (dlx.Pipe[EX].IR == 0) dlx.Trapped = TRUE; if (dlx.Pipe[EX].Op < 4) PExecuteJType(EX); else if (dlx.Pipe[EX].Op == 0x3F) PExecuteRType(EX); else PExecuteIType(EX); dlx.Instr++; } }
DoEXStage
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DoFullHelp(STRPTR Cmd) { UBYTE i; FILE *H; UBYTE Text[104]; unsigned long v4; v4 = __readfsqword(0x28u); for (i = 0; i < strlen((const char *)Cmd); ++i) { if (((*__ctype_b_loc())[Cmd[i]] & 0x200) != 0) Cmd[i] = toupper(Cmd[i]); if (Cmd[i] <= 0x1Fu) Cmd[i] = 0; } H = fopen("dlxh...
VOID DoFullHelp(STRPTR Cmd) { UBYTE Text[TEXTLEN], i; FILE *H = (FILE *)NULL; for (i = 0; i < strlen(Cmd); i++) { if (islower(Cmd[i])) Cmd[i] = toupper(Cmd[i]); if (Cmd[i] < SPACE) Cmd[i] = 0; } H = fopen("dlxhlp.dat", "r"); if (H) { if (SetHelpAddr(H, Cmd)) { GetHelpLine(H...
DoFullHelp
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DoHelp() { UWORD i; UWORD ia; UWORD mid; for (i = 0; HelpList[i]; ++i) ; mid = (i + 1) / 2; for (ia = 0; ia < mid; ++ia) { printf("%-31.31s", (const char *)HelpList[ia]); if ((&HelpList[ia])[mid]) printf(off_147B6, (&HelpList[ia])[mid]); putchar(10); } puts("\nUse ?x where x ...
VOID DoHelp() { UWORD i = 0, mid; while (HelpList[i]) i++; mid = (i + 1) / 2; for (i = 0; i < mid; i++) { printf("%-31.31s", HelpList[i]); if (HelpList[i + mid]) printf("%s", HelpList[i + mid]); printf("\n"); } printf("\nUse ?x where x is any of the above commands for more detail...
DoHelp
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
BOOL DoIDStage() { UBYTE i; BOOL Stall; BOOL Fwd; Stall = 0; Fwd = 0; if (!dlx.Pipe[1].Status) { dlx.Pipe[1].Op = (dlx.Pipe[1].IR >> 26) & 0x3F; if (LODWORD(dlx.Pipe[1].IR) >> 26 > 3) { if (dlx.Pipe[1].Op == 63) DecodeRType(dlx.Pipe[1].IR, &dlx.Pipe[1].RegC, &dlx.Pipe[1].RegA, ...
BOOL DoIDStage() { BOOL Stall = FALSE, Fwd = FALSE; UBYTE i; if (dlx.Pipe[ID].Status == RUN) { dlx.Pipe[ID].Op = ((dlx.Pipe[ID].IR >> 26) & 0x3F); if (dlx.Pipe[ID].Op < 4) DecodeJType(dlx.Pipe[ID].IR, &dlx.Pipe[ID].Offset26); else if (dlx.Pipe[ID].Op == 0x3F) DecodeRType(dlx.Pipe[ID].IR,...
DoIDStage
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DoIFStage() { if (LOWORD(dlx.IStatus) && !dlx.IAR) { dlx.IAR = dlx.Pipe[2].PC + 4; dlx.PC = 0; dlx.Trapped = 0; dlx.Pipe[1].Status = 2; } if (dlx.Trapped) { dlx.Pipe[0].Status = 2; } else if (dlx.Pipe[0].Status != 1) { dlx.Pipe[0].Status = 0; dlx.Pipe[0].DoNewPC = 0; dlx.Pip...
VOID DoIFStage() { ULONG Int = dlx.IStatus & 0xFFFF; if (Int && !dlx.IAR) { dlx.IAR = dlx.Pipe[EX].PC + 4; dlx.PC = 0; dlx.Trapped = FALSE; dlx.Pipe[ID].Status = FLUSH; } if (!dlx.Trapped) { if (dlx.Pipe[IF].Status != STALL) { dlx.Pipe[IF].Status = RUN; dlx.Pipe[IF].DoNewPC = F...
DoIFStage
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DoLoad(STRPTR Cmd, BOOL Display) { BOOL Blank; WORD Pos; WORD Err; ULONG St; ULONG Start; ULONG Len; FILE *fp; char FileName[88]; unsigned long v10; v10 = __readfsqword(0x28u); Start = 0; Pos = 0; Err = 0; if (GetFileName(Cmd, &Pos, (STRPTR)FileName)) { Start = (int)ExtractNo(Cmd, ...
VOID DoLoad(STRPTR Cmd, BOOL Display) { ULONG Start = 0, St, Len; BOOL Blank; FILE *fp; UBYTE FileName[80]; WORD Pos = 0, Err = 0; if (!GetFileName(Cmd, &Pos, FileName)) return; Start = ExtractNo(Cmd, &Pos, &Blank); if (!Blank) { if (Start % 4 != 0) { printf("Misaligned start address\n"...
DoLoad
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DoMEMStage() { if (!dlx.Pipe[3].Status) { if (dlx.Pipe[3].Op > 3u) { if (dlx.Pipe[3].Op == 63) PExecuteRType(3u); else PExecuteIType(3u); } else { PExecuteJType(3u); } } }
VOID DoMEMStage() { if (dlx.Pipe[MEM].Status == RUN) { if (dlx.Pipe[MEM].Op < 4) PExecuteJType(MEM); else if (dlx.Pipe[MEM].Op == 0x3F) PExecuteRType(MEM); else PExecuteIType(MEM); } }
DoMEMStage
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DoMcLoad(STRPTR Cmd) { WORD Pos; char FileName[88]; unsigned long v3; v3 = __readfsqword(0x28u); Pos = 0; if (GetFileName(Cmd, &Pos, (STRPTR)FileName)) { printf("Loading microcode table '%s'\n", FileName); LoadMicrocode((STRPTR)FileName, 0); } }
VOID DoMcLoad(STRPTR Cmd) { UBYTE FileName[80]; WORD Pos = 0; if (!GetFileName(Cmd, &Pos, FileName)) return; printf("Loading microcode table '%s'\n", FileName); LoadMicrocode(FileName, FALSE); }
DoMcLoad
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DoRCodes(WORD Dest, WORD Src1, WORD Src2, WORD Func) { WORD j; fprintf(Log, "%-8.8s ", (const char *)&RCodes[Func]); for (j = 0; j <= 2; ++j) { if (j > 0 && RCodes[Func].Regs[j] > 0x20u) fputc(44, Log); if (RCodes[Func].Regs[j] > 0x20u) PrReg(RCodes[Func].Regs[j], RCodes[Func].Regs[j + ...
VOID DoRCodes(WORD Dest, WORD Src1, WORD Src2, WORD Func) { WORD j; fprintf(Log, "%-8.8s ", RCodes[Func].OpCode); for (j = 0; j < 3; j++) { if (j > 0 && RCodes[Func].Regs[j] > ' ') fputc(',', Log); if (RCodes[Func].Regs[j] > ' ') PrReg(RCodes[Func].Regs[j], RCodes[Func].Regs[j + 3], Dest, ...
DoRCodes
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DoReg(UBYTE Reg, UBYTE RegT) { if (Reg == 0xFF || RegT == 0xFF) { fwrite("N/A ", 1u, 5u, Log); } else { switch (RegT) { case 0u: fwrite("Int", 1u, 3u, Log); break; case 1u: fwrite("IFp", 1u, 3u, Log); break; case 2u: fwrite("SFp", 1u, 3u, Log); break; ...
VOID DoReg(UBYTE Reg, UBYTE RegT) { if (Reg == NA || RegT == NA) fprintf(Log, "N/A "); else { switch (RegT) { case INT: fprintf(Log, "Int"); break; case INTFP: fprintf(Log, "IFp"); break; case FPS: fprintf(Log, "SFp"); break; case FPD: fprintf(Log, ...
DoReg
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DoSave(STRPTR Cmd) { BOOL Blank; WORD Pos; BOOL Err; ULONG Start; ULONG End; ULONG Len; FILE *fp; char FileName[88]; unsigned long v9; v9 = __readfsqword(0x28u); Err = 0; Pos = 0; if (GetFileName(Cmd, &Pos, (STRPTR)FileName)) { Start = (int)ExtractNo(Cmd, &Pos, &Blank); if (Blank...
VOID DoSave(STRPTR Cmd) { BOOL Blank, Err = FALSE; UBYTE FileName[80]; ULONG Start, End, Len; FILE *fp; WORD Pos = 0; if (!GetFileName(Cmd, &Pos, FileName)) return; Start = ExtractNo(Cmd, &Pos, &Blank); if (Blank) { printf("Start address missing\n"); return; } End = ExtractNo(Cmd, &P...
DoSave
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void DoWBStage() { FLOAT FpC; if (!dlx.Pipe[4].Status) { ++dlx.IDone; if (dlx.Pipe[4].Op > 3u) { if (dlx.Pipe[3].Op == 63) PExecuteRType(4u); else PExecuteIType(4u); } else { PExecuteJType(4u); } if (dlx.Pipe[4].TRegC == 3) { dlx.FP.I[dlx.Pipe[4].RegC >> ...
VOID DoWBStage() { if (dlx.Pipe[WB].Status == RUN) { dlx.IDone++; if (dlx.Pipe[WB].Op < 4) PExecuteJType(WB); else if (dlx.Pipe[MEM].Op == 0x3F) PExecuteRType(WB); else PExecuteIType(WB); switch (dlx.Pipe[WB].TRegC) { case INT: if (dlx.Pipe[WB].RegC) dlx.R[dlx...
DoWBStage
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void Dump4Bytes(ULONG Instr) { WORD i; WORD St; WORD En; WORD Dir; UBYTE D[4]; unsigned long v6; v6 = __readfsqword(0x28u); St = 0; En = 4; Dir = 1; if (LittleEndian) { St = 3; En = -1; Dir = -1; } *(_DWORD *)D = Instr; fwrite("???? \"", 1u, 0xBu, Log); for (i = St; i != ...
VOID Dump4Bytes(ULONG Instr) { UBYTE D[4]; WORD i, St = 0, En = 4, Dir = 1; if (LittleEndian) { St = 3; En = -1; Dir = -1; } memcpy(D, &Instr, 4); fprintf(Log, "???? \""); for (i = St; i != En; i += Dir) if (D[i] >= ' ' && D[i] <= 126) fputc(D[i], Log); else fputc('...
Dump4Bytes
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void EnterMemory(STRPTR Cmd, BOOL Playback, BOOL Record, FILE *Rec) { UBYTE v4; UWORD v5; ULONG v6; size_t v7; WORD p; BOOL Blank; WORD j; WORD Size; ULONG Addr; ULONG Val; UBYTE Str[168]; unsigned long v17; v17 = __readfsqword(0x28u); p = 1; Size = ExtractNo(Cmd, &p, &Blank); if (!Blan...
VOID EnterMemory(STRPTR Cmd, BOOL Playback, BOOL Record, FILE *Rec) { ULONG Addr, Val; WORD j, Size, p = 1; UBYTE Str[162]; BOOL Blank; Size = ExtractNo(Cmd, &p, &Blank); if (Blank || !CheckSize(Size)) return; Addr = ExtractNo(Cmd, &p, &Blank); if (Blank) Addr = LastAddr; do { printf(...
EnterMemory
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void ErrorExit() { free(dlx.Memory); exit(20); }
VOID ErrorExit() { free(dlx.Memory); exit(20); }
ErrorExit
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void ExecuteInstruction() { UBYTE Dest; UBYTE Src1; UBYTE Src2; WORD Func; unsigned long v4; v4 = __readfsqword(0x28u); if (dlx.IR >> 28) { if (dlx.IR >> 26 == 63) { DecodeRType(dlx.IR, &Dest, &Src1, &Src2, &Func); dlx.RegA = dlx.R[Src1]; dlx.RegB = dlx.R[Src2]; switch (Func >...
VOID ExecuteInstruction() { UBYTE Dest, Src1, Src2; WORD Offset16, Func; if ((dlx.IR >> 28) == 0) ExecuteJType(); else if ((dlx.IR >> 26) == 0x3F) { DecodeRType(dlx.IR, &Dest, &Src1, &Src2, &Func); dlx.RegA = dlx.R[Src1]; dlx.RegB = dlx.R[Src2]; switch (Func >> 3) { case 0: Perfo...
ExecuteInstruction
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void ExecuteJType() { ULONG v0; LONG Offset26[2]; Offset26[1] = __readfsqword(0x28u); DecodeJType(dlx.IR, Offset26); v0 = (dlx.IR >> 26) & 3; if (v0 == 3) { dlx.R[31] = dlx.PC; dlx.PC += Offset26[0]; ++dlx.JALs; IncClock(3u); } else if (v0 == 2) { dlx.PC += Offset26[0]; ++dlx.Jump...
VOID ExecuteJType() { LONG Offset26; DecodeJType(dlx.IR, &Offset26); switch ((dlx.IR & 0x0C000000) >> 26) { case 0: dlx.TrapRfe++; IncClock(2); if ((dlx.Type & TRAPSON) && Offset26 < 64) switch (Offset26) { case 0: break; case 4: OutputChr(dlx.R[1] & 0xFF); ...
ExecuteJType
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
ULONG ExtractDecNo(STRPTR Str, WORD *Pos, BOOL *Blank) { WORD p; long Num; Num = 0; while (Str[*Pos] && ((*__ctype_b_loc())[Str[*Pos]] & 0x800) == 0) ++*Pos; p = *Pos; while (((*__ctype_b_loc())[Str[*Pos]] & 0x800) != 0) Num = Str[(*Pos)++] - 48 + 10 * Num; *Blank = p == *Pos; return Num; }
ULONG ExtractDecNo(STRPTR Str, WORD *Pos, BOOL *Blank) { ULONG Num = 0; WORD p; while (Str[*Pos] && !isdigit(Str[*Pos])) (*Pos)++; p = *Pos; while (isdigit(Str[*Pos])) { Num *= 10; Num += (Str[*Pos] - '0'); (*Pos)++; } *Blank = (p == *Pos); return Num; }
ExtractDecNo
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
ULONG ExtractNo(STRPTR Str, WORD *Pos, BOOL *Blank) { long v3; WORD p; ULONG Num; ULONG Numa; Num = 0; while (Str[*Pos] && ((*__ctype_b_loc())[Str[*Pos]] & 0x1000) == 0) ++*Pos; p = *Pos; while (((*__ctype_b_loc())[Str[*Pos]] & 0x1000) != 0) { if (((*__ctype_b_loc())[Str[*Pos]] & 0x200) != 0) ...
ULONG ExtractNo(STRPTR Str, WORD *Pos, BOOL *Blank) { ULONG Num = 0; WORD p; while (Str[*Pos] && !isxdigit(Str[*Pos])) (*Pos)++; p = *Pos; while (isxdigit(Str[*Pos])) { if (islower(Str[*Pos])) Str[*Pos] = toupper(Str[*Pos]); Num *= 16; if (isdigit(Str[*Pos])) Num += (Str[*Pos...
ExtractNo
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
STRPTR Fetch8(ULONG Addr) { UBYTE i; if (Addr < dlx.SizeOfMem) { if (LittleEndian) { for (i = 0; i <= 7u; ++i) Val_0[i] = dlx.Memory[7 - i + Addr]; } else { *(_QWORD *)Val_0 = *(_QWORD *)&dlx.Memory[Addr]; } } return Val_0; }
STRPTR Fetch8(ULONG Addr) { static UBYTE Val[8] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; if (Addr < dlx.SizeOfMem) { if (LittleEndian) { UBYTE i; for (i = 0; i < 8; i++) Val[i] = dlx.Memory[Addr + (7 - i)]; } else memcpy(Val, &dlx.Memory[Addr], 8); } return Val; }
Fetch8
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
UBYTE FetchB(ULONG Addr) { UBYTE Val; UBYTE Vala; Val = -1; if (Addr < dlx.SizeOfMem) return dlx.Memory[Addr]; if ((dlx.Type & 0x10) != 0 && Addr > 0xFEFFFFFF && Addr <= 0xFF00002F) { Vala = Addr; if (LittleEndian) Vala = 4 * ((unsigned char)Addr >> 2) - Addr + 4 * ((unsigned c...
UBYTE FetchB(ULONG Addr) { UBYTE Val = 0xFF; STRPTR p; if (Addr < dlx.SizeOfMem) Val = dlx.Memory[Addr]; else if ((dlx.Type & TIMERON) && Addr >= T1_LATCH && Addr <= T3_STATUS + 7) { p = (STRPTR)&timer; Val = (Addr - 0xFF000000); if (LittleEndian) { UBYTE Off = (Val / 4) * 4; Val ...
FetchB
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void FetchInstruction() { dlx.IR = FetchL(dlx.PC); dlx.PC += 4LL; ++dlx.Instr; dlx.Cycles = 0; IncClock(3u); }
VOID FetchInstruction() { dlx.IR = FetchL(dlx.PC); dlx.PC += 4; dlx.Instr++; dlx.Cycles = 0; IncClock(3); }
FetchInstruction
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
ULONG FetchL(ULONG Addr) { UBYTE i; ULONG Val; UBYTE V[4]; unsigned long v5; v5 = __readfsqword(0x28u); Val = 0xFFFFFFFFLL; if (Addr >= dlx.SizeOfMem) { if ((dlx.Type & 0x10) != 0 && Addr > 0xFEFFFFFF && Addr <= 0xFF000028) { switch (Addr) { case 0xFF000000uLL: Val = timer.Timer1L...
ULONG FetchL(ULONG Addr) { ULONG Val = 0xFFFFFFFF; if (Addr < dlx.SizeOfMem) { if (LittleEndian) { UBYTE V[4], i; for (i = 0; i < 4; i++) V[i] = dlx.Memory[Addr + (3 - i)]; memcpy(&Val, V, 4); } else memcpy(&Val, &dlx.Memory[Addr], 4); } else if ((dlx.Type & TIMERON) && ...
FetchL
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
UWORD FetchW(ULONG Addr) { short v1; UBYTE i; UWORD Val; UBYTE V[2]; unsigned long v6; v6 = __readfsqword(0x28u); Val = -1; if (Addr >= dlx.SizeOfMem) { if ((dlx.Type & 0x10) != 0 && Addr > 0xFEFFFFFF && Addr <= 0xFF000028 || Addr > 0xFF0000FF && Addr <= 0xFF000103) { v1 = FetchB(Addr...
UWORD FetchW(ULONG Addr) { UWORD Val = 0xFFFF; if (Addr < dlx.SizeOfMem) { if (LittleEndian) { UBYTE V[2], i; for (i = 0; i < 2; i++) V[i] = dlx.Memory[Addr + (1 - i)]; memcpy(&Val, V, 2); } else memcpy(&Val, &dlx.Memory[Addr], 2); } else if ((dlx.Type & TIMERON) && (Add...
FetchW
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
void FillMemory(STRPTR Cmd) { WORD Pos; BOOL Blank; WORD Size; ULONG i; ULONG Start; ULONG End; ULONG Val; unsigned long v8; v8 = __readfsqword(0x28u); Pos = 1; Size = ExtractNo(Cmd, &Pos, &Blank); if (!Blank && CheckSize(Size)) { Start = ExtractNo(Cmd, &Pos, &Blank); if (Blank) { ...
VOID FillMemory(STRPTR Cmd) { ULONG Start, End, Val, i; WORD Size, Pos = 1; BOOL Blank; Size = ExtractNo(Cmd, &Pos, &Blank); if (Blank || !CheckSize(Size)) return; Start = ExtractNo(Cmd, &Pos, &Blank); if (Blank) { printf("Start address missing\n"); return; } End = ExtractNo(Cmd, &Pos...
FillMemory
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0
BOOL GetFileName(STRPTR Cmd, WORD *Pos, STRPTR FileName) { int v3; WORD v5; unsigned char *v6; int v7; BOOL Quote; BOOL Loop; int j; int l; l = strlen((const char *)Cmd); j = 0; Quote = 0; Loop = 1; for (*Pos = 0; Cmd[*Pos] == 32; ++*Pos) ; if (Cmd[*Pos] == 34 || Cmd[*Pos] == 39) { ...
BOOL GetFileName(STRPTR Cmd, WORD *Pos, STRPTR FileName) { int l = strlen(Cmd), j = 0; BOOL Quote = FALSE, Loop = TRUE; *Pos = 0; while (Cmd[*Pos] == ' ') (*Pos)++; if (Cmd[*Pos] == 0x22 || Cmd[*Pos] == 0x27) { (*Pos)++; Quote = TRUE; } if (*Pos < l) { do { switch (Cmd[*Pos]) { ...
GetFileName
dlx-1.5.20
app-emulation
O0/app-emulation/dlx-1.5.20/mon
ida
O0