various fixes, the most significant being that saving state now works.

This commit is contained in:
theoddone33
2001-04-15 01:23:24 +00:00
parent 3d00b7f21a
commit 918f4b7048
5 changed files with 47 additions and 40 deletions

View File

@@ -3237,7 +3237,11 @@ OpenCombFile:
je .found2
jmp .found
.found2
%ifdef __LINUX__
mov dword[edx],'.cmb'
%else
mov dword[edx],'.CMB'
%endif
push edx
mov dword[NumComboLocl],0
mov edx,fnames+1
@@ -3262,7 +3266,11 @@ OpenCombFile:
call Close_File
.failb
pop edx
%ifdef __LINUX__
mov dword[edx],'.srm'
%else
mov dword[edx],'.SRM'
%endif
ret
NEWSYM SaveCombFile
@@ -3303,7 +3311,11 @@ NEWSYM SaveCombFile
call Close_File
.failb
pop edx
%ifdef __LINUX__
mov dword[edx],'.srm'
%else
mov dword[edx],'.SRM'
%endif
.notfound
ret

View File

@@ -335,7 +335,7 @@ NEWSYM WaitForKey ; Wait for a key to be pressed
NEWSYM OsExit
NEWSYM OSExit
call exit
int 3h
;int 3h
jmp DosExit
NEWSYM MMXCheck
@@ -403,8 +403,8 @@ NEWSYM Open_File
popad
stc
ret
mov ax,3D00h
int 21h
;mov ax,3D00h
;int 21h
; return bx = file handle, carry = error
ret
@@ -428,8 +428,8 @@ NEWSYM Open_File_Write
popad
stc
ret
mov ax,3D01h
int 21h
;mov ax,3D01h
;int 21h
; return bx = file handle, carry = error
ret
@@ -449,9 +449,9 @@ NEWSYM Create_File
popad
stc
ret
mov ah,3Ch
mov cx,0
int 21h
;mov ah,3Ch
;mov cx,0
;int 21h
; return bx = file handle
ret
@@ -473,8 +473,8 @@ NEWSYM Write_File
mov eax,0
stc
ret
mov ah,40h
int 21h
;mov ah,40h
;int 21h
ret
NEWSYM Read_File
@@ -489,8 +489,8 @@ NEWSYM Read_File
mov eax,[TempVarSeek]
clc
ret
mov ah,3Fh
int 21h
;mov ah,3Fh
;int 21h
ret
NEWSYM Delete_File
@@ -499,8 +499,8 @@ NEWSYM Delete_File
call ZFileDelete
popad
ret
mov ah,41h
int 21h
;mov ah,41h
;int 21h
ret
NEWSYM Close_File
@@ -511,8 +511,8 @@ NEWSYM Close_File
popad
clc
ret
mov ah,3Eh
int 21h
;mov ah,3Eh
;int 21h
ret
NEWSYM File_Seek
@@ -528,8 +528,8 @@ NEWSYM File_Seek
mov dx,cx
ret
; seek to cx:dx from 0 position, return carry as error
mov ax,4200h
int 21h
;mov ax,4200h
;int 21h
ret
NEWSYM File_Seek_End
@@ -549,8 +549,8 @@ NEWSYM File_Seek_End
mov dx,[TempVarSeek+2]
ret
; seek to cx:dx from end position, and return file location in dx:ax
mov ax,4202h
int 21h
;mov ax,4202h
;int 21h
ret
NEWSYM Get_Time
@@ -585,9 +585,9 @@ NEWSYM Get_File_Date
mov cx,[ZFTime]
ret
; return packed date in dx:cx
mov ah,57h
mov al,00h
int 21h
;mov ah,57h
;mov al,00h
;int 21h
ret
@@ -802,8 +802,8 @@ NEWSYM Change_Single_Dir
stc
ret
; Dir in edx, return error in carry flag
mov ah,3Bh
int 21h
;mov ah,3Bh
;int 21h
ret
NEWSYM Create_Dir
@@ -820,8 +820,8 @@ NEWSYM Create_Dir
popad
stc
ret
mov ah,39h
int 21h
;mov ah,39h
;int 21h
ret
NEWSYM Remove_Dir
@@ -838,8 +838,8 @@ NEWSYM Remove_Dir
popad
stc
ret
mov ah,3Ah
int 21h
;mov ah,3Ah
;int 21h
ret
; mov dl,[LoadDrive]
@@ -908,7 +908,7 @@ NEWSYM Get_Dir
mov dl,[eax+3]
cmp dl,'/'
jne .noslash
mov dl,'\'
;mov dl,'\'
.noslash
mov [eax],dl
inc eax

View File

@@ -32,12 +32,11 @@
#ifdef __LINUX__
#define STUB_FUNCTION fprintf(stderr,"STUB: %s at " __FILE__ ", line %d, thread %d\n",__FUNCTION__,__LINE__,getpid())
#endif
#include <errno.h>
FILE *FILEHANDLE[16];
DWORD CurrentHandle=0;
// ZFileSystemInit
// return 0
@@ -315,14 +314,10 @@ DWORD GetDate()
#ifdef __LINUX__
int _chdrive( int drive )
{
STUB_FUNCTION;
// STUB_FUNCTION;
}
int _getdrive( void )
{
STUB_FUNCTION;
}
void _splitpath( const char *path, char *drive, char *dir, char *fname, char *ext )
{
STUB_FUNCTION;
// STUB_FUNCTION;
}
#endif

View File

@@ -336,7 +336,7 @@ int main (int argc, char *argv[]) {
#endif
{
fvar=&fname;
fvar[0] = 10;
fvar[0] = strlen(argv[optind]);
strncpy(&fvar[1], argv[optind],127);
makeextension();
}

View File

@@ -494,7 +494,7 @@ NEWSYM getcmdline
SECTION .data
.string2s db 'CMDLINE',0
.stringnf db 'SET CMDLINE LINE NOT FOUND!',0
.stringnf db 'SET CMDLINE LINE NOT FOUND!',13,10,0
NEWSYM CMDLineStr, times 256 db 0
NEWSYM GUIFName, times 256 db 0