Re: A85: **RIGEL - the NEW shell**
[Prev][Next][Index][Thread]
Re: A85: **RIGEL - the NEW shell**
Ben Sferrazza wrote:
> > A few things that crossed my mind when I read the doc files (and some
> > disasm :) ):
>
> Even though I don't appreciate that, I guess you were merely curious.
Yup :) And I did check the document in the legal section. There was no
"Your
are not allowed to disassemble this software" which is common in
commerical programs.
> > In lessons.doc you say "All interrupts are removed by Rigel upon exiting
> > Rigel." Does this mean that interrupt won't be resident in TI-OS?
>
> Yes. For one, the use of a TSR under the TI-OS is really unnecessary.
> Possibly one might argue that a screen capturing program would be nice,
> but I believe must link programs allow a screen dump. The reason they
> are removed, is since the TI-85 rearranges memory when variables are
> deleted (etc.) and this may cause the TSRs to move around in memory.
> Therefore the pointers that call the interrupt handlers will become
> incorrect.
Maybe, but it's quite annoying to have to reload a TSR every time
you quit the shell.
> Well, I am not exactly clear what you are saying or asking. Basically,
> if I load a TSR in program A and then exit and run program B. Program A
> will have been moved, as Rigel relocates program B. Therefore the TSR
> loaded from program A will have changed location. Rigel updates the
> pointers to the TSR. Because a TSR may move around in memory, one must
> use "library-based relocation" in the TSR routine, instead of
> conventional "main program fixed-address relocation". Understand?
So Rigel updates the calls in the interrupt list when you execute
another program? Something tells me that there could be some problems
here, but I'm not sure.
> Well I move the SP up (and move whats on the stack to the new location)
> to free up 257-bytes. You may have noticed that it is impossible to
> load the interrupt vector there. Hence, this is why I use $8200-$8300.
> I save what is in this range in the 257-bytes I have know in the stack
> memory, and then load the interrupt vector between $8200-$8300. When I
> exit Rigel I restore everything. Pretty neat, huh?
Yes, that's clever (do you mind if the Usgard team 'borrows' that idea?
:) ).
But do you really have to move the whole stack!? Can't you just
ld hl,$8200
ld de,$FA70
ld bc,257
ldir
I mean, why bother to move the stack. That can't be necessary.
> I gave myself a substantial "buffer" if you will, in case I wish to
> update or fix some bugs. Besides I cannot see much else support one
> would want out of a shell.
You never know...
> > Also, do you update the VAT when relocating (I doubt it)? You know,
> > that's
> > not very good...
>
> Well, I'm not that stupid. Yes I do update the VAT completely. In fact
> I have to, so that I can link libraries.
Ah yes of course. PhatOS didn't update the VAT for some reason which
was a it annoying.
--
Jimmy Mårdell "The nice thing about standards is that
mailto:mja@algonet.se there are so many of them to choose from."
http://www.algonet.se/~mja
IRC: Yarin "Sanity? I'm sure I have it on tape
somewhere!"
References: