From 92bc7be93ea01896b93f2986c6029b5932c32d97 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Thu, 5 Dec 2019 04:03:13 +0200 Subject: [PATCH] added missing "modify" declarations in cdpmi.h inline assembly blocks --- src/dos/cdpmi.h | 7 ++++--- src/dos/gfx.c | 20 +++++++++++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/dos/cdpmi.h b/src/dos/cdpmi.h index 4fc2c30..92bc5b3 100644 --- a/src/dos/cdpmi.h +++ b/src/dos/cdpmi.h @@ -34,7 +34,8 @@ void dpmi_munmap(void *addr); "xor ax, ax" \ "alloc_skip_err:" \ value[ax] \ - parm[ebx][edi]; + parm[ebx][edi] \ + modify[dx]; #pragma aux dpmi_free = \ "mov ax, 0x101" \ @@ -65,7 +66,7 @@ void dpmi_munmap(void *addr); "mov ax, cx" \ value[eax] \ parm[ebx][esi] \ - modify[cx di]; + modify[bx cx di esi]; #pragma aux dpmi_munmap = \ "mov ax, 0x801" \ @@ -73,7 +74,7 @@ void dpmi_munmap(void *addr); "shr ebx, 16" \ "int 0x31" \ parm[ebx] \ - modify[ax]; + modify[ax cx ebx]; #endif /* __WATCOMC__ */ #ifdef __DJGPP__ diff --git a/src/dos/gfx.c b/src/dos/gfx.c index b5670bf..d0128ee 100644 --- a/src/dos/gfx.c +++ b/src/dos/gfx.c @@ -25,11 +25,25 @@ static int fbidx; static int init_vbe(void) { + int i, num; + if(vbe_info(&vbe) == -1) { + fprintf(stderr, "failed to retrieve VBE information\n"); return -1; } vbe_print_info(stdout, &vbe); + + num = vbe_num_modes(&vbe); + for(i=0; i