06 March 2021, 18:21 | #101 | ||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,365
|
Quote:
Quote:
MacOS 68k uses "xxx" above to give function number (and sometimes a few extra infos) for all its OS calls. Atari ST also uses a few of these values for some graphical routines. |
||
07 March 2021, 05:49 | #102 |
Registered User
Join Date: Mar 2021
Location: Ligao, Free World North
Posts: 228
|
There has been a suggestion from elsewhere that I am basically trying to implement UEFI on Amiga/Atari.
What do you think of the feasibility of implementing some UEFI-inspired wrapper instead of calling the exact Atari BIOS functions? Note that I only want to use C90 data types, so I don't think I can use the exact UEFI functions. And note that on the Amiga, the UEFI-inspired functions would simply call AmigaOS functions, no need for the actual Atari BIOS to be involved at all. But when running on the Atari, the UEFI-inspired functions would indeed call the actual Atari BIOS trap #13, after appropriate manipulations. |
07 March 2021, 11:59 | #103 | |||
Registered User
Join Date: Mar 2021
Location: Ligao, Free World North
Posts: 228
|
Quote:
Quote:
Quote:
BTW, sorry everyone for the delay in responding, I was reevaluating PDOS most of the night. :-) |
|||
07 March 2021, 12:20 | #104 | |
Registered User
Join Date: Mar 2021
Location: Ligao, Free World North
Posts: 228
|
Quote:
With the C language now on mainframes at zero cost, a large chunk of the task I set myself has been done. But just recently I realized that PDOS would work on other platforms besides 80386 too, so I altered my goal to spread both PDPCLIB and PDOS to other environments, to see what happened. And AmigaOS radically changed my thinking. An OS providing a list of functions to directly call. I want to redesign PDOS to do the same thing, except I'm going to make it actual C functions that can be directly called, not requiring assembler. I don't care about system vs user. I only care about getting C compiles to go through. |
|
07 March 2021, 13:25 | #105 | ||
Registered User
Join Date: Mar 2021
Location: Ligao, Free World North
Posts: 228
|
Quote:
Quote:
|
||
07 March 2021, 13:31 | #106 | |||
Registered User
Join Date: Mar 2021
Location: Ligao, Free World North
Posts: 228
|
Quote:
Quote:
Quote:
|
|||
07 March 2021, 16:05 | #107 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,553
|
Quote:
The idea of EFI is a bad one. It is driven by Intel/Microsoft and as such it is not focussed on being portable, but to restrict the computer owner's control of his own hardware and make it more difficult to do what you want with it. And it doesn't even solve all the problems of a BIOS. The best firmware/BIOS solution was OpenFirmware. A truly open, portable and IEEE standardized one. |
|
08 March 2021, 08:33 | #108 | ||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,365
|
Quote:
Yet i doubt C is the right language for doing that. It has its issues and while they can be worked around, it's not good if the goal is to be universal. I'm working on something like this, but at a different level. I created my own asm language and API set, to build a VM. Every program using it then don't have to be altered to work on a new platform, only the VM has. I can't see another good way of doing it. Quote:
What would that different SysBase contain then ? |
||
08 March 2021, 08:47 | #109 |
Registered User
Join Date: Mar 2021
Location: Ligao, Free World North
Posts: 228
|
|
08 March 2021, 11:09 | #110 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,365
|
But AmigaOS SysBase is actually ExecBase, the library structure of exec.library. And it contains quite a lot of information that PDPCLIB has no need for.
|
08 March 2021, 11:14 | #111 |
Registered User
Join Date: Mar 2021
Location: Ligao, Free World North
Posts: 228
|
|
08 March 2021, 11:26 | #112 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,365
|
|
08 March 2021, 11:39 | #113 | |
Registered User
Join Date: Mar 2021
Location: Ligao, Free World North
Posts: 228
|
Quote:
Anyway, I've just written the startup assembler code for PDPCLIB for AmigaOS if anyone wants to comment on what I have so far. *********************************************************************** * * * This program written by Paul Edwards. * * Released to the public domain * * * *********************************************************************** *********************************************************************** * * * amistart - startup code for AmigaOS. * * * * This uses the Motorola syntax * * * * It saves the standard AmigaOS registers containing the command * * buffer (a0) and command length (d0) as well as the AmigaPDOS * * extension register (only visible if running AmigaPDOS) a6, * * containing an alternative SysBase to use (only if d0 is greater * * than or equal to 2 GiB, and in which case, 2 GiB should be * * subtracted from d0 before use). * * * * All this manipulation is left for the C startup code to handle. * * * *********************************************************************** * section "CODE",code xref ___d0 xref ___a0 xref ___a6 xref ___start xdef ___amistart * ___amistart: move.l d0,___d0 move.l a0,___a0 move.l a6,___a6 jsr ___start rts |
|
08 March 2021, 12:39 | #114 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,553
|
When __start() is a C function I would pass __d0, __a0, __a6 as arguments on the stack and don't waste static memory:
Code:
movem.l d0/a0/a6,-(sp) jsr ___start Code:
int __start(int cmdlen,char *cmdptr,void *pdosbase) |
08 March 2021, 12:52 | #115 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,365
|
|
08 March 2021, 13:12 | #116 |
Registered User
Join Date: Mar 2021
Location: Ligao, Free World North
Posts: 228
|
Not sure if this is a show-stopper.
I have made minimal changes to get everything to compile and assemble, but I'm getting a stack of linker errors, e.g. Error 21: stdio.o (CODE+0x41b0): Reference to undefined symbol __ieeecmpd Any idea what those are? Thanks. Paul. |
08 March 2021, 13:21 | #117 | |
Registered User
Join Date: Mar 2021
Location: Ligao, Free World North
Posts: 228
|
Quote:
I can actually implement AmigaPDOS on an artificial 68000 machine, via emulator. One day the machine may actually become real. I don't know what is required to build a real 68000 machine. It will need to have a BIOS of the type discussed previously, which is capable of driving a hard disk. The BIOS will also need another feature to say whether I am the main operating system so that I can know that I can set memory address 4 to my SysBase. |
|
08 March 2021, 13:37 | #118 |
Registered User
Join Date: Mar 2021
Location: Ligao, Free World North
Posts: 228
|
Thanks! I adopted a slight variation of that.
|
08 March 2021, 13:51 | #119 | |||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,365
|
Quote:
Personnally i would instead avoid using floats, but that's just me. Quote:
As an example, Read() isn't as minimalistic as it looks. It's in dos.library, not in exec.library. So to access it, you not only have to provide the ExecBase structure, but also DosBase. Furthermore, even if some Read() is provided, the code may or may not work as it can not only read from files but also other peripherals as well (like the input from a console window). Besides, to Read() something you need some Open() as well and the path provided here of course uses the Amiga way of doing, not pc-dos/windows nor unix. Quote:
|
|||
08 March 2021, 14:59 | #120 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,553
|
Quote:
AmigaOS has soft-float support in the mathieee*.library, which most Amiga compilers would use. With vbcc you can alternatively link with the standalone soft-float linker library, msoft.lib (-lmsoft), which implements John R. Hauser's free IEC/IEEE Floating-point Artithmetic Package. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|