Re: A89: kernel/no stub
[Prev][Next][Index][Thread]
Re: A89: kernel/no stub
Hi!
> I'm reading the exact quote you refered to right now, in the
> newest version of the lib. And I'm gonna have to ask if this
> was an error on Zeljko's part.
I saw using EV_hook for SHIFT+ON in TEOS source: in teos.asm
new EV_hook is installed, and in prog.asm hook handler is
implemented, see label newEV_hook.
> Doors was using shift+on loooong before the event-driven
> interface calls were ever even known - as in _years_ before
> (hard to imagine the 89 has been out over 2 years now). It
> should be a simple hook into int 6, which is called whenever
> the on button is pressed - write an int 6 wrapper that does
> whatever if desired key is down when the code is run.
No. As I said, I saw EV_hook in TEOS, and I was shocked that
DoorsOS also uses EV_hook. Note that events are not invented
by me and discovered by me. What is unusual in the fact that
someone knew about it before I documented it.
> Furthermore, I'm not sure that EV_hook is even capable of
> handling such an instance.
It seems that it is: see newEV_hook in TEOS source. If anybody
is curious, here is a paste from TEOS source:
newEV_hook: movem.l d0-d7/a0-a6,-(a7)
cmp.w #$710,(a2) ;keypress?
beq.s toucheON
lea posSHIFT(pc),a0
move.b CALC(pc),d0
addq.b #1,d0
btst d0,7(a2)
beq.s NONshift
clr.b (a0)
bra.s fin
NONshift: st.b (a0)
bra.s fin
toucheON: cmp.w #267,10(a2) ;ON key?
bne.s fin
move.b posSHIFT(pc),d0
bne.s fin
lea shell(pc),a5
bsr find
tst.l d0
beq.s notfound
jsr (a0)
bra.s fin
notfound: pea shellnotfound(pc)
ROM_CALL ST_showHelp
addq.l #4,a7
fin: movem.l (a7)+,d0-d7/a0-a6
rts
shell dc.b "doors",0,0,0
shellnotfound dc.b "Shell not found",0
posSHIFT dc.b 0
> While I'm not too familiar with the TIGCC lib implementation
> of the event handlers,
It is just call of TIOS event handling routines,
> I have read some extensive documents on using them the way TI
> intended, and the applications do not appear to receive any
> message when an error is triggered - and the on button
> triggers error: break, not CM_KEYPRESS - correct?
No, ON key triggers CM_KEYPRESS, as you can see from TEOS code
fragment. If TI gave the wrong informations, this will not be
the first time from them to give incorrect informations.
> Although, now that I think about it, doors may have changed
> shift-on managment with the recent rewrite, it would certainly
> be a waste not to use int 6 instead, and TEOS certainly prefers
> the int 6 method.
Just as you can see, TEOS certainly does not prefer the int 6
method (at least, not in release 1.02 which I analysed).
Cheers,
Zeljko Juric