From: John Tsiombikas Date: Thu, 5 Dec 2019 02:03:13 +0000 (+0200) Subject: added missing "modify" declarations in cdpmi.h inline assembly blocks X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=92bc7be93ea01896b93f2986c6029b5932c32d97;p=dosdemo added missing "modify" declarations in cdpmi.h inline assembly blocks --- 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