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


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

Re: Dual 65C816/65C02 programs

From Egan Ford <datajerk@gmail.com>
Newsgroups comp.sys.apple2.programmer
Subject Re: Dual 65C816/65C02 programs
Date 2013-07-20 11:52 -0600
Organization XMission http://xmission.com/
Message-ID <kseioh$cs2$1@news.xmission.com> (permalink)
References (2 earlier) <dog_cow-1373924063@macgui.com> <572174e5-72a2-4750-8512-a8aa6e6099c8@googlegroups.com> <df594e1e-9fff-4500-a727-bb19c4d89758@googlegroups.com> <ksbr2i$82p$1@news.xmission.com> <205ff4d1-03fa-462b-8b43-4345473ff2c8@googlegroups.com>

Show all headers | View raw


On 7/19/13 2:21 PM, Dagen Brock wrote:
> What?  They just read the location at $FBB3.  You can do it with 16-bit or 8-bit code.  You can't write a System 16 executable and launch it on an 8-bit Apple II.  You'd have to write your program as a ProDOS 8 system executable (or plain binary that you bload/brun.  Any time you launch a ProDOS 8 program from GSOS it will load ProDOS 8 first, putting you back in 8-bit emulation mode once control is transferred to your program.
>
> Your statements don't make a lot of sense.  It's a hard documented fact of these operating systems.  ProDOS 8 programs start in 8-bit (emulation mode on IIgs) and ProDOS 16/GSOS programs start in 16-bit.

My statements make perfect sense.  Read them again.

My first statement, "So far all the aforementioned examples assume the 
65816 is in emulation mode (6502 mode) and therefore it is safe to write 
6502 code to detect and launch 65816 code."

This aligns with your "just read location at $FBB3" statement.

My 2nd statement was a "what if" scenario, "But what about the other way 
around?  What if the binary were launched from a 16-bit native mode 
shell or GUI?"

IOW, the code would have to assume 16-bit mode to start with making it a 
challenge to run it on an 8-bit system to autodetect 8 or 16 bits.

The OP initially asked, "Is it possible to have one program binary that 
will run under ProDOS 8 on the IIe and ProDOS 16 on the IIgs?"

And I was musing about how one would write a single binary that could 
detect 8 or 16 bit on load from either an 8 or 16 bit system.

It is clearly obvious that you cannot run 16-bit code on an 8-bit 
machine, but given that some of the opcodes are the same, it may be 
possible to have code that will run on both 8-bit and 16-bit machines in 
8 or 16 bit mode for the purpose of detection and redirection.

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


Thread

Dual 65C816/65C02 programs D Finnigan <dog_cow@macgui.com> - 2013-07-14 02:35 +0000
  Re: Dual 65C816/65C02 programs Egan Ford <datajerk@gmail.com> - 2013-07-14 21:35 -0500
    Re: Dual 65C816/65C02 programs D Finnigan <dog_cow@macgui.com> - 2013-07-15 21:34 +0000
      Re: Dual 65C816/65C02 programs Charlie <charlieDOTd@verEYEzon.net> - 2013-07-15 20:47 -0400
      Re: Dual 65C816/65C02 programs gbody4@bigpond.com - 2013-07-15 18:52 -0700
        Re: Dual 65C816/65C02 programs Dagen Brock <DagenBrock@gmail.com> - 2013-07-19 07:49 -0700
          Re: Dual 65C816/65C02 programs Egan Ford <datajerk@gmail.com> - 2013-07-19 10:55 -0600
            Re: Dual 65C816/65C02 programs Dagen Brock <DagenBrock@gmail.com> - 2013-07-19 13:21 -0700
              Re: Dual 65C816/65C02 programs Egan Ford <datajerk@gmail.com> - 2013-07-20 11:52 -0600
                Re: Dual 65C816/65C02 programs D Finnigan <dog_cow@macgui.com> - 2013-07-20 22:47 +0000
                Re: Dual 65C816/65C02 programs Egan Ford <datajerk@gmail.com> - 2013-07-21 11:19 -0600
                Re: Dual 65C816/65C02 programs D Finnigan <dog_cow@macgui.com> - 2013-07-21 17:35 +0000
                Re: Dual 65C816/65C02 programs gids.rs@sasktel.net - 2013-07-25 08:25 -0700
                Re: Dual 65C816/65C02 programs Egan Ford <datajerk@gmail.com> - 2013-07-27 15:04 -0600

csiph-web