Path: utzoo!attcan!uunet!cs.utexas.edu!rice!uw-beaver!ubc-cs!jiang From: jiang@cs.ubc.ca (Jie cheng Jiang) Newsgroups: comp.sys.transputer Subject: Assembly Escape in Logical C Message-ID: <5727@ubc-cs.UUCP> Date: 22 Nov 89 04:20:40 GMT Sender: news@cs.ubc.ca Reply-To: jiang@cs.ubc.ca (Jie C. Jiang) Organization: UBC Department of Computer Science, Vancouver, B.C., Canada Lines: 27 I have implemented a clock synchronization algorithm on the transputer network in Logical C. To set the timer, I need to insert two transputer instructions in my C code: #pragma asm ldl time sttimer #pragma endasm where "time" is the C variable which contains the desired value of the clock. However, the tcx compiler will not compile "time" to its address as in the C code, and thus tasm will not be able to recognize it. The way I get round this problem is really a big hack. I go pp and tcx, and then I edit the .tal file and change "time" in the above instruction to its address manually before I assemble and link to get the executable. I would like to know if there is a more elegant way to do that in Logical C as what can be done by the Occam compiler. Jie -------------------------------------------------------------------------------- Jie C. Jiang (Mr.) | E-mail: Department of Computer Science | (Internet) University of British Columbia | (UUCP) Vancouver, B.C. V6T 1W5 | Tel: Canada | (604)224-5699 --------------------------------------------------------------------------------