Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Harriet Bazley Newsgroups: comp.sys.acorn.programmer Subject: Re: Name of a program Date: Fri, 17 Apr 2026 10:45:48 +0100 Organization: A noiseless patient Spider Lines: 36 Message-ID: <01ece1ca5c.harriet@bazleyfamily.co.uk> References: <5cca837cdbbob@sick-of-spam.invalid> <5cca87776fNews04@avisoft.f9.co.uk> <5cca8d05ebbob@sick-of-spam.invalid> Injection-Date: Fri, 17 Apr 2026 10:03:12 +0000 (UTC) Injection-Info: dont-email.me; posting-host="6155c9fdbea84a0e500bae55961e1ea2"; logging-data="2491409"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199JfusQCHeNvnTG6WR1T68hzX20rMdLV4=" User-Agent: Messenger-Pro/8.04 (MsgServe/8.04) (RISC-OS/5.31) NewsHound/v1.53-32 RC1 Cancel-Lock: sha1:AcMyEYHqxOKbsmIE8Zw6rS8VzlY= X-Clacks-Overhead: GNU Terry Pratchett Xref: csiph.com comp.sys.acorn.programmer:6626 On 16 Apr 2026 as I do recall, Bob Latham wrote: > In article <5cca87776fNews04@avisoft.f9.co.uk>, > Martin wrote: > > In article <5cca837cdbbob@sick-of-spam.invalid>, > > Bob Latham wrote: > > > How can I get the name of program I'm running from within the > > > program? > > > I would have thought that a program would know what it is called?! > > So not sure what you are wanting. > > I want to hide the name of the source file in assemble code. I would > like to be able to look at my code and be able to find out which > source file it came from. Do you mean 'embed' the name of the source file in assembly code? I don't think it's inherently in the assembled machine code, which doesn't know whether it was assembled on the fly by running a parent BASIC file or loaded from disc and executed by calling the address of the area it was stored into, i.e. there is nothing to hide. Or is this for the purposes of error trapping? Probably the best way to label your machine code is simply to manually embed a string near the top of it (like the string that is the name of a relocatable module) with EQUS, so that you can visually inspect it - or check for its presence at a known offset from the start of the code. -- Harriet Bazley == Loyaulte me lie == The nice thing about standards is that there are so many to choose from