From: Jonathan Campbell Date: Mon, 9 May 2016 02:31:57 +0000 (-0700) Subject: guard asm blocks X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=e3b220f5349f8282bd426fdca00c64c8c7e831cd;p=16.git guard asm blocks --- 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 f04391a9..2d4c0024 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -399,6 +399,15 @@ modexCopyPageRegion(page_t *dest, page_t *src, byte right = rclip[(sx+width)&0x03]; __asm { + PUSHF + PUSH ES + PUSH AX + PUSH BX + PUSH CX + PUSH DX + PUSH SI + PUSH DI + MOV AX, SCREEN_SEG ; work in the vga space MOV ES, AX ; MOV DI, doffset ; @@ -447,6 +456,15 @@ modexCopyPageRegion(page_t *dest, page_t *src, MOV DX, GC_INDEX+1 ; go back to CPU data MOV AL, 0ffh ; none from latches OUT DX, AL ; + + POP DI + POP SI + POP DX + POP CX + POP BX + POP AX + POP ES + POPF } } @@ -1008,6 +1026,15 @@ void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, c } //load the letter 'A' __asm { + PUSHF + PUSH ES + PUSH AX + PUSH BX + PUSH CX + PUSH DX + PUSH SI + PUSH DI + MOV DI, addr MOV SI, o MOV ES, s @@ -1022,6 +1049,15 @@ void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, c INC DI DEC CX JNZ L1 + + POP DI + POP SI + POP DX + POP CX + POP BX + POP AX + POP ES + POPF } for(i=0; i