[comp.sys.amiga] noclick update for 68000/10/20/30 w/source

ISCOVE%UTOROCI.bitnet@ugw.utcs.utoronto.ca (09/01/89)

Here is an update to NoClick3.3 that should work with any
680x0 cpu.  It adjusts the offset of the pointers to the task
stack if the system is running on a 68010/20/30 cpu.  Thanks
to Dwight Blubaugh for identifying the stack frame problem.
The source is included only for the modified section.


begin 644 NoClick3.5
M```#\P`````````!``````````````!1```#Z0```%%(YS\^+'@`!'P!1_D`6
M``$N2?D```#\3J[_B$'N`98B3$ZN_NPFP"!`9O1'Z__\0>X!I%'._^I.KO^"P
M2?D```$N80``L"!K`$:Q_`#X``!C``":0?D```#\<`!R`$/Y```!#DZN_D1F\
M``"")GD```$B0_D```$.3J[^/B)K``J2_``8)!%822!1D,)V`#8(5D,@`W(!`
M3J[_.B)`Y$L@0B+84<O__"I`"&T`!P$%.WP,@!HX>``Z+@$H9P)X!$GY```!K
M+F$N)'-`1I7"V\I.KO^()XU`1DZN_X)A&&<.3J[_B">-0$9.KO^"8.Y,WWS\I
M<`!.=2)<)FD`-B`)3G5T<F%C:V1I<VLN9&5V:6-E`````````````````````
M````````````````````````````````````````````````````3G$```/LN
M````"``````````,````$@```#P```!4````7@```&P```!R````O@``````P
#``/RU
``
end
size 408


*-----------------------------------------------------------------------*
*       Fix each task's exit vector to point to ram version             *
*-----------------------------------------------------------------------*

checkcpu:
        moveq   #0,d4           ;d4 = 0, offset for fixptrs
        move.w  296(a6),d5      ;AttnFlags = 0 if cpu is 68000, set cond.
        beq.s   fixptrs         ;branch if cpu is 68000
        moveq   #4,d4           ;d4 = 4 if not 68000

fixptrs:
        lea     tasks,a4        ;a4 = address of task list
        bsr.s   nextset         ;a3 = tc_SPReg for listed task
        move.l  $46(a3,d4),a2   ;a2 = finalPC, td code that task exits to
        sub.l   d2,a2           ;a2 = offset of code from start (d2) in rom
        add.l   a2,a5           ;a5 = corresponding address in ram copy

        jsr     _LVODisable(a6)
        move.l  a5,$46(a3,d4)   ;replace corrected finalPC pointer
        jsr     _LVOEnable(a6)

fixloop:
        bsr.s   nextset
        beq.s   exit            ;exit on a1 = 0 (address next listed task)
        jsr     _LVODisable(a6)
        move.l  a5,$46(a3,d4)   ;replace corrected finalPC pointer
        jsr     _LVOEnable(a6)
        bra.s   fixloop


Norman Iscove   iscove@utoroci  (bitnet)