dos/com&sys: correctly set carry bit by using "sub si,-xx" instead of "add si,xx"

This commit is contained in:
László Molnár
2006-11-06 17:54:37 +01:00
parent 387edcf4b2
commit 375f171e47
8 changed files with 905 additions and 894 deletions
+2 -1
View File
@@ -70,7 +70,7 @@ void PackSys::patchLoader(OutputFile *fo,
{
const int e_len = getLoaderSectionStart("SYSCUTPO");
const int d_len = lsize - e_len;
assert(e_len > 0 && e_len < 256);
assert(e_len > 0 && e_len < 128);
assert(d_len > 0 && d_len < 256);
if (ph.u_len + d_len + ph.overlap_overhead > 0xfffe)
@@ -85,6 +85,7 @@ void PackSys::patchLoader(OutputFile *fo,
linker->defineSymbol("calltrick_calls", calls);
linker->defineSymbol("copy_source", ph.c_len + lsize - 1);
linker->defineSymbol("copy_destination", copy_to);
linker->defineSymbol("neg_e_len", 0 - e_len);
linker->defineSymbol("NRV2B160", ph.u_len + ph.overlap_overhead + 1);
linker->defineSymbol("original_strategy", get_le16(ibuf + 6));