Groups | Search | Server Info | Login | Register
Groups > comp.sys.acorn.programmer > #6625
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Martin <News04@avisoft.f9.co.uk> |
| Newsgroups | comp.sys.acorn.programmer |
| Subject | Re: Name of a program |
| Date | Thu, 16 Apr 2026 22:29:04 +0100 |
| Organization | None |
| Lines | 47 |
| Message-ID | <5cca9e7724News04@avisoft.f9.co.uk> (permalink) |
| References | <5cca837cdbbob@sick-of-spam.invalid> <5cca87776fNews04@avisoft.f9.co.uk> <5cca8d05ebbob@sick-of-spam.invalid> |
| Injection-Date | Thu, 16 Apr 2026 21:29:15 +0000 (UTC) |
| Injection-Info | dont-email.me; posting-host="583e7422536fefdabac1b4c86289d4a5"; logging-data="2113541"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+3k+Um7C6syF5vdaIrD8WW" |
| User-Agent | Pluto/3.21a (RISC OS/5.31) NewsHound/v1.54 |
| Cancel-Lock | sha1:bqg+M9T0kK4fkLOYXPRVKbxvxZQ= |
| Xref | csiph.com comp.sys.acorn.programmer:6625 |
Show key headers only | View raw
In article <5cca8d05ebbob@sick-of-spam.invalid>, Bob Latham <bob@sick-of-spam.invalid> wrote: > In article <5cca87776fNews04@avisoft.f9.co.uk>, > Martin <News04@avisoft.f9.co.uk> wrote: > > In article <5cca837cdbbob@sick-of-spam.invalid>, > > Bob Latham <bob@sick-of-spam.invalid> 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. How are you running the program? It sounds as if you are using the BASIC command to open an interactive editor, then running the program within that using LOAD/RUN. The only RISC OS command used to start it was BASIC. > I want the name of Basic assembler file. If you simply double-click on the BASIC file name in a Filer display, then what does OS_GetEnv return? Alternatively, run the assembler code and save the output. Double-click that aand GetEnv will show the saved file name. -- Martin Avison Note that unfortunately this email address will become invalid without notice if (when) any spam is received.
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Name of a program Bob Latham <bob@sick-of-spam.invalid> - 2026-04-16 17:34 +0100
Re: Name of a program Martin <News04@avisoft.f9.co.uk> - 2026-04-16 18:17 +0100
Re: Name of a program Bob Latham <bob@sick-of-spam.invalid> - 2026-04-16 19:18 +0100
Re: Name of a program Martin <News04@avisoft.f9.co.uk> - 2026-04-16 22:29 +0100
Re: Name of a program Harriet Bazley <harriet@bazleyfamily.co.uk> - 2026-04-17 10:45 +0100
Re: Name of a program Theo <theom+news@chiark.greenend.org.uk> - 2026-04-17 11:43 +0100
Re: Name of a program Bob Latham <bob@sick-of-spam.invalid> - 2026-04-17 12:59 +0100
Re: Name of a program Martin <News04@avisoft.f9.co.uk> - 2026-04-17 16:52 +0100
Re: Name of a program Bob Latham <bob@sick-of-spam.invalid> - 2026-04-17 20:15 +0100
Re: Name of a program Martin <News04@avisoft.f9.co.uk> - 2026-04-17 23:24 +0100
Re: Name of a program Bob Latham <bob@sick-of-spam.invalid> - 2026-04-18 10:08 +0100
Re: Name of a program Theo <theom+news@chiark.greenend.org.uk> - 2026-04-18 10:56 +0100
Re: Name of a program Martin <News04@avisoft.f9.co.uk> - 2026-04-18 11:13 +0100
Re: Name of a program Bob Latham <bob@sick-of-spam.invalid> - 2026-04-18 13:50 +0100
Re: Name of a program Bob Latham <bob@sick-of-spam.invalid> - 2026-04-18 15:29 +0100
Re: Name of a program Martin <News04@avisoft.f9.co.uk> - 2026-04-18 16:30 +0100
Re: Name of a program Theo <theom+news@chiark.greenend.org.uk> - 2026-04-18 17:54 +0100
Re: Name of a program Martin <News04@avisoft.f9.co.uk> - 2026-04-18 18:06 +0100
Re: Name of a program Martin <News04@avisoft.f9.co.uk> - 2026-04-18 18:51 +0100
Re: Name of a program Bob Latham <bob@sick-of-spam.invalid> - 2026-04-18 19:08 +0100
Re: Name of a program Martin <News04@avisoft.f9.co.uk> - 2026-04-18 19:36 +0100
Re: Name of a program Bob Latham <bob@sick-of-spam.invalid> - 2026-04-17 12:08 +0100
Re: Name of a program Harriet Bazley <harriet@bazleyfamily.co.uk> - 2026-04-17 14:12 +0100
Re: Name of a program Tank <webmaster@tankstage.co.uk> - 2026-04-17 15:09 +0100
Re: Name of a program Harriet Bazley <harriet@bazleyfamily.co.uk> - 2026-04-17 19:35 +0100
Re: Name of a program Bob Latham <bob@sick-of-spam.invalid> - 2026-04-17 20:17 +0100
Re: Name of a program Martin <News04@avisoft.f9.co.uk> - 2026-04-17 23:30 +0100
Re: Name of a program Steve Fryatt <news@stevefryatt.org.uk> - 2026-04-18 11:39 +0100
Re: Name of a program Bob Latham <bob@sick-of-spam.invalid> - 2026-04-18 13:55 +0100
csiph-web