Norman, I use this all the time when hoodwinking students and about how intelligent retro computers are.
Firing up Q-emuLator basic setup (if you have a QL then switch it on) type in directly PRINT the_answer_to_life_the_universe_and_everything then press enter Note what appears on the screen then type PRINT CODE("?") - replace the ? with what appears on screen then press enter voilĂ On Mon, Oct 7, 2013 at 8:36 PM, Norman Dunbar <nor...@dunbar-it.co.uk>wrote: > Evening all, > > I'm experimenting for the first exciting episode of the new assembly > language mailing list. It's the first time I've sat down with QPC since I > started my new job! > > I have noticed something a little odd, well, even to be honest. Strangely > enough, the answer is 42 - what is the question? ;-) > > Seriously, when I create a job with any given dataspace, when the job is > activated, A5.L is always set to that data space value plus 42 extra bytes. > > There's nothing in the QDOS docs (from Jochen) nor in Dickens or Pennell. > The closest I have found is in Pennell on page 20 where he says that "... > TRNSP is expanded by D2+D3+$68, memory permitting" when a job is created. > > D2 is the code size, D3 is the requested dataspace size and the extra $68 > is for the standard job header area. > > I'm wondering if the mysterious 42 extra bytes is also accumulated in the > space desired in TRNSP (it has to be D2+D3+$68+42 or stuff would crash!) > but where does it come from? > > I cannot see it as being a rounding to the nearest 16 or 8 or whatever, > because it's always 42. When I say always, I have tried the same job with > the following dataspace sizes, and every one set A5 to be 42 extra: > > 126, 256, 500, 512, 1000, 1024, 2000, 2048, 3000, 3172, 4000, 4096. > > I could, I suppose, look up the source for SMSQ but I don;t, sadly, have > the time at the moment. Not after doing all the above testing! I'm afraid I > shall be lazy and rely on the good will and knowledge of the list for > answers. > > Thanks in advance. > > > Cheers, > Norm. > > -- > Norman Dunbar > Dunbar IT Consultants Ltd > > Registered address: > 27a Lidget Hill > Pudsey > West Yorkshire > United Kingdom > LS28 7LG > > Company Number: 05132767 > ______________________________**_________________ > QL-Users Mailing List > http://www.q-v-d.demon.co.uk/**smsqe.htm<http://www.q-v-d.demon.co.uk/smsqe.htm> > -- Regards Lee Privett _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm