Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #774

Re: Good way to detect the current environment within ProDOS - launcher or BASIC?

From David Schmidt <schmidtd@my-deja.com>
Newsgroups comp.sys.apple2.programmer
Subject Re: Good way to detect the current environment within ProDOS - launcher or BASIC?
Date 2013-07-25 12:57 -0400
Organization A noiseless patient Spider
Message-ID <ksrl16$5bl$1@dont-email.me> (permalink)
References <ksmbtj$lkb$1@dont-email.me> <8f1090c4-a0b5-465a-be6c-c1c8eeaa4712@googlegroups.com>

Show all headers | View raw


On 7/25/2013 11:37 AM, gids.rs@sasktel.net wrote:
> On Tuesday, July 23, 2013 10:50:48 AM UTC-6, schmidtd wrote:
>> [...] How best to tell the difference?
>
> I toyed with this a bit too.  But then I came to the realization that if you are launching a system program from BYE (since that is the only program it will launch), then you will always want to return to the BYE launcher.  Usually, if you launch a system program from basic, the system program disables basic.
>
> That is why the MLI command BYE should pretty much be used in all system programs.
>
> And a program to be launched from basic should be saved as a binary file and end in a JMP $3D0 to return to the applesoft prompt or a RTS to return to the basic program.
>
> So, as you can see, I don't see any benefit to adding the reset vector check to any programs.

Here's the benefit I see.  I have a binary program that users want to 
launch both ways: as a "BRUNnable" entity from BASIC, and as a SYS 
application from the launcher.  (Really, it's the installer for a device 
driver.)  So a BASIC user would find it jarring if they were to be 
bounced out of BASIC and into the laucher, as would happen with a QUIT 
call.  And someone expecting to run this from the launcher, then run a 
different interpreter would find it inconvenient to have to bounce back 
out of an unexpected BASIC invocation, as would happen with $3D0 or RTS. 
  (Well, RTS from a SYS application would crash... but that's another 
story.)

So, in this case - the dual personality is warranted.  If my app really 
were an interpreter expecting to replace BASIC, I would see the logic in 
the "always QUIT" approach.  But it's not.  It's really a helper that 
needs to have an affinity to either environment.

Back to comp.sys.apple2.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Good way to detect the current environment within ProDOS - launcher or BASIC? David Schmidt <schmidtd@my-deja.com> - 2013-07-23 12:50 -0400
  Re: Good way to detect the current environment within ProDOS - launcher or BASIC? BLuRry <brendan.robert@gmail.com> - 2013-07-23 12:10 -0700
    Re: Good way to detect the current environment within ProDOS - launcher or BASIC? David Schmidt <schmidtd@my-deja.com> - 2013-07-23 16:37 -0400
      Re: Good way to detect the current environment within ProDOS - launcher or BASIC? BLuRry <brendan.robert@gmail.com> - 2013-07-23 17:29 -0700
        Re: Good way to detect the current environment within ProDOS - launcher or BASIC? Antoine Vignau <antoine.vignau@laposte.net> - 2013-07-24 11:16 -0700
          Re: Good way to detect the current environment within ProDOS - launcher or BASIC? BLuRry <brendan.robert@gmail.com> - 2013-07-24 12:17 -0700
  Re: Good way to detect the current environment within ProDOS - launcher or BASIC? gids.rs@sasktel.net - 2013-07-25 08:37 -0700
    Re: Good way to detect the current environment within ProDOS - launcher or BASIC? David Schmidt <schmidtd@my-deja.com> - 2013-07-25 12:57 -0400
      Re: Good way to detect the current environment within ProDOS - launcher or BASIC? gids.rs@sasktel.net - 2013-07-25 15:58 -0700
  Re: Good way to detect the current environment within ProDOS - launcher   or BASIC? ol.sc@web.de (Oliver Schmidt) - 2013-08-03 10:12 +0000

csiph-web