unsigned GetCodeWord (unsigned Addr) /* Get a word from the given address */ { unsigned Lo = GetCodeByte (Addr); unsigned Hi = GetCodeByte (Addr+1); return Lo | (Hi << 8); }
unsigned GetCodeDByte (unsigned Addr) /* Get a dbyte from the given address */ { unsigned Lo = GetCodeByte (Addr); unsigned Hi = GetCodeByte (Addr+1); return (Lo <<8) | Hi; }
// 015 ASSIGN_MOP(z, LLB) void E_LLB() { E_LL_(GetCodeByte()); }
void E_SGB() { E_SG_(GetCodeByte()); }
// 072 ASSIGN_MOP(z, LGDB) void E_LGDB() { E_LGD_(GetCodeByte()); }
// 067 ASSIGN_MOP(z, LGB) void E_LGB() { E_LG_(GetCodeByte()); }
// 063 ASSIGN_MOP(z, PLDB) void E_PLDB() { E_PLD_(GetCodeByte()); }
// 061 ASSIGN_MOP(z, PLB) void E_PLB() { E_PL_(GetCodeByte()); }
// 044 ASSIGN_MOP(z, SLB) void E_SLB() { E_SL_(GetCodeByte()); }
unsigned TextTable (void) /* Output a table of text messages */ { /* Count how many bytes may be output. */ unsigned ByteCount = GetSpan (atTextTab); /* Output as many data bytes lines as needed. */ unsigned BytesLeft = ByteCount; while (BytesLeft > 0) { unsigned I; /* Count the number of characters that can be output as such */ unsigned Count = 0; while (Count < BytesLeft && Count < BytesPerLine*4-1) { unsigned char C = GetCodeByte (PC + Count); if (C >= 0x20 && C <= 0x7E && C != '\"') { ++Count; } else { break; } } /* If we have text, output it */ if (Count > 0) { unsigned CBytes; Indent (MCol); Output (".byte"); Indent (ACol); Output ("\""); for (I = 0; I < Count; ++I) { Output ("%c", GetCodeByte (PC+I)); } Output ("\""); CBytes = Count; while (CBytes > 0) { unsigned Chunk = CBytes; if (Chunk > BytesPerLine) { Chunk = BytesPerLine; } LineComment (PC, Chunk); LineFeed (); CBytes -= Chunk; PC += Chunk; } BytesLeft -= Count; } /* Count the number of bytes that must be output as bytes */ Count = 0; while (Count < BytesLeft && Count < BytesPerLine) { unsigned char C = GetCodeByte (PC + Count); if (C < 0x20 || C > 0x7E || C == '\"') { ++Count; } else { break; } } /* If we have raw output bytes, print them */ if (Count > 0) { DataByteLine (Count); PC += Count; BytesLeft -= Count; } } /* If the next line is not a byte table line, add a separator */ if (CodeLeft() && GetStyleAttr (PC) != atTextTab) { SeparatorLine (); } /* Return the number of bytes output */ return ByteCount; }