浏览代码

* Remove use of direct U_UNIT_NAME or TC_UNIT_NAME
symbols in assembler sources.
Added to corresponding system variables or typed constants a
public name 'operatingsystem_XXX' alias and used that alias in assembler
source.

git-svn-id: trunk@18943 -

pierre 14 年之前
父节点
当前提交
f0aa48b083

+ 6 - 6
rtl/go32v2/system.pp

@@ -72,10 +72,10 @@ var
   memw : array[0..($7fffffff div sizeof(word))-1] of word absolute $0:$0;
   memw : array[0..($7fffffff div sizeof(word))-1] of word absolute $0:$0;
   meml : array[0..($7fffffff div sizeof(longint))-1] of longint absolute $0:$0;
   meml : array[0..($7fffffff div sizeof(longint))-1] of longint absolute $0:$0;
 { C-compatible arguments and environment }
 { C-compatible arguments and environment }
-  argc  : longint;
-  argv  : ppchar;
-  envp  : ppchar;
-  dos_argv0 : pchar;
+  argc:longint;public name 'operatingsystem_parameter_argc';
+  argv:PPchar;public name 'operatingsystem_parameter_argv';
+  envp:PPchar;public name 'operatingsystem_parameter_envp';
+  dos_argv0 : pchar; public name 'dos_argv0';
 
 
   AllFilesMask: string [3];
   AllFilesMask: string [3];
 
 
@@ -125,8 +125,8 @@ type
   end;
   end;
 
 
 var
 var
-  stub_info       : p_stub_info;
-  go32_info_block : t_go32_info_block;
+  stub_info       : p_stub_info; public name 'operatingsystem_stub_info';
+  go32_info_block : t_go32_info_block; public name 'operatingsystem_go32_info_block';
 {$ifdef SYSTEMDEBUG}
 {$ifdef SYSTEMDEBUG}
 const
 const
    accept_sbrk : boolean = true;
    accept_sbrk : boolean = true;

+ 32 - 28
rtl/go32v2/v2prt0.as

@@ -217,7 +217,7 @@ dos_alloc_ok:
         pushl   %eax
         pushl   %eax
         call    ___sbrk
         call    ___sbrk
         movl    %eax, __stubinfo
         movl    %eax, __stubinfo
-        movl  %eax,U_SYSTEM_STUB_INFO
+        movl  %eax,operatingsystem_stub_info
         movl    %eax, %edi
         movl    %eax, %edi
         .byte 0x64 /* fs: */
         .byte 0x64 /* fs: */
         movl    STUBINFO_SIZE, %ecx
         movl    STUBINFO_SIZE, %ecx
@@ -245,7 +245,11 @@ use_stubinfo_stack_size:
         movl    %eax, ___djgpp_stack_limit      /* Bottom of stack */
         movl    %eax, ___djgpp_stack_limit      /* Bottom of stack */
         addl    $256,%eax
         addl    $256,%eax
         movl    %eax,__stkbottom               /* for stack checks */
         movl    %eax,__stkbottom               /* for stack checks */
-        movl    %eax,U_SYSTEM_STACKBOTTOM
+        /* movl    %eax,operatingsystem_stackbottom  */
+        /* StackBottom is
+        a ThrteadVar and can not be given a symbol with name,
+        copying value of __stkbottom to system.STackBottom variable
+        is done in system unit startup code. PM */
 
 
         movl    ___djgpp_stack_limit,%eax       /* Bottom of stack */
         movl    ___djgpp_stack_limit,%eax       /* Bottom of stack */
         addl    __stklen, %eax
         addl    __stklen, %eax
@@ -290,7 +294,7 @@ exit:
         popl    %ecx
         popl    %ecx
 no_exception:
 no_exception:
         cli                          /* Just in case they didn't unhook ints */
         cli                          /* Just in case they didn't unhook ints */
-        FREESEL U_SYSTEM_GO32_INFO_BLOCK+26     /* selector for linear memory */
+        FREESEL operatingsystem_go32_info_block+26     /* selector for linear memory */
         FREESEL ___v2prt0_ds_alias      /* DS alias for rmcb exceptions */
         FREESEL ___v2prt0_ds_alias      /* DS alias for rmcb exceptions */
         FREESEL sbrk16_api_seg    /* sbrk cs */
         FREESEL sbrk16_api_seg    /* sbrk cs */
         movw    sbrk16_first_byte+6,%dx /* selector for allocated DOS mem */
         movw    sbrk16_first_byte+6,%dx /* selector for allocated DOS mem */
@@ -632,12 +636,12 @@ _setup_core_selector:
         /* addl $4,%esp */
         /* addl $4,%esp */
         cmpl $-1,%eax
         cmpl $-1,%eax
         jne .L24
         jne .L24
-        movw $0,U_SYSTEM_GO32_INFO_BLOCK+26
+        movw $0,operatingsystem_go32_info_block+26
         leave
         leave
         ret
         ret
         .align 2,0x90
         .align 2,0x90
 .L24:
 .L24:
-        movw %ax,U_SYSTEM_GO32_INFO_BLOCK+26
+        movw %ax,operatingsystem_go32_info_block+26
         movw %ax,_core_selector
         movw %ax,_core_selector
         pushl $0x10ffff
         pushl $0x10ffff
         andl $0xffff,%eax
         andl $0xffff,%eax
@@ -650,7 +654,7 @@ _setup_core_selector:
 _setup_screens:
 _setup_screens:
         pushl %ebp
         pushl %ebp
         movl %esp,%ebp
         movl %esp,%ebp
-        movw U_SYSTEM_GO32_INFO_BLOCK+26,%dx
+        movw operatingsystem_go32_info_block+26,%dx
         movl $1048563,%ecx
         movl $1048563,%ecx
 /APP
 /APP
         movw %dx, %gs
         movw %dx, %gs
@@ -659,8 +663,8 @@ _setup_screens:
 /NO_APP
 /NO_APP
         cmpw $64896,%ax
         cmpw $64896,%ax
         jne .L26
         jne .L26
-        movl $655360,U_SYSTEM_GO32_INFO_BLOCK+8
-        movl $655360,U_SYSTEM_GO32_INFO_BLOCK+4
+        movl $655360,operatingsystem_go32_info_block+8
+        movl $655360,operatingsystem_go32_info_block+4
         leave
         leave
         ret
         ret
         .align 2,0x90
         .align 2,0x90
@@ -673,14 +677,14 @@ _setup_screens:
 /NO_APP
 /NO_APP
         cmpb $7,%al
         cmpb $7,%al
         jne .L29
         jne .L29
-        movl $720896,U_SYSTEM_GO32_INFO_BLOCK+4
-        movl $753664,U_SYSTEM_GO32_INFO_BLOCK+8
+        movl $720896,operatingsystem_go32_info_block+4
+        movl $753664,operatingsystem_go32_info_block+8
         leave
         leave
         ret
         ret
         .align 2,0x90
         .align 2,0x90
 .L29:
 .L29:
-        movl $753664,U_SYSTEM_GO32_INFO_BLOCK+4
-        movl $720896,U_SYSTEM_GO32_INFO_BLOCK+8
+        movl $753664,operatingsystem_go32_info_block+4
+        movl $720896,operatingsystem_go32_info_block+8
         leave
         leave
         ret
         ret
 
 
@@ -693,36 +697,36 @@ _setup_go32_info_block:
         leal -8(%ebp),%eax
         leal -8(%ebp),%eax
         pushl %eax
         pushl %eax
         call ___dpmi_get_version
         call ___dpmi_get_version
-        movl $40,U_SYSTEM_GO32_INFO_BLOCK
+        movl $40,operatingsystem_go32_info_block
         movl __stubinfo,%edx
         movl __stubinfo,%edx
         movzwl 36(%edx),%eax
         movzwl 36(%edx),%eax
         sall $4,%eax
         sall $4,%eax
-        movl %eax,U_SYSTEM_GO32_INFO_BLOCK+12
+        movl %eax,operatingsystem_go32_info_block+12
         movzwl 32(%edx),%ecx
         movzwl 32(%edx),%ecx
-        movl %ecx,U_SYSTEM_GO32_INFO_BLOCK+16
+        movl %ecx,operatingsystem_go32_info_block+16
         movzwl 38(%edx),%ecx
         movzwl 38(%edx),%ecx
-        movl %ecx,U_SYSTEM_GO32_INFO_BLOCK+20
+        movl %ecx,operatingsystem_go32_info_block+20
         movb -3(%ebp),%al
         movb -3(%ebp),%al
-        movb %al,U_SYSTEM_GO32_INFO_BLOCK+24
+        movb %al,operatingsystem_go32_info_block+24
         movb -2(%ebp),%al
         movb -2(%ebp),%al
-        movb %al,U_SYSTEM_GO32_INFO_BLOCK+25
-        movl $-1,U_SYSTEM_GO32_INFO_BLOCK+28
-        pushl $U_SYSTEM_GO32_INFO_BLOCK+32
+        movb %al,operatingsystem_go32_info_block+25
+        movl $-1,operatingsystem_go32_info_block+28
+        pushl $operatingsystem_go32_info_block+32
         movzwl 38(%edx),%eax
         movzwl 38(%edx),%eax
         pushl %eax
         pushl %eax
         call ___dpmi_get_segment_base_address
         call ___dpmi_get_segment_base_address
-        movw $4,U_SYSTEM_GO32_INFO_BLOCK+36
+        movw $4,operatingsystem_go32_info_block+36
         movb -8(%ebp),%dl
         movb -8(%ebp),%dl
         salw $8,%dx
         salw $8,%dx
         movzbw -7(%ebp),%ax
         movzbw -7(%ebp),%ax
         orw %ax,%dx
         orw %ax,%dx
-        movw %dx,U_SYSTEM_GO32_INFO_BLOCK+38
+        movw %dx,operatingsystem_go32_info_block+38
         call copy_to_c_go32_info_block
         call copy_to_c_go32_info_block
         leave
         leave
         ret
         ret
 
 
 copy_to_c_go32_info_block:
 copy_to_c_go32_info_block:
-        leal U_SYSTEM_GO32_INFO_BLOCK,%esi
+        leal operatingsystem_go32_info_block,%esi
         leal __go32_info_block,%edi
         leal __go32_info_block,%edi
         movl $10,%ecx
         movl $10,%ecx
         rep
         rep
@@ -771,7 +775,7 @@ ___prt1_startup:
         fldcw   ___fpucw
         fldcw   ___fpucw
 .Lno_387:
 .Lno_387:
         popl %eax
         popl %eax
-        pushl   U_SYSTEM_ENVP
+        pushl   operatingsystem_parameter_envp
         pushl   ___crt0_argv
         pushl   ___crt0_argv
         pushl   ___crt0_argc
         pushl   ___crt0_argc
         call    _pascal_start
         call    _pascal_start
@@ -779,7 +783,7 @@ ___prt1_startup:
 /*      call _exit changed to */
 /*      call _exit changed to */
         call    exit
         call    exit
         .align 2,0x90
         .align 2,0x90
-/* .comm U_SYSTEM_DOS_ARGV0,4 */
+/* .comm dos_argv0,4 */
         .comm ___dos_argv0,4
         .comm ___dos_argv0,4
         .comm ___crt0_argc,4
         .comm ___crt0_argc,4
         .comm ___crt0_argv,4
         .comm ___crt0_argv,4
@@ -837,7 +841,7 @@ _fpc_windows_error:
         .globl  _pascal_start
         .globl  _pascal_start
 _pascal_start:
 _pascal_start:
         /* %ebx doesn't contain ScreenPrimary */
         /* %ebx doesn't contain ScreenPrimary */
-        movl    U_SYSTEM_GO32_INFO_BLOCK+4,%ebx
+        movl    operatingsystem_go32_info_block+4,%ebx
         movl    %ebx,_ScreenPrimary
         movl    %ebx,_ScreenPrimary
         /*  core selector in %fs */
         /*  core selector in %fs */
         /*  keep original fs for debuggers !!!!! (PM) */
         /*  keep original fs for debuggers !!!!! (PM) */
@@ -851,7 +855,7 @@ _pascal_start:
         movl    $0x0,%ebp
         movl    $0x0,%ebp
         movl    %esp,%ebx
         movl    %esp,%ebx
         movl    12(%ebx),%eax
         movl    12(%ebx),%eax
-        movl    %eax,U_SYSTEM_ENVP
+        movl    %eax,operatingsystem_parameter_envp
         movl    %eax,_environ
         movl    %eax,_environ
         movl    8(%ebx),%eax
         movl    8(%ebx),%eax
         movl    %eax,_args
         movl    %eax,_args
@@ -868,7 +872,7 @@ _pascal_start:
 
 
         .data
         .data
 
 
-/*      .comm   U_SYSTEM_ENVP,4 */
+/*      .comm   operatingsystem_parameter_envp,4 */
         .globl  _ScreenPrimary
         .globl  _ScreenPrimary
 _ScreenPrimary:
 _ScreenPrimary:
         .long   0
         .long   0

+ 2 - 2
rtl/inc/systemh.inc

@@ -473,13 +473,13 @@ var
   { Delphi compatibility }
   { Delphi compatibility }
 
 
 {$ifdef FPC_HAS_FEATURE_DYNLIBS}
 {$ifdef FPC_HAS_FEATURE_DYNLIBS}
-  IsLibrary : boolean = false;
+  IsLibrary : boolean = false; public name 'operatingsystem_islibrary';
 {$else FPC_HAS_FEATURE_DYNLIBS}
 {$else FPC_HAS_FEATURE_DYNLIBS}
 const
 const
   IsLibrary = false;
   IsLibrary = false;
 var
 var
 {$endif FPC_HAS_FEATURE_DYNLIBS}
 {$endif FPC_HAS_FEATURE_DYNLIBS}
-  IsConsole : boolean = false;
+  IsConsole : boolean = false; public name 'operatingsystem_isconsole';
   { Threading support }
   { Threading support }
   fpc_threadvar_relocate_proc : pointer; public name 'FPC_THREADVAR_RELOCATE';
   fpc_threadvar_relocate_proc : pointer; public name 'FPC_THREADVAR_RELOCATE';
 
 

+ 1 - 1
rtl/linux/i386/dllprt0.as

@@ -33,7 +33,7 @@ FPC_SHARED_LIB_START:
         movl    %eax,operatingsystem_parameter_argc    /* Move the argument counter    */
         movl    %eax,operatingsystem_parameter_argc    /* Move the argument counter    */
         movl    %ecx,operatingsystem_parameter_argv    /* Move the argument pointer    */
         movl    %ecx,operatingsystem_parameter_argv    /* Move the argument pointer    */
 
 
-        movb    $1,TC_SYSTEM_ISLIBRARY
+        movb    $1,operatingsystem_islibrary
 
 
         /* Save initial stackpointer */
         /* Save initial stackpointer */
         movl    %esp,__stkptr
         movl    %esp,__stkptr

+ 2 - 2
rtl/linux/powerpc64/dllprt0.as

@@ -340,7 +340,7 @@ FUNCTION_PROLOG FPC_SHARED_LIB_START
     std     5, 0(10)
     std     5, 0(10)
 
 
     /* update library flag in RTL */
     /* update library flag in RTL */
-    LOAD_64BIT_VAL 8, TC_SYSTEM_ISLIBRARY
+    LOAD_64BIT_VAL 8, operatingsystem_islibrary
     li      6, 1
     li      6, 1
     stw     6, 0(8)
     stw     6, 0(8)
 
 
@@ -351,7 +351,7 @@ FUNCTION_PROLOG FPC_SHARED_LIB_START
     nop
     nop
 
 
     /* return to the caller */
     /* return to the caller */
-    addi    1,1,144   /* restore stack */ 
+    addi    1,1,144   /* restore stack */
     ld      0,16(1)   /* prepare for method return */
     ld      0,16(1)   /* prepare for method return */
     mtlr    0
     mtlr    0
     blr
     blr

+ 1 - 1
rtl/linux/x86_64/dllprt0.as

@@ -54,7 +54,7 @@ _startlib:
         movq     operatingsystem_parameter_envp@GOTPCREL(%rip),%rbx
         movq     operatingsystem_parameter_envp@GOTPCREL(%rip),%rbx
         movq     %rdx,(%rbx)
         movq     %rdx,(%rbx)
 
 
-        movq    TC_SYSTEM_ISLIBRARY@GOTPCREL(%rip),%rbx
+        movq    operatingsystem_islibrary@GOTPCREL(%rip),%rbx
         movb    $1,(%rbx)
         movb    $1,(%rbx)
 
 
         /* Save initial stackpointer */
         /* Save initial stackpointer */

+ 4 - 4
rtl/netbsd/i386/cprt0.as

@@ -63,8 +63,8 @@ __start:
 	pushl	%ecx
 	pushl	%ecx
 	pushl	%edx
 	pushl	%edx
 	pushl	%eax
 	pushl	%eax
-	movl	%eax,U_SYSTEM_ARGC
-	movl	%edx,U_SYSTEM_ARGV
+	movl	%eax,operatingsystem_parameter_argc
+	movl	%edx,operatingsystem_parameter_argv
 	call	___start
 	call	___start
 
 
 #NO_APP
 #NO_APP
@@ -87,7 +87,7 @@ ___start:
 	movl 28(%ebp),%edi
 	movl 28(%ebp),%edi
 	movl environ@GOT(%ebx),%eax
 	movl environ@GOT(%ebx),%eax
 	movl %edx,(%eax)
 	movl %edx,(%eax)
-	movl %edx,U_SYSTEM_ENVP
+	movl %edx,operatingsystem_parameter_envp
 	movl __progname@GOT(%ebx),%edx
 	movl __progname@GOT(%ebx),%edx
 	movl (%esi),%eax
 	movl (%esi),%eax
 	movl %eax,(%edx)
 	movl %eax,(%edx)
@@ -154,7 +154,7 @@ ___start:
 
 
 _haltproc:
 _haltproc:
            mov $1,%eax
            mov $1,%eax
-           movzwl U_SYSTEM_EXITCODE,%ebx
+           movzwl operatingsystem_result,%ebx
            pushl %ebx
            pushl %ebx
            call _actualsyscall
            call _actualsyscall
            addl  $4,%esp
            addl  $4,%esp

+ 4 - 4
rtl/netbsd/i386/prt0.as

@@ -78,11 +78,11 @@ ___start:
 	movl %esp,%ebp
 	movl %esp,%ebp
 	movl 16(%ebp),%eax
 	movl 16(%ebp),%eax
 	movl %eax,environ
 	movl %eax,environ
-	movl %eax,U_SYSTEM_ENVP
+	movl %eax,operatingsystem_parameter_envp
 	movl 8(%ebp),%eax
 	movl 8(%ebp),%eax
-	movl %eax,U_SYSTEM_ARGC
+	movl %eax,operatingsystem_parameter_argc
 	movl 12(%ebp),%eax
 	movl 12(%ebp),%eax
-	movl %eax,U_SYSTEM_ARGV
+	movl %eax,operatingsystem_parameter_argv
 	movl (%eax),%edx
 	movl (%eax),%edx
 	movl %edx,__progname
 	movl %edx,__progname
 	testl %edx,%edx
 	testl %edx,%edx
@@ -132,7 +132,7 @@ ___start:
 
 
 _haltproc:
 _haltproc:
            mov $1,%eax
            mov $1,%eax
-           movzwl U_SYSTEM_EXITCODE,%ebx
+           movzwl operatingsystem_result,%ebx
            pushl %ebx
            pushl %ebx
            call _actualsyscall
            call _actualsyscall
            addl  $4,%esp
            addl  $4,%esp

+ 8 - 8
rtl/netbsd/powerpc/cprt0.as

@@ -105,19 +105,19 @@ _start:
 	mr 3,24
 	mr 3,24
 	mr 4,27
 	mr 4,27
 
 
-        lis     11,U_SYSTEM_ARGC@ha
-        stw     3,U_SYSTEM_ARGC@l(11);
-        lis     11,U_SYSTEM_ARGV@ha
-        stw     4,U_SYSTEM_ARGV@l(11); 
+        lis     11,operatingsystem_parameter_argc@ha
+        stw     3,operatingsystem_parameter_argc@l(11);
+        lis     11,operatingsystem_parameter_argv@ha
+        stw     4,operatingsystem_parameter_argv@l(11); 
         
         
-        lis     11,U_SYSTEM_ENVP@ha
-        stw     5,U_SYSTEM_ENVP@l(11); 
+        lis     11,operatingsystem_parameter_envp@ha
+        stw     5,operatingsystem_parameter_envp@l(11); 
 	mtlr    0
 	mtlr    0
 	bl main@plt
 	bl main@plt
 
 
 _haltproc:
 _haltproc:
-        lis     3,U_SYSTEM_EXITCODE@h
-        stw     3,U_SYSTEM_EXITCODE@l(3)
+        lis     3,operatingsystem_result@h
+        stw     3,operatingsystem_result@l(3)
 	bl exit@plt
 	bl exit@plt
 .Lfe1:
 .Lfe1:
 	.size	 _start,.Lfe1-_start
 	.size	 _start,.Lfe1-_start

+ 8 - 8
rtl/netbsd/powerpc/prt0.as

@@ -101,13 +101,13 @@ _start:
 	mr 3,24
 	mr 3,24
 	mr 4,27
 	mr 4,27
 
 
-        lis     11,U_SYSTEM_ARGC@ha
-        stw     3,U_SYSTEM_ARGC@l(11);
-        lis     11,U_SYSTEM_ARGV@ha
-        stw     4,U_SYSTEM_ARGV@l(11); 
+        lis     11,operatingsystem_parameter_argc@ha
+        stw     3,operatingsystem_parameter_argc@l(11);
+        lis     11,operatingsystem_parameter_argv@ha
+        stw     4,operatingsystem_parameter_argv@l(11); 
         
         
-        lis     11,U_SYSTEM_ENVP@ha
-        stw     5,U_SYSTEM_ENVP@l(11); 
+        lis     11,operatingsystem_parameter_envp@ha
+        stw     5,operatingsystem_parameter_envp@l(11); 
 	mtlr    0
 	mtlr    0
 	bl PASCALMAIN
 	bl PASCALMAIN
 
 
@@ -117,8 +117,8 @@ _start:
 
 
 _haltproc:
 _haltproc:
 	li      0,1              /* exit call */
 	li      0,1              /* exit call */
-        lis     3,U_SYSTEM_EXITCODE@h
-        stw     3,U_SYSTEM_EXITCODE@l(3)
+        lis     3,operatingsystem_result@h
+        stw     3,operatingsystem_result@l(3)
         sc
         sc
         b       _haltproc
         b       _haltproc
 
 

+ 4 - 4
rtl/openbsd/i386/cprt0.as

@@ -59,7 +59,7 @@ ___start:
 	movl 12(%ebp),%esi
 	movl 12(%ebp),%esi
 	movl 16(%ebp),%eax
 	movl 16(%ebp),%eax
 	movl %eax,environ
 	movl %eax,environ
-	movl %eax,U_SYSTEM_ENVP
+	movl %eax,operatingsystem_parameter_envp
 	movl (%esi),%ebx
 	movl (%esi),%ebx
 	testl %ebx,%ebx
 	testl %ebx,%ebx
 	je .L3
 	je .L3
@@ -100,8 +100,8 @@ ___start:
 	subl $16,%esp
 	subl $16,%esp
 	pushl %eax
 	pushl %eax
 	movl 8(%ebp),%eax
 	movl 8(%ebp),%eax
-	movl %eax,U_SYSTEM_ARGC
-	movl %esi,U_SYSTEM_ARGV
+	movl %eax,operatingsystem_parameter_argc
+	movl %esi,operatingsystem_parameter_argv
 	popl %eax
 	popl %eax
 #	pushl environ
 #	pushl environ
 #	pushl %esi
 #	pushl %esi
@@ -120,7 +120,7 @@ ___start:
 
 
 _haltproc:
 _haltproc:
            mov $1,%eax 
            mov $1,%eax 
-           movzwl U_SYSTEM_EXITCODE,%ebx
+           movzwl operatingsystem_result,%ebx
            pushl %ebx
            pushl %ebx
            call .Lactualsyscall
            call .Lactualsyscall
            addl  $4,%esp
            addl  $4,%esp

+ 4 - 4
rtl/openbsd/i386/prt0.as

@@ -59,7 +59,7 @@ ___start:
 	movl 12(%ebp),%esi
 	movl 12(%ebp),%esi
 	movl 16(%ebp),%eax
 	movl 16(%ebp),%eax
 	movl %eax,environ
 	movl %eax,environ
-	movl %eax,U_SYSTEM_ENVP
+	movl %eax,operatingsystem_parameter_envp
 	movl (%esi),%ebx
 	movl (%esi),%ebx
 	testl %ebx,%ebx
 	testl %ebx,%ebx
 	je .L3
 	je .L3
@@ -100,8 +100,8 @@ ___start:
 	subl $16,%esp
 	subl $16,%esp
 	pushl %eax
 	pushl %eax
 	movl 8(%ebp),%eax
 	movl 8(%ebp),%eax
-	movl %eax,U_SYSTEM_ARGC
-	movl %esi,U_SYSTEM_ARGV
+	movl %eax,operatingsystem_parameter_argc
+	movl %esi,operatingsystem_parameter_argv
 	popl %eax
 	popl %eax
 #	pushl environ
 #	pushl environ
 #	pushl %esi
 #	pushl %esi
@@ -121,7 +121,7 @@ ___start:
 
 
 _haltproc:
 _haltproc:
            mov $1,%eax 
            mov $1,%eax 
-           movzwl U_SYSTEM_EXITCODE,%ebx
+           movzwl operatingsystem_result,%ebx
            pushl %ebx
            pushl %ebx
            call .Lactualsyscall
            call .Lactualsyscall
            addl  $4,%esp
            addl  $4,%esp

+ 1 - 1
rtl/palmos/arm/prt0.as

@@ -34,7 +34,7 @@ asm_exit:
   bl exitthread
   bl exitthread
   
   
 _PISCONSOLE:
 _PISCONSOLE:
-  .long U_SYSTEM_ISCONSOLE
+  .long operatingsystem_isconsole
 
 
 .globl exitthread
 .globl exitthread
 exitthread:
 exitthread:

+ 6 - 6
rtl/qnx/i386/cprt0.as

@@ -12,9 +12,9 @@
 .extern         _init
 .extern         _init
 .extern		atexit
 .extern		atexit
 .extern		errno
 .extern		errno
-.extern		operatingsystem_argc
-.extern		operatingsystem_argv
-.extern		operatingsystem_envp
+.extern		operatingsystem_parameter_argc
+.extern		operatingsystem_parameter_argv
+.extern		operatingsystem_parameter_envp
 
 
 	.text
 	.text
 	.byte	'N', 'I', 'A', 'M'      /* Used by debugger for setting a break point */
 	.byte	'N', 'I', 'A', 'M'      /* Used by debugger for setting a break point */
@@ -43,17 +43,17 @@ _start:
 	// argc
 	// argc
 	movl 0(%esp),%esi
 	movl 0(%esp),%esi
 	movl 0(%esp), %eax
 	movl 0(%esp), %eax
-	movl %eax, operatingsystem_argc
+	movl %eax, operatingsystem_parameter_argc
 	// argv
 	// argv
 	leal 4(%esp),%ecx
 	leal 4(%esp),%ecx
-    	movl  %ecx, operatingsystem_argv
+    	movl  %ecx, operatingsystem_parameter_argv
 	// envp
 	// envp
 	leal (%ecx,%esi,4),%eax
 	leal (%ecx,%esi,4),%eax
     // auxv vector pointer
     // auxv vector pointer
 	leal 4(%eax),%edi
 	leal 4(%eax),%edi
 	// pointer to environment
 	// pointer to environment
 	leal 8(%eax),%edx
 	leal 8(%eax),%edx
-	movl %edx, operatingsystem_envp
+	movl %edx, operatingsystem_parameter_envp
 	cmpl $0,4(%eax)
 	cmpl $0,4(%eax)
 	je .Ldoneargv
 	je .Ldoneargv
 	.align 4
 	.align 4

+ 3 - 3
rtl/qnx/system.pp

@@ -29,9 +29,9 @@ interface
 {$I heaph.inc}
 {$I heaph.inc}
 
 
 var
 var
-  argc : longint; public name 'operatingsystem_argc';
-  argv : ppchar;public name 'operatingsystem_argv';
-  envp : ppchar;public name 'operatingsystem_envp';
+  argc : longint; public name 'operatingsystem_parameter_argc';
+  argv : ppchar;public name 'operatingsystem_parameter_argv';
+  envp : ppchar;public name 'operatingsystem_parameter_envp';
   
   
   
   
 var
 var

+ 2 - 2
rtl/win32/gprt0.as

@@ -4,12 +4,12 @@
      .text
      .text
      .globl _mainCRTStartup
      .globl _mainCRTStartup
 _mainCRTStartup:
 _mainCRTStartup:
-     movb   $1,U_SYSTEM_ISCONSOLE
+     movb   $1,operatingsystem_isconsole
      jmp    _start
      jmp    _start
 
 
      .globl _WinMainCRTStartup
      .globl _WinMainCRTStartup
 _WinMainCRTStartup:
 _WinMainCRTStartup:
-     movb   $0,U_SYSTEM_ISCONSOLE
+     movb   $0,operatingsystem_isconsole
 _start:
 _start:
      subl   $0x8,%esp
      subl   $0x8,%esp
      andl   $0xfffffff0,%esp
      andl   $0xfffffff0,%esp

+ 4 - 3
rtl/win32/system.pp

@@ -93,14 +93,15 @@ type
 
 
 var
 var
 { C compatible arguments }
 { C compatible arguments }
-  argc : longint;
-  argv : ppchar;
+  argc : longint; public name 'operatingsystem_parameter_argc';
+  argv : ppchar; public name 'operatingsystem_parameter_argv';
 { Win32 Info }
 { Win32 Info }
   startupinfo : tstartupinfo;
   startupinfo : tstartupinfo;
   hprevinst,
   hprevinst,
   MainInstance,
   MainInstance,
   cmdshow     : longint;
   cmdshow     : longint;
-  DLLreason,DLLparam:longint;
+  DLLreason : longint; public name 'operatingsystem_dllreason';
+  DLLparam : longint; public name 'operatingsystem_dllparam';
   StartupConsoleMode : DWORD;
   StartupConsoleMode : DWORD;
 
 
 type
 type

+ 2 - 2
rtl/win32/wcygprt0.as

@@ -4,12 +4,12 @@
      .text
      .text
      .globl _mainCRTStartup
      .globl _mainCRTStartup
 _mainCRTStartup:
 _mainCRTStartup:
-     movb   $1,U_SYSTEM_ISCONSOLE
+     movb   $1,operatingsystem_isconsole
      jmp    _start
      jmp    _start
 
 
      .globl _WinMainCRTStartup
      .globl _WinMainCRTStartup
 _WinMainCRTStartup:
 _WinMainCRTStartup:
-     movb   $0,U_SYSTEM_ISCONSOLE
+     movb   $0,operatingsystem_isconsole
 _start:
 _start:
      subl   $0x8,%esp
      subl   $0x8,%esp
      andl   $0xfffffff0,%esp
      andl   $0xfffffff0,%esp

+ 4 - 4
rtl/win32/wdllprt0.as

@@ -3,11 +3,11 @@
      .text
      .text
      .globl _mainCRTStartup
      .globl _mainCRTStartup
 _mainCRTStartup:
 _mainCRTStartup:
-     movb $1,U_SYSTEM_ISCONSOLE
+     movb $1,operatingsystem_isconsole
      jmp .LDLL_Entry
      jmp .LDLL_Entry
      .globl _WinMainCRTStartup
      .globl _WinMainCRTStartup
 _WinMainCRTStartup:
 _WinMainCRTStartup:
-     movb $0,U_SYSTEM_ISCONSOLE
+     movb $0,operatingsystem_isconsole
 .LDLL_Entry:
 .LDLL_Entry:
      pushl    %ebp
      pushl    %ebp
      movl     %esp,%ebp
      movl     %esp,%ebp
@@ -17,9 +17,9 @@ _WinMainCRTStartup:
      movl     8(%ebp),%edi
      movl     8(%ebp),%edi
      movl     %edi,SysInstance
      movl     %edi,SysInstance
      movl     12(%ebp),%edi
      movl     12(%ebp),%edi
-     movl     %edi,U_SYSTEM_DLLREASON
+     movl     %edi,operatingsystem_parameter_dllreason
      movl     16(%ebp),%edi
      movl     16(%ebp),%edi
-     movl     %edi,U_SYSTEM_DLLPARAM
+     movl     %edi,operatingsystem_parameter_dllparam
      movl     %esp,__stkptr
      movl     %esp,__stkptr
      call     _FPC_DLL_Entry
      call     _FPC_DLL_Entry
      popl     %edi
      popl     %edi

+ 2 - 2
rtl/win32/wprt0.as

@@ -4,12 +4,12 @@
      .text
      .text
      .globl _mainCRTStartup
      .globl _mainCRTStartup
 _mainCRTStartup:
 _mainCRTStartup:
-     movb   $1,U_SYSTEM_ISCONSOLE
+     movb   $1,operatingsystem_isconsole
      movl   %esp,__stkptr
      movl   %esp,__stkptr
      call   _FPC_EXE_Entry
      call   _FPC_EXE_Entry
      .globl _WinMainCRTStartup
      .globl _WinMainCRTStartup
 _WinMainCRTStartup:
 _WinMainCRTStartup:
-     movb   $0,U_SYSTEM_ISCONSOLE
+     movb   $0,operatingsystem_isconsole
      movl   %esp,__stkptr
      movl   %esp,__stkptr
      call   _FPC_EXE_Entry
      call   _FPC_EXE_Entry