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


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

Re: Getting started with ORCA/M and IIGS programming

From Stephen Heumann <stephen.heumann@gmail.com>
Newsgroups comp.sys.apple2.programmer
Subject Re: Getting started with ORCA/M and IIGS programming
Date 2020-01-18 11:01 -0600
Organization A noiseless patient Spider
Message-ID <qvvdkh$5ph$1@dont-email.me> (permalink)
References <87sgkdba8h.fsf@wardenclyffe.jk7.org>

Show all headers | View raw


On 2020-01-18 05:32:30 +0000, James Kruth said:
> Now I noticed that the example program on the
> disk has a few extra calls that aren't mentioned in the manual:
> 
>                 jsl     SystemEnvironmentInit
>                 jsl     SysIOStartup
>                 puts    #'Hello world.',cr=t
>                 jsl     SysIOShutDown
> 
> So now I have a few questions. Is there a reference for these system
> calls? Why are they left out of the manual? How does ORCA/M know how to
> resolve these symbols?

The ORCA/M I/O macros like puts are using I/O library functions 
supplied with ORCA/M, and in order for those to work right in the 
latest version of ORCA/M, you need to make startup/shutdown calls like 
you noted in the example program.

This isn't documented in the manual because the manual was written for 
a slightly older version of ORCA/M where these calls weren't needed.  
There should be an Asm65816.Notes file in the Release.Notes directory 
of a standard ORCA/M installation, which contains updates to the manual 
including the documentation for these functions.

> As if that wasn't enough I started looking for other books on IIGS
> assembly programming and found that the following code prints something
> without all the extra calls:
> 
>                 pea     testmsg|-16
>                 pea     testmsg
>                 ldx     #$200c
>                 jsl     $E10000
> 
>      testmsg    dc      c'Hello world.',h'00'

> I understand that this is making a toolbox call to WriteCString and I've
> also read that it should have probably called TextStartUp ($020c) first.
> What I'm wondering is why the puts ORCA macro is making me do so much
> more work than this relatively simple bit of code.

This approach is directly calling the Text Tools, which is part of the 
Apple IIGS Toolbox rather than part of the ORCA libraries.  If you do 
this you don't need to do the ORCA library initialization, but you 
should appropriately start up and shut down the tools you are using.

-- 
Stephen Heumann

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


Thread

Getting started with ORCA/M and IIGS programming James Kruth <james@kruth.org> - 2020-01-18 00:32 -0500
  Re: Getting started with ORCA/M and IIGS programming spectrumdaddy@nospam.com (Ewen) - 2020-01-18 07:51 +0000
    Re: Getting started with ORCA/M and IIGS programming James Kruth <james@kruth.org> - 2020-01-20 01:41 -0500
  Re: Getting started with ORCA/M and IIGS programming Andy McFadden <thefadden@gmail.com> - 2020-01-18 07:42 -0800
    Re: Getting started with ORCA/M and IIGS programming James Kruth <james@kruth.org> - 2020-01-20 01:44 -0500
  Re: Getting started with ORCA/M and IIGS programming Stephen Heumann <stephen.heumann@gmail.com> - 2020-01-18 11:01 -0600
    Re: Getting started with ORCA/M and IIGS programming James Kruth <james@kruth.org> - 2020-01-20 02:11 -0500
      Re: Getting started with ORCA/M and IIGS programming spectrumdaddy@nospam.com (Ewen) - 2020-01-20 07:45 +0000
      Re: Getting started with ORCA/M and IIGS programming kelvin@pro-kegs.uucp (Kelvin Sherlock) - 2020-01-20 23:21 -0500
        Re: Getting started with ORCA/M and IIGS programming James Kruth <james@kruth.org> - 2020-01-26 00:25 -0500

csiph-web