A Cautionary Tale

Anything QL Software or Programming Related.
Post Reply
User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

A Cautionary Tale

Post by pjw »

I had just finished writing a small SBASIC function in
assembler that I needed for a project Im working on and was
quickly going to assemble it to test, when I hit a snag:
The thing wouldnt assemble. Nothing strange in that, these
things happen. However, the error message QMake threw up was
unusual (at least for me): Buffer full. Where was the
message coming from: QMake or Qmac? What could it mean?

Looking at QMake's log file it showed the first linker line,
correctly, followed by a chunk of binary, which although not
helpful, was indicative. So I tried all the usual things:
Assembled what I assumed to be the offending file on its
own: A zero length file was output, and a zero length
listing. And no error message. Hmm.

I then did a binary chop on the file (moving the END
directive further up in the code) to see if I could locate
the problem. But even at reaching the leading label the
error would not desist! My sunny morning was starting to
cloud over; my flow was drying up. I tried a few more
things: Checked for hidden control characters in the file
(QD presents these weird bugs sometimes). I swapped the code
out with another file I had recently assembled, just faking
the labels. No joy. I thought perhaps QPC2 or SMSQ/E had
somehow been corrupted and booted into different versions.
By this time, since trying to be logical hadnt answered, I
was attempted all kinds of things in shear desperation. My
will to live was slowly ebbing away!

After nearly an hour of this, I thought Id tried everything;
only one binary option remained. So I cracked open a bottle
of Chevas 25, especially reserved for such a sombre
occasion, and took out my Heckler & Koch P30 (so as not to
make too much of a mess) and put them to one side. On the
other, I dug out Jmon, my last hope.

Actually, one thing I hadnt tried, as it seemed beyond
reason to assume there could be anything wrong with SMSQ/E's
keys, that I use all the time: A binary chop on the INCLUDE
files (Id already re-ordered them, relocated them, and re-
checked them).

Whoah! That did the trick! It appears that a few days ago I
had loaded and later re-saved the dev8_keys_con key file,
without the compression option (to convert spaces to tabs.
This option is such a nuisance when all you want is to
quickly view a file in Qpac). It seems the size of this file
had now exceeded some limit in the assembler, although Qmac
either didnt tell me about it, or it whispered it so fast I
missed it every time - or perhaps I was just not properly
listening, because it turns out it had told QMake about it
all along! Buffer full!

Since Id already opened the bottle, I thought I might as
well top myself so as not to waste it. But then I thought I
should rather save it for later and write this cautionary
tale and possibly save some lives. That made me feel better,
and so I shall procede with my little project instead ;o)


Per
dont be happy. worry
- ?
User avatar
vanpeebles
Commissario Pebbli
Posts: 2816
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: A Cautionary Tale

Post by vanpeebles »

I hope the H&k was for shooting for QL! If I was telling that story, I don't think a red spud gun and a bottle of panda pop would have the same dramatic effect :lol:


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: A Cautionary Tale

Post by NormanDunbar »

Would that have been Chivas Regal by any chance? It's made 12 miles from where I lived most of my life, a place called Keith, I kid you not.

That's where Chivas is distilled, I lived in Elgin.


Cheers,
Notrm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
XorA
Site Admin
Posts: 1358
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: A Cautionary Tale

Post by XorA »

NormanDunbar wrote:Would that have been Chivas Regal by any chance? It's made 12 miles from where I lived most of my life, a place called Keith, I kid you not.
I have been there, caught the train from Dufftown (which I can never think of without the Duffman theme from Simpsons playing in head) :-D


Post Reply