Browse Source

human68k: refactored some type naming used in the startup code

Karoly Balogh 1 year ago
parent
commit
932849c1bf
2 changed files with 21 additions and 17 deletions
  1. 17 3
      rtl/human68k/h68kdos.inc
  2. 4 14
      rtl/human68k/si_prc.pp

+ 17 - 3
rtl/human68k/h68kdos.inc

@@ -51,19 +51,20 @@ const
 
 
 type
-  h68kdos_comline = record
+  Th68kdos_comline = record
     case boolean of
       true: ( len: byte; buffer: array[0..255] of char; );
       false: ( pstr: shortstring; )
   end;
+  Ph68kdos_comline = ^Th68kdos_comline;
 
 type
-  h68kdos_psp = record
+  Th68kdos_psp = record
     env: pchar;
     _exit: pointer;
     ctrlc: pointer;
     errexit: pointer;
-    comline: ^h68kdos_comline;
+    comline: Ph68kdos_comline;
     handle: array[0..11] of byte;
     bss: pointer;
     heap: pointer;
@@ -84,6 +85,19 @@ type
     exe_name: array[0..23] of char;
     reserve_2: array[0..35] of byte;
   end;
+  Ph68kdos_psp = ^Th68kdos_psp;
+
+// register contents on startup, a0-a5 respectively
+type
+  Th68kdos_startup = record
+    mcb: pbyte;
+    bss_end: pbyte;
+    comm: pbyte;
+    environ: pbyte;
+    entry: pbyte;
+    intr: pbyte;
+  end;
+  Ph68kdos_startup = ^Th68kdos_startup;
 
 // as used by seek
 const

+ 4 - 14
rtl/human68k/si_prc.pp

@@ -25,22 +25,12 @@ var
   stacktop: pointer; public name '__stktop';
   stklen: longint; external name '__stklen';
 
-type
-  Th68k_startup = record
-    mcb: pbyte;
-    bss_end: pbyte;
-    comm: pbyte;
-    environ: pbyte;
-    entry: pbyte;
-    intr: pbyte;
-  end;
-  Ph68k_startup = ^Th68k_startup;
-
 var
-  h68k_startup: Th68k_startup; public name '_h68k_startup';
+  h68k_startup: Th68kdos_startup; public name '_h68k_startup';
+  h68k_psp: Ph68kdos_psp; public name '_h68k_psp';
 
 procedure PascalMain; external name 'PASCALMAIN';
-procedure PascalStart(const startparams: Ph68k_startup); noreturn; forward;
+procedure PascalStart(const startparams: Ph68kdos_startup); noreturn; forward;
 
 { this function must be the first in this unit which contains code }
 procedure _FPC_proc_start; assembler; nostackframe; noreturn; public name '_start';
@@ -50,7 +40,7 @@ asm
   jbsr PascalStart
 end;
 
-procedure PascalStart(const startparams: Ph68k_startup); noreturn;
+procedure PascalStart(const startparams: Ph68kdos_startup); noreturn;
 var
   bss_start: pbyte;
 begin