]> 4ch.mooo.com Git - 16.git/commitdiff
it displays the actual error now~
authorsparky4 <sparky4@cock.li>
Tue, 21 Jul 2015 01:43:43 +0000 (20:43 -0500)
committersparky4 <sparky4@cock.li>
Tue, 21 Jul 2015 01:43:43 +0000 (20:43 -0500)
modified:   exmmtest.exe
modified:   src/lib/16_mm.c
modified:   src/lib/16_mm.h

exmmtest.exe
src/lib/16_mm.c
src/lib/16_mm.h

index f83adf52a1581f25a0f842711c7bb16be8366cce..858770f84b011519f39e6d69c1795b58a5a61948 100644 (file)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index 9b39812095fe78c53ac3d46158aeb677be23574e..c7577924c22be821048d3cc94505e5b047dc4b4b 100644 (file)
@@ -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;
                }
index 25442bc7768c58d7957248a9230a90835d1e8fd7..a665b22436c5c128bc21d7d6b38a8ae2c6f03880 100644 (file)
@@ -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);