@@ 69,14 69,14 @@ no assembler to complete the HAL to "full" level later. It's all in there.
// Condition structure: b6:0 condition ID b7 invert
#define CONDZ 0x00
#define CONDNZ 0x80
-#define CONDC 0x01
-#define CONDNC 0x81
-#define CONDA 0x02 // above (unsigned gt)
-#define CONDNA 0x82
-#define CONDLT 0x03 // signed
-#define CONDNLT 0x83
-#define CONDGT 0x04 // signed
-#define CONDNGT 0x84
+#define CONDLT 0x01 // unsigned lesser than
+#define CONDNLT 0x81
+#define CONDGT 0x02
+#define CONDNGT 0x82
+#define CONDSLT 0x03 // signed
+#define CONDNSLT 0x83
+#define CONDSGT 0x04 // signed
+#define CONSNSGT 0x84
#define EMETA_8B 0x10
#define EMETA_16B 0x11
@@ 276,10 276,10 @@ static int checkcond(byte cond) {
int r = 0;
switch (cond&0x7f) {
case CONDZ: r = vm.Z; break;
- case CONDC: r = vm.C; break;
- case CONDA: r = !vm.C && !vm.Z; break;
- case CONDLT: r = vm.SC; break;
- case CONDGT: r = !vm.SC && !vm.Z; break;
+ case CONDLT: r = vm.C; break;
+ case CONDGT: r = !vm.C && !vm.Z; break;
+ case CONDSLT: r = vm.SC; break;
+ case CONDSGT: r = !vm.SC && !vm.Z; break;
}
if (cond&0x80) r = !r;
return r;
@@ 576,7 576,6 @@ static void WBINOP() { M32B; _binop(); } // 0x48
static void WBINOP16() { M16B; _binop(); }
static void WBINOP8() { M8B; _binop(); }
static void DIVMOD() { dword b = vm.W; dword a = pnip(); vm.W = a % b; ppush(a / b); }
-static void LT() { vm.W = pnip() < vm.W; }
static void NEG() { vm.W = -vm.W; }
static void BYE() { vm.PC = MEMSZ; } // 0x50
@@ 900,7 899,7 @@ static void (*ops[OPCNT])() = {
MAYBEWORD, WORD, PARSE, FIND, WNF, FINDMOD, NULL, NULL,
STACKCHK, COMPWORD, RUNWORD, COMPILING, STARTCOMP, STOPCOMP, RSADDWR, COMPOP,
ALIGN4, ENTRY, CODE, CODE16, CODE8, COMPBINOP, NULL, NULL,
- WBINOP, WBINOP16, WBINOP8, DIVMOD, NULL, LT, NEG, NULL,
+ WBINOP, WBINOP16, WBINOP8, DIVMOD, NULL, NULL, NEG, NULL,
BYE, BYEFAIL, QUIT, ABORT_, DBG, USLEEP, MPROTECT, NULL,
NULL, NULL, NULL, NULL, NULL, WCHECKZ, STOREC, ACHECKZ,
FCHILD, FOPEN, FREADBUF, FCLOSE, FINFO, FITER, NULL, FSEEK,
@@ 943,7 942,7 @@ static char *opnames[OPCNT-0x28] = {
"maybeword", "word", "parse", "find", "(wnf)", "findmod", NULL, NULL,
"stack?", "compword", "runword", "compiling", "]", NULL, "rs+,", NULL,
"align4", "entry", "code", "code16b", "code8b", NULL, NULL, NULL,
- NULL, NULL, NULL, "/mod", NULL, "<", NULL, NULL,
+ NULL, NULL, NULL, "/mod", NULL, NULL, NULL, NULL,
"bye", "byefail", "quit", "(abort)", "dbg", "_usleep", "mprotect", NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
"_fchild", "_fopen", "_freadbuf", "_fclose", "_finfo", "_fiter", NULL, "_fseek",
@@ 972,11 971,10 @@ static void buildsysdict() {
sysconst("W)", OPW); sysconst("A)", OPA);
sysconst("PSP)", OPPSP); sysconst("RSP)", OPRSP);
sysconst("Z)", CONDZ); sysconst("NZ)", CONDNZ);
- sysconst("C)", CONDC); sysconst("NC)", CONDNC);
- sysconst("<)", CONDC); sysconst(">=)", CONDNC);
- sysconst(">)", CONDA); sysconst("<=)", CONDNA);
- sysconst("s<)", CONDLT); sysconst("s>=)", CONDNLT);
- sysconst("s>)", CONDGT); sysconst("s<=)", CONDNGT);
+ sysconst("<)", CONDLT); sysconst(">=)", CONDNLT);
+ sysconst(">)", CONDGT); sysconst("<=)", CONDNGT);
+ sysconst("s<)", CONDSLT); sysconst("s>=)", CONDNSLT);
+ sysconst("s>)", CONDSGT); sysconst("s<=)", CONSNSGT);
for (int i=0; i<OPCNT-0x28; i++) {
if (opnames[i]) wentry(opnames[i], i+0x28);
}