From: Jonathan Campbell Date: Fri, 6 May 2016 01:15:22 +0000 (-0700) Subject: well, we could avoid some crashiness by saving/restoring CPU registers X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=ab7178cd4cfa5f75d0388d0322db7512bc9a6f20;p=16.git well, we could avoid some crashiness by saving/restoring CPU registers in modexClearRegion. --- diff --git a/pcx2vrl b/pcx2vrl index bd947e55..06179c75 100755 Binary files a/pcx2vrl and b/pcx2vrl differ diff --git a/pcxsscut b/pcxsscut index 1deec74d..2ce56d28 100755 Binary files a/pcxsscut and b/pcxsscut differ diff --git a/src/lib/modex16.c b/src/lib/modex16.c index ee7f156c..6a5b2799 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -324,6 +324,14 @@ modexClearRegion(page_t *page, int x, int y, int w, int h, byte color) { } __asm { + PUSHF + PUSH ES + PUSH AX + PUSH BX + PUSH CX + PUSH DX + PUSH SI + PUSH DI MOV AX, SCREEN_SEG ; go to the VGA memory MOV ES, AX MOV DI, poffset ; go to the first pixel @@ -357,6 +365,14 @@ modexClearRegion(page_t *page, int x, int y, int w, int h, byte color) { ADD DI, nextRow ; go to the next row DEC h JNZ SCAN_START + POP DI + POP SI + POP DX + POP CX + POP BX + POP AX + POP ES + POPF } } diff --git a/vrl2vrs b/vrl2vrs index b67956b7..cee2d1d5 100755 Binary files a/vrl2vrs and b/vrl2vrs differ diff --git a/vrsdump b/vrsdump index dbaba30e..a75a903a 100755 Binary files a/vrsdump and b/vrsdump differ