[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ciderpress for OS/X?



datajerk wrote:
On Aug 14, 10:51 pm, "John B. Matthews" <nos...@nospam.invalid> wrote:
In article
<a6e69e75-0399-4b14-aaa5-604fa9b83...@g10g2000yqh.googlegroups.com>,

 datajerk <dataj...@gmail.com> wrote:

[...]

Loader.system.  Thanks for the tip.
This is my favorite part:

        ; That's what it's all about !
        lda     #<MLI
        ldx     #>MLI
        sta     HIMEM
        stx     HIMEM + 1

If you change:
time_t starttime = time(NULL);
time_t endtime = time(NULL);
col80();
to:
col80();
time_t starttime = time(NULL);
time_t endtime = time(NULL);
Then you'll see my problem.  Once col80 is called, the time card
cannot be read.  -1 is returned.  basic.system and
loader.system--same results.
I compared assembler listings, generated with the -l option:

<http://www.cc65.org/doc/cl65-2.html>

In my example, pusheax (exported from lpush.s) saves the initialized
time before calling col80. In your code, decsp8 allocates the two stack
variables, then col80 is called before the times are initialized.
col80() probably needs to preserve some registers, but I don't know the
runtime well enough to suggest how.

An expedient approach might be to check the machine ID and initialize
the 80-column firmware in the loader, before the runtime gets started.
You wouldn't need to update the Basic global vectors; and you can exit
your code via $3D0, which is set up to invoke the ProDOS bye routine.

Alternatively, you could initialize the firmware in a Basic STARTUP
program that BRUNs the compiled object. Of course, that's what the
loader was designed to avoid. :-)

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

Thanks for all your help, but for now I am going to keep it simple.
Type PR#3, then BRUN.

Or, even simpler:

100 PRINT CHR$(4)"PR#3"
110 PRINT CHR$(4)"BRUN yourbinprogram"

and save it as STARTUP.

Then yourbinprogram will be run whenever the disk is booted or
"-startup" is typed.

If you don't want the automatic "startup" behavior, save the BASIC
program above as "yourprogram" and run it with "-yourprogram".

-michael

NadaNet 3.0 for Apple II parallel computing!
Home page:  http://home.comcast.net/~mjmahon/

"The wastebasket is our most important design
tool--and it's seriously underused."