* ___SYSCALL changed to uppercase.

This commit is contained in:
daniel 1998-05-20 08:10:35 +00:00
parent 3ffd393399
commit b7f23a6e8c
3 changed files with 215 additions and 213 deletions

View File

@ -43,6 +43,8 @@ unit dos;
{$I os.inc}
{$I386_DIRECT}
interface
uses
@ -312,7 +314,7 @@ unit dos;
movw (%ebx),%bx
{ get date }
movw $0x5700,%ax
call ___syscall
call ___SYSCALL
shll $16,%edx
movw %cx,%dx
movl time,%ebx
@ -348,7 +350,7 @@ unit dos;
shldl $16,%ecx,%edx
{ set date }
movw $0x5701,%ax
call ___syscall
call ___SYSCALL
xorb %ah,%ah
movw %ax,U_DOS_DOSERROR
end;
@ -381,7 +383,7 @@ unit dos;
movb %al,int86_vec
movl 10(%ebp),%eax
; do not use first int
{do not use first int}
addl $2,%eax
movl 4(%eax),%ebx
@ -398,25 +400,25 @@ unit dos;
pushl %ebp
pushl %eax
movl %esp,%ebp
; calc EBP new
{calc EBP new}
addl $12,%ebp
movl 10(%ebp),%eax
; do not use first int
{do not use first int}
addl $2,%eax
popl (%eax)
movl %ebx,4(%eax)
movl %ecx,8(%eax)
movl %edx,12(%eax)
; restore EBP
{restore EBP}
popl %edx
movl %edx,16(%eax)
movl %esi,20(%eax)
movl %edi,24(%eax)
; ignore ES and DS
{ignore ES and DS}
popl %ebx /* flags */
movl %ebx,32(%eax)
; FS and GS too
{FS and GS too}
end;
end;
@ -566,7 +568,7 @@ unit dos;
asm
movl esadr,%edx
mov $0x7f06,%ax
call ___syscall
call ___SYSCALL
jnc exprg1
movl %eax,U_DOS_DOSERROR
xorl %eax,%eax
@ -605,7 +607,7 @@ unit dos;
{Returns DOS version in DOS and OS/2 version in OS/2}
asm
movb $0x30,%ah
call ___syscall
call ___SYSCALL
leave
ret
end;
@ -637,7 +639,7 @@ unit dos;
{$ELSE}
asm
movb $0x2a,%ah
call ___syscall
call ___SYSCALL
xorb %ah,%ah
movl 20(%ebp),%edi
stosw
@ -676,7 +678,7 @@ unit dos;
movb 10(%ebp),%dh
movb 12(%ebp),%dl
movb $0x2b,%ah
call ___syscall
call ___SYSCALL
xorb %ah,%ah
movw %ax,U_DOS_DOSERROR
end;
@ -709,7 +711,7 @@ unit dos;
{$ELSE}
asm
movb $0x2c,%ah
call ___syscall
call ___SYSCALL
xorb %ah,%ah
movl 20(%ebp),%edi
movb %dl,%al
@ -750,7 +752,7 @@ unit dos;
movb 12(%ebp),%dh
movb 14(%ebp),%dl
movb $0x2d,%ah
call ___syscall
call ___SYSCALL
xorb %ah,%ah
movw %ax,U_DOS_DOSERROR
end;
@ -774,7 +776,7 @@ unit dos;
signal handling instead.}
asm
movw $0x3300,%ax
call ___syscall
call ___SYSCALL
movl 8(%ebp),%eax
movb %dl,(%eax)
end;
@ -798,7 +800,7 @@ unit dos;
asm
movb 8(%ebp),%dl
movl $0x3301,%ax
call ___syscall
call ___SYSCALL
end;
{$ENDIF}
end;
@ -819,7 +821,7 @@ unit dos;
{! Do not use in OS/2.}
asm
movb $0x54,%ah
call ___syscall
call ___SYSCALL
movl 8(%ebp),%edi
stosb
end;
@ -842,7 +844,7 @@ unit dos;
asm
movb 8(%ebp),%al
movl $0x2e,%ah
call ___syscall
call ___SYSCALL
end;
{$ENDIF}
end;
@ -879,7 +881,7 @@ unit dos;
asm
movb 8(%ebp),%dl
movb $0x36,%ah
call ___syscall
call ___SYSCALL
cmpw $-1,%ax
je LDISKFREE1
mulw %cx
@ -937,7 +939,7 @@ unit dos;
asm
movb 8(%ebp),%dl
movb $0x36,%ah
call ___syscall
call ___SYSCALL
movw %dx,%bx
cmpw $-1,%ax
je LDISKSIZE1
@ -1031,7 +1033,7 @@ unit dos;
{No need to set DTA in EMX. Just give a pointer in ESI.}
movl 18(%ebp),%esi
movb $0x4e,%ah
call ___syscall
call ___SYSCALL
jnc LFF
movw %ax,U_DOS_DOSERROR
LFF:
@ -1070,7 +1072,7 @@ unit dos;
asm
movl 12(%ebp),%esi
movb $0x4f,%ah
call ___syscall
call ___SYSCALL
jnc LFN
movw %ax,U_DOS_DOSERROR
LFN:
@ -1306,7 +1308,7 @@ unit dos;
asm
movw $0x4300,%ax
leal n,%edx
call ___syscall
call ___SYSCALL
movl attr,%ebx
movw %cx,(%ebx)
end;
@ -1335,7 +1337,7 @@ unit dos;
movw $0x4301,%ax
leal n,%edx
movw attr,%cx
call ___syscall
call ___SYSCALL
end;
{$ENDIF}
end;

View File

@ -1821,7 +1821,7 @@ BEGIN
MOVL Filename, %EDX; { Filename to open }
XOR %CX, %CX;
MOVW Mode, %AX; { Mode to open file }
CALL ___syscall; { Open/create the file }
CALL ___SYSCALL; { Open/create the file }
JNC EXIT1;
MOV %AX, U_OBJECTS_DOSSTREAMERROR; { Hold error }
XOR %AX, %AX; { Open failed }
@ -1872,7 +1872,7 @@ BEGIN
MOVL BufferLength, %CX; { Bytes to read }
MOVB $0x3F, %AH;
MOVW Handle, %BX; { Load file handle }
CALL ___syscall; { Read from file }
CALL ___SYSCALL; { Read from file }
JC EXIT2; { Check for error }
MOVL BytesMoved, %EDI;
MOVZWL %AX, %EAX;
@ -1996,7 +1996,7 @@ BEGIN
MOVL POS, %ECX;
SHRL $16,%ECX;
MOVW Handle, %BX; { Load file handle }
CALL ___syscall; { Position the file }
CALL ___SYSCALL; { Position the file }
JC EXIT4;
MOVL NewPos, %EDI; { New position address }
MOVW %AX, %BX;
@ -2057,7 +2057,7 @@ BEGIN
MOVW %AX, U_OBJECTS_DOSSTREAMERROR; { DOS error cleared }
MOVB $0x3E, %AH;
MOVW Handle, %BX; { DOS file handle }
CALL ___syscall; { Close the file }
CALL ___SYSCALL; { Close the file }
JNC EXIT5;
MOVW %AX, U_OBJECTS_DOSSTREAMERROR; { DOS error returned }
EXIT5:

View File

@ -7,7 +7,7 @@
/ product, write the author if you haven't.
.globl __text
.globl ___syscall
.globl ___SYSCALL
.globl __data
.globl __heap_base
.globl __heap_brk
@ -21,7 +21,7 @@ __text:
call __dos_init
jmp __init
___syscall:
___SYSCALL:
call __dos_syscall
ret
@ -32,7 +32,7 @@ __init: cld
call _main
movb $0x4c,%ah
call ___syscall
call ___SYSCALL
2: jmp 2b
.data