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


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

Re: test for presence of BASIC.SYSTEM

From David Schmidt <schmidtd@my-deja.com>
Newsgroups comp.sys.apple2.programmer
Subject Re: test for presence of BASIC.SYSTEM
Date 2015-04-20 07:34 -0400
Organization A noiseless patient Spider
Message-ID <mh2o79$or0$1@dont-email.me> (permalink)
References <10257333-0545-4358-9e51-770ba945208b@googlegroups.com> <mh1bnu$odh$1@dont-email.me> <0913dae4-d9eb-4663-b6eb-f4f72b1f6118@googlegroups.com>

Show all headers | View raw


On 4/19/2015 11:00 PM, ivanx%ivanx.com@gtempaccount.com wrote:
> On Sunday, April 19, 2015 at 6:55:53 PM UTC-4, schmidtd wrote:
>> On 4/19/2015 1:18 PM, Ivan X wrote:
>>> Assuming ProDOS 8 itself is booted, Is there a canonical way of determining from machine language whether BASIC.SYSTEM is running or not? I figured one way would be by looking at $0036/37, but I was wondering if there's something less ad-hoc.
>>
>> When I asked the same question not so long ago, this is the solution I
>> ended up with:
>>
>> 	lda $3f2	; Where does our reset vector point?
>> 	bne @Quit	; Not BASIC
>> 	lda $3f3
>> 	cmp #$be
>> 	bne @Quit	; Not BASIC
>> 	rts		; Yay - BASIC!
>> @Quit:	; Run the (in my case) ProDOS Quit MLI
>
> Gee, Dave, why did you expend your effort on such a thing?

This is from my virtual drive device driver installer code.  In my case, 
I needed to be able to return "from whence I came..." meaning if I was 
invoked as a SYS program from BASIC, I needed to return there (RTS).  If 
I was invoked from, say, a program launcher, I needed to call the Quit MLI.

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


Thread

test for presence of BASIC.SYSTEM ivanx%ivanx.com@gtempaccount.com - 2015-04-19 10:18 -0700
  Re: test for presence of BASIC.SYSTEM gids.rs@sasktel.net - 2015-04-19 11:53 -0700
    Re: test for presence of BASIC.SYSTEM gids.rs@sasktel.net - 2015-04-19 12:10 -0700
      Re: test for presence of BASIC.SYSTEM ivanx%ivanx.com@gtempaccount.com - 2015-04-19 15:12 -0700
        Re: test for presence of BASIC.SYSTEM gids.rs@sasktel.net - 2015-04-19 21:46 -0700
  Re: test for presence of BASIC.SYSTEM David Schmidt <schmidtd@my-deja.com> - 2015-04-19 18:55 -0400
    Re: test for presence of BASIC.SYSTEM ivanx%ivanx.com@gtempaccount.com - 2015-04-19 20:00 -0700
      Re: test for presence of BASIC.SYSTEM David Schmidt <schmidtd@my-deja.com> - 2015-04-20 07:34 -0400
  Re: test for presence of BASIC.SYSTEM ol.sc@web.de (Oliver Schmidt) - 2015-04-24 15:41 +0000

csiph-web