MP> Hi Paul. Worked out what the problem was. In the man page, it says \o for
MP> an octal number, where o IS the octal number. So, to send the YooHoo char,
MP> I needed to put \0361.
AARGH!!! How did you figure that out, BTW?
MP> Tricky, but it now sends the YooHoo and the entire
MP> Hello string, then it dies. Can you check your logs and see what's going
MP> on? I think that it might be a incorrect CRC, so if you could, could you
You are right, the CRC is incorrect. I suggest you stick to the original
name, "Devil Dialer " rather than changing the name, until
you get it working. Even when it's working, I'd suggest not changing the
name. That can be done by a more flexible script which allows you to change
your name too, at a later date.
BTW, I have a really simple CRC calculator, which I wrote in Telix SALT
script, that only relies on addition and subtraction. I see that runscript
doesn't even have that, so you would have to create add + subtract
subroutines, and make them do loops! In a much later version!
MP> check if my CRC matches? If not, I'll send you the version of the script
MP> that now works (bar the suspected CRC problem) and you can see if you find
MP> anything. BTW, I've compiled alpha tobruk, haven't run it yet but I've
MP> made a few minor changes to the Makefile. It's now called Makefile (a
MP> nuance that will probably escape you once you decompress it on your MS-DOS
MP> or similar system) and I've included a file I found to convert the files to
MP> Unix. But it's all explained there is the readme, apart from the -m386 in
MP> the COPTS of the Makefile. That's to optimize the code for 386 systems.
MP> You may want to warn people if you use my modified Makefile.
Ok, I don't think that I should ship newline-strippers as part of the
Tobruk distribution. Those sorts of utilities should be obtained
separately. E.g. there is a crlffix in OZPD, which is what I use.
Secondly, d2x doesn't have an explicit PD message.
I would expect people to just be going "dmake -B -f
makefile.unx", copying the executable into their bin directory, then
deleting it all, so I don't think there's a need to make the makefile any
different from all the other makefiles. And the "-m386" is
something that people will have to choose for their own systems.
I'm interested if you can get Tobruk + Msged working on your system.
BTW, I presume you realise that once you get runscrpt working, you can use
it to pick up your mail from your hub? You will still need to run ifmail
for ZMH though. BFN. Paul.
// simpcrc - Telix SALT script to calculate the CRC for a block.
// It is called "simple" because it only relies on the
"+" and "-"
// operators, no "*" or "^" or "&" or
"%".
// Written 1994-04-03 by Paul Edwards and released to the public domain
main()
{
str buf[100];
int crc, byte, f, x, y, flag1, flag2, flag3, temp;
// Populate with sample data
setchr(buf,0,'C');
setchr(buf,1,'R');
setchr(buf,2,'C');
// Algorithm proper
crc = 0;
for (x=0; x<3; x=x+1)
{
byte = subchr(buf,x);
byte = byte + byte;
byte = byte + byte;
byte = byte + byte;
byte = byte + byte;
byte = byte + byte;
byte = byte + byte;
byte = byte + byte;
byte = byte + byte;
for (y=0; y<8; y=y+1)
{
flag1 = 0;
flag2 = 0;
flag3 = 0;
if (crc >= 32768)
{
flag1 = 1;
}
if (byte >= 32768)
{
flag2 = 1;
}
if ((flag1 == 0) && (flag2 == 1)) flag3 = 1;
if ((flag1 == 1) && (flag2 == 0)) flag3 = 1;
if (flag3)
{
if (flag1)
{
crc = crc - 32768;
}
crc = crc + crc;
temp = 0;
if (crc >= 32768)
{
temp = temp + 32768;
crc = crc - 32768;
}
if (crc >= 16384)
{
temp = temp + 16384;
crc = crc - 16384;
}
if (crc >= 8192)
{
temp = temp + 8192;
crc = crc - 8192;
}
if (crc >= 4096)
{
crc = crc - 4096;
}
else
{
temp = temp + 4096;
}
if (crc >= 2048)
{
temp = temp + 2048;
crc = crc - 2048;
}
if (crc >= 1024)
{
temp = temp + 1024;
crc = crc - 1024;
}
if (crc >= 512)
{
temp = temp + 512;
crc = crc - 512;
}
if (crc >= 256)
{
temp = temp + 256;
crc = crc - 256;
}
if (crc >= 128)
{
temp = temp + 128;
crc = crc - 128;
}
if (crc >= 64)
{
temp = temp + 64;
crc = crc - 64;
}
if (crc >= 32)
{
crc = crc - 32;
}
else
{
temp = temp + 32;
}
if (crc >= 16)
{
temp = temp + 16;
crc = crc - 16;
}
if (crc >= 8)
{
temp = temp + 8;
crc = crc - 8;
}
if (crc >= 4)
{
temp = temp + 4;
crc = crc - 4;
}
if (crc >= 2)
{
temp = temp + 2;
crc = crc - 2;
}
if (crc >= 1)
{
crc = crc - 1;
}
else
{
temp = temp + 1;
}
crc = temp;
}
else
{
if (flag1)
{
crc = crc - 32768;
}
crc = crc + crc;
}
if (flag2)
{
byte = byte - 32768;
}
byte = byte + byte;
}
}
// Print the result
prints("crc is ");
printn(crc);
return (0);
}
@EOT:
---
* Origin: X (3:711/934.9)
|