System identification at runtime

Polluks · 1517

Polluks

  • Newbie
  • *
    • Posts: 5
    • Karma: +0/-0
    • Bilskaja International
on: October 25, 2018, 04:17:50 PM
Hi there!

Right now I'm using FindResident("processor.resource") to identify AROS,
how about something like FindResident("AROS")? See MorphOS.

Greetings,
Stefan



Ball000

  • Newbie
  • *
    • Posts: 13
    • Karma: +0/-0
Reply #1 on: November 09, 2018, 04:58:06 AM
Hi Stefan,

As I understand it, that's the aim of the ArosInquireA() function. System/AboutAROS uses it.



BSzili

  • Newbie
  • *
    • Posts: 44
    • Karma: +80/-0
    • My AROS, MorphOS and AmigaOS4 ports
Reply #2 on: November 09, 2018, 05:46:38 AM
I think he wants to do this in a 68k program, and in that case something like this will probably do it:
Code: [Select]
struct Library *arosBase = OpenLibrary("aros.library", 0);
if (arosBase)
{
  // running on AROS
  CloseLibrary(arosBase);
  arosBase = NULL;
}

This is just like television, only you can see much further.