Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Bob Latham Newsgroups: comp.sys.acorn.programmer Subject: Re: Name of a program Date: Thu, 16 Apr 2026 19:18:29 +0100 Organization: None Lines: 32 Message-ID: <5cca8d05ebbob@sick-of-spam.invalid> References: <5cca837cdbbob@sick-of-spam.invalid> <5cca87776fNews04@avisoft.f9.co.uk> X-Trace: individual.net NDrNSkVcP5xP/rYd8e7cCgiEC22sMzgy3G0T+k/cz6CztRgX44 X-Orig-Path: sick-of-spam.invalid!bob Cancel-Lock: sha1:fS2B7AK0TNvjFR8nA2WCDLfmIcU= sha256:D2h9T9g1cUnqV2LcyXZpfc6yMUpJOtwTdYZHSoqTgnA= X-No-Archive: Yes User-Agent: NewsHound/v1.54 Xref: csiph.com comp.sys.acorn.programmer:6624 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. > You can get the command used to start the program, if that is any > help, by using SWI OS_GetEnv. The name of the program file run will > be in that command, but the command will need parsing to get it. > OS_Args could be used to help that, or do it 'manually' in the > program. I'm obviously missing something because I've looked at this before and had no joy. If in a Basic assembler file I run SWI OS_GetEnv it just says BASIC, which I suppose that is what it is running but it's of no use to me. I want the name of Basic assembler file. Thanks. Bob.