HOME_DIR in Assembly

Anything QL Software or Programming Related.
Post Reply
User avatar
tofro
Font of All Knowledge
Posts: 2686
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

HOME_DIR in Assembly

Post by tofro »

(No question here, just a rant ;) )

Just spent 2 of the precious Sunday morning hours on debugging a program that tries to find its HOME_DIR. Was chasing my own tail when I stepped through numerous times with the debugger to find out why it will always receive "NOT FOUND" when retrieving its home directory.

The home directory isn't set when you start a job from QMON, because, well of course it isn't ;)

EX and QPTR Files will set it, but QMON of course won't. So, simply don't do that ;)


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: HOME_DIR in Assembly

Post by NormanDunbar »

Just a though, if you are trying to debug with QMON, have you tried ET instead of EX? That creates the job, then leaves it waiting for the debugger to connect.

Code: Select all

ET ram1_whatever;' any parameters etc here'
JOBS
QMON #1,job_number
(And later, I shall be teaching granny to suck eggs!)


Cheers,
Norm.


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
tofro
Font of All Knowledge
Posts: 2686
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: HOME_DIR in Assembly

Post by tofro »

NormanDunbar wrote:Just a though, if you are trying to debug with QMON, have you tried ET instead of EX? That creates the job, then leaves it waiting for the debugger to connect.

Code: Select all

ET ram1_whatever;' any parameters etc here'
JOBS
QMON #1,job_number
(And later, I shall be teaching granny to suck eggs!)


Cheers,
Norm.

That does indeed work, Thanks Norman. I knew, but I didn't realize this morning that the HOME Thing needs support from the program starting the job. Just stubbornly searching for the error in my code ;)


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Post Reply