Comments
Loading Dream Comments...
You must be logged in to write a comment - Log In
When ::ILA:: encounters a nybble in the range 0...9, it pushes it onto its numerics stack and continues fetching at the next nybble, which is probably also another BCD digit. Eventually ::ILA:: (the ALU engine) encounters a $D (delimiter) or an $E (end) nybble.
// Source code bits...
int ILA::Fetch(int& PC) {
int MB = *(PC >>1);
int RV = (PC&1) ? MB>>4 : MB&15;
PC++;
return RV;
}
int ILA::GetNum(int& PC) {
int RV = 0;
for (int c = 0; c <= 9; c = Fetch (PC)) {
RV *= 10; RV += c;
}
return RV;
}
// More source code soon ....