From: sparky4 Date: Tue, 21 Jul 2015 01:43:43 +0000 (-0500) Subject: it displays the actual error now~ X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=ddd14db5df50d0dea9bd98a2631aae417dfa6058;p=16.git it displays the actual error now~ modified: exmmtest.exe modified: src/lib/16_mm.c modified: src/lib/16_mm.h --- diff --git a/exmmtest.exe b/exmmtest.exe index f83adf52..858770f8 100644 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 9b398120..c7577924 100644 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -135,10 +135,10 @@ boolean MML_CheckForEMS(void) ======================= */ -unsigned MML_SetupEMS(mminfo_t *mm) +byte MML_SetupEMS(mminfo_t *mm) { - char str[80],str2[10]; - unsigned err; + char str[80];//,str2[10]; + byte err; boolean errorflag=false; union REGS CPURegs; @@ -199,6 +199,7 @@ getpages: mov [EMShandle],dx jmp End error: + mov err,ah mov errorflag,1 jmp End noEMS: @@ -206,11 +207,12 @@ End: } if(errorflag==true) { - err = CPURegs.h.ah; + //err = CPURegs.h.ah; strcpy(str,"MML_SetupEMS: EMS error 0x"); - itoa(err,str2,16); - strcpy(str,str2); - printf("%s\n",str); + //itoa(err,str2,16); + //strcat(str,&err); + //printf("%s\n",str); + printf("%s%x\n",str,err); return err; } mm->totalEMSpages=totalEMSpages; @@ -263,10 +265,11 @@ void MML_ShutdownEMS(mminfo_t *mm) ==================== */ -unsigned MM_MapEMS(mminfo_t *mm) +byte MM_MapEMS(mminfo_t *mm) { - char str[80],str2[10]; - unsigned err, EMShandle; + char str[80];//,str2[10]; + unsigned /*err, */EMShandle; + byte err; boolean errorflag=false; int i; union REGS CPURegs; @@ -285,16 +288,18 @@ unsigned MM_MapEMS(mminfo_t *mm) jnz error jmp End error: + mov err,ah mov errorflag,1 End: } if(errorflag==true) { - err = CPURegs.h.ah; + //err = CPURegs.h.ah; strcpy(str,"MM_MapEMS: EMS error 0x"); - itoa(err,str2,16); - strcat(str,str2); - printf("%s\n",str); + //itoa(err,str2,16); + //strcat(str,&err); + //printf("%s\n",str); + printf("%s%x\n",str, err); //printf("FACK! %x\n", err); return err; } diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index 25442bc7..a665b224 100644 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -163,9 +163,9 @@ typedef struct //========================================================================== boolean MML_CheckForEMS(void); -unsigned MML_SetupEMS(mminfo_t *mm); +byte MML_SetupEMS(mminfo_t *mm); void MML_ShutdownEMS(mminfo_t *mm); -unsigned MM_MapEMS(mminfo_t *mm); +byte MM_MapEMS(mminfo_t *mm); boolean MML_CheckForXMS(mminfo_t *mm); void MML_SetupXMS(mminfo_t *mm, mminfotype *mmi); void MML_ShutdownXMS(mminfo_t *mm);