[comp.sys.atari.st] Alcyon Return Codess

woodside@ttidca.TTI.COM (George Woodside) (01/22/88)

A few days ago, Allan Pratt of Atari offered to post the fixes for return codes 
from the Alcyon C compiler. I haven't seen them go by, so I looked them up
from my old notes. I should note here that I made this change successfully
when it was posted, but have long since switched to Mark Williams C.

This is from Robert Royar, March 12, 1987:

===========================================================================

About patches to the dev pack compiler/assembler/linker/relmod to return
proper codes on exit. I poked around in the code and found the following
(v 4.14 only). You should be reasonably familiar with SID and realize that
some offsets are ballpark figures. So you will need to use the 'l' option
to show you the instructions before you change them. Around 0xda from the
beginning of each of the files (that offset is accurate if you load SID
without a file and use the 'r' command), is a command sequence something
like (it's been a while since I did the patch)

move.w    #0,d0             ; return code
trap      #2                ; old cp/m trap vect and new gsx
unlnk     a6                ; Alcyon built-in patch space *8^)
rts                         ; useless return

the hex code is 
30 3c 00 00 4e 42 4e 5e 4e 75

I changed this to

move.w    #$4c,-(a7)
trap      #1
rts

hex code
4a 9f 3f 3c 00 4c 4e 41 4e 75

The offsets are the same for cp68, c068, c168, and as68. The offsets for
link68 and relmod are a little off from the 0xda mark, but easy to find
using the l option in SID.

Hope this helps,

Robert Royar

===========================================================================

My note attached to that says that the patch actually reads

tst.l     (a7)+
move.w    #$4c,-(a7)
trap      #1
rts

when you enter it as listed above, and that it worked as Mr. Royar stated.


Another patch note on Alcyon 4.14, from Jeff Reid, dated Dec 30, 1986:

===========================================================================

To fix the problem with static data and bss sections in a C program, patch
C068.PRG: using SID.TTP, read in C068.PRG using "R" command and at offsets
DEDD and DF25 from start base (use "H" command to generate absolute address)
use "S" command to change "60" to "7E" at both locations (start+DEDD,DF25).
This patch eliminates assembly time error when using static data or static
variables in a C program. (Patch changes ` to a ~, used to comment original
label).

===========================================================================

I never encountered this problem, so I never installed this patch.

-- 
*George R. Woodside - Citicorp/TTI - Santa Monica, CA 
*Path: ..!{trwrb|philabs|csun|psivax}!ttidca!woodside