elev35@castle.ed.ac.uk (R C Smith) (10/03/90)
I'm trying to compile sozobon C on our mainframe so that I can have lots of lovely disk space to use. It compiles but says it doesn't know the following functions. Could some kind person send me source code for these functions or at least tell me what they do. Thanks Robin elev35@uk.ac.ed.castle
elev35@castle.ed.ac.uk (R C Smith) (10/03/90)
Whoops forgot to say which functions I need, can I have code for _lclr _lcpy _strchr Robin elev35@uk.ac.ed.castle
steve@thelake.mn.org (Steve Yelvington) (10/04/90)
[elev35@castle.ed.ac.uk (R C Smith) writes ... ] > I'm trying to compile sozobon C on our mainframe so that I can have lots > of lovely disk space to use. It compiles but says it doesn't know the > following functions. Could some kind person send me source code for > these functions or at least tell me what they do. > ... > Whoops forgot to say which functions I need, can I have code for > > _lclr > _lcpy A little work with grep reveals that these two are defined in the "subs.s" module of hcc. I have to move my lips when I read assembler, but it looks to me like lclr works like bzero and lcpy works like bcpy. Or perhaps memcpy, which has its args reversed ... look carefully. .globl _lclr .text _lclr: link a6,#0 move.l 8(a6),a0 move 12(a6),d0 bra L5 L4: clr.l (a0)+ L5: dbf d0,L4 unlk a6 rts .globl _lcpy .text _lcpy: link a6,#0 move.l 8(a6),a0 move.l 12(a6),a1 move 16(a6),d0 bra L8 L7: move.l (a1)+,(a0)+ L8: dbf d0,L7 unlk a6 rts > _strchr This should be in your native compiler's library. If not, the dLibs module strchr.s defines it in Motorola assembler and includes a C equivalent: * #include <stdio.h> * * char *strchr(string, symbol) * register char *string; * register char symbol; * /* * * Return a pointer to the first occurance of <symbol> in <string>. * * NULL is returned if <symbol> is not found. * */ * { * do * { * if(*string == symbol) * return(string); * } * while(*string++); * return(NULL); * } .text .globl _strchr _strchr: move.l 4(a7),a0 move.w 8(a7),d0 strchr1: cmp.b (a0),d0 bne strchr2 move.l a0,d0 rts strchr2: tst.b (a0)+ bne strchr1 clr.l d0 rts -- Steve Yelvington up at the lake in Minnesota Internet: steve@thelake.mn.org UUCP: {plains,rutgers,apple,cray}!umn-cs!thelake!steve
neil@cs.hw.ac.uk (Neil Forsyth) (01/08/91)
Sozobon Questions: Is Sozobon still under development? Has it been ported to Minix, PC or the Amiga yet? Just what is it's current status? Are the Sozobon lads still working on it. Any chance of the ANSI standard becoming a reality? Is there a new version of Dales dLibs beyond 1.2? Questions, questions! The source for 'jas' does not produce a working program (it produces object files with only a header). As a result I can't fix the bugs. +----------------------------------------------------------------------------+ ! DISCLAIMER:Unless otherwise stated, the above comments are entirely my own ! ! ! ! Neil Forsyth JANET: neil@uk.ac.hw.cs ! ! Dept. of Computer Science ARPA: neil@cs.hw.ac.uk ! ! Heriot-Watt University UUCP: ..!ukc!cs.hw.ac.uk!neil ! ! Edinburgh, Scotland, UK "That was never 5 minutes!" ! +----------------------------------------------------------------------------+