[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ciderpress for OS/X?
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.