Groups | Search | Server Info | Login | Register


Groups > comp.sys.acorn.programmer > #6640

Re: Name of a program

From Martin <News04@avisoft.f9.co.uk>
Newsgroups comp.sys.acorn.programmer
Subject Re: Name of a program
Date 2026-04-18 11:13 +0100
Organization None
Message-ID <5ccb684e90News04@avisoft.f9.co.uk> (permalink)
References (4 earlier) <F4l*XoiEA@news.chiark.greenend.org.uk> <5ccaee3398bob@sick-of-spam.invalid> <5ccb038169News04@avisoft.f9.co.uk> <5ccb161bb5bob@sick-of-spam.invalid> <D4l*rvnEA@news.chiark.greenend.org.uk>

Show all headers | View raw


In article <D4l*rvnEA@news.chiark.greenend.org.uk>,
   Theo <theom+news@chiark.greenend.org.uk> 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
> "<MyLoader$Filename>" (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. 

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

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