Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Martin Newsgroups: comp.sys.acorn.programmer Subject: Re: Name of a program Date: Sat, 18 Apr 2026 11:13:39 +0100 Organization: None Lines: 37 Message-ID: <5ccb684e90News04@avisoft.f9.co.uk> References: <5cca837cdbbob@sick-of-spam.invalid> <5cca87776fNews04@avisoft.f9.co.uk> <5cca8d05ebbob@sick-of-spam.invalid> <01ece1ca5c.harriet@bazleyfamily.co.uk> <5ccaee3398bob@sick-of-spam.invalid> <5ccb038169News04@avisoft.f9.co.uk> <5ccb161bb5bob@sick-of-spam.invalid> Injection-Date: Sat, 18 Apr 2026 10:13:58 +0000 (UTC) Injection-Info: dont-email.me; posting-host="e34d1ff28191ed6cd84dd8b78cf054ca"; logging-data="3302665"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19a7lWTPzpkCtX03fhQCZwL" User-Agent: Pluto/3.21a (RISC OS/5.31) NewsHound/v1.54 Cancel-Lock: sha1:IlsB6EKB8tAW8bSN5ufyYySrVcc= Xref: csiph.com comp.sys.acorn.programmer:6640 In article , Theo wrote: > I can think of a couple of routes to doing what you want: > 1. Have your desktop program run the command of > '*Basic -load $.MyProg' > Then it starts Basic with the file loaded but not run. > Use OS_GetEnv to get the command and parse out the filename. That is a brilliant idea! > 2. Have your desktop program set a system variable > MyLoader$Filename to be the name of the Basic prog, then SAVE > "" (or read the sysvar to a Basic string first) If Basic$Prog was set to the required name, then adding a simple FNid would add the name value to the code: 1 DIM code% 100 2 P% = code% 3 [ 4 ; some other bits of your code 5 FNid ; Insert program name 6 ALIGN ; to next word boundary 7 ; some other bits of your code 8 ] 9 END 10 11 DEF FNid :REM insert program name at P% 12 SYS "XOS_ReadVarVal","Basic$Prog",P%,255,0,3 TO ,,L% 13 P% += L% :REM move ptr after name 14 = 0 -- Martin Avison Note that unfortunately this email address will become invalid without notice if (when) any spam is received.