diff options
-rw-r--r-- | src/vga.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -125,6 +125,7 @@ void ubox_blit_c(const uint8_t *sprite, const ubox_rect *dst, uint8_t c) uint8_t *dtarget = target + dst->x + dst->y * 320; asm volatile ( + "push %%ebp\n\t" "movl $320, %%ebp\n\t" "subl %%ecx, %%ebp\n\t" "blit_c_w:\n\t" @@ -146,11 +147,12 @@ void ubox_blit_c(const uint8_t *sprite, const ubox_rect *dst, uint8_t c) "addl %%ebp, %%edi\n\t" "decl %%ebx\n\t" "jne blit_c_w\n\t" + "pop %%ebp\n\t" : /*no output */ : "S" (sprite), "D" (dtarget), "b" ((uint32_t)dst->h), "d" ((uint32_t)c), "c" ((uint32_t)dst->w), "i" (UBOX_TRANSPARENT) - : "eax", "ebp" + : "eax" ); } @@ -161,6 +163,7 @@ void ubox_blitrc(const uint8_t *sprite, const ubox_rect *src, const ubox_rect *d sprite += src->x + src->y * src->w; asm volatile ( + "push %%ebp\n\t" "movl $320, %%ebp\n\t" "subl %%ecx, %%ebp\n\t" "blitrc_w:\n\t" @@ -179,11 +182,12 @@ void ubox_blitrc(const uint8_t *sprite, const ubox_rect *src, const ubox_rect *d "addl %%ebp, %%edi\n\t" "decl %%ebx\n\t" "jne blitrc_w\n\t" + "push %%ebp\n\t" : /*no output */ : "S" (sprite), "D" (dtarget), "b" ((uint32_t)dst->h), "d" ((uint32_t)(src->w - dst->w)), "c" ((uint32_t)dst->w), "i" (UBOX_TRANSPARENT) - : "eax", "ebp" + : "eax" ); } |