![]() |
![]() |
#1 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,646
|
![]()
I can't believe in the years I have used the Amiga I never stumbled upon this, and I am not sure if it's a bug or a feature, but it turns out you can issue an ASSIGN command pointing to an executable, and when you do call that "volume" name, it launches the application.
This definitely sounds like a bug, but is it? Can anyone explain more? I just tried this on 3.1, not sure if any other versions do it. |
![]() |
![]() |
#2 |
Registered User
Join Date: Feb 2012
Location: United Kingdom
Posts: 3,184
|
I think the ASSIGN actually worked as a shortcut. Whatever you pointed it to was 'registered' as the path that would be accessed - so you could even load a image file if you wanted to!
|
![]() |
![]() |
#3 |
Registered User
Join Date: Oct 2021
Location: England
Posts: 1,237
|
never heard of this before, interesting.
|
![]() |
![]() |
#4 | |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,302
|
Quote:
You can assign to anything you can "lock", including an arbitrary file (not only executables). I would not call this a bug, it is just a side effect of how assigns and locks work, and how they are resolved by the file system. So that is actually not an issue. If the assign goes to a file (not a directory), opening that assign will open the file. This is because it resolves to a "lock" on the object (the file) and an empty path ("") which needs to be resolved by the file system to the object itself representing the file, the same way an empty string resolves to the current directory. It should be even possible to "CD" into this assign, and then execute a binary through the empty string ("") through the very same mechanism. All in all, it is just a side effect how Tripos resolves objects. |
|
![]() |
![]() |
#5 |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
|
|
![]() |
![]() |
#6 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,646
|
This is all so weird discovering it after 30+ years. Yeah so assign is basically a symlink.
Couldn';t anything wrong happen when a program tries to access an assign as a folder but encounters a file instead? And how would you use a disk image this way? |
![]() |
![]() |
#7 | |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,831
|
Quote:
Can't work because the OS doesn't know anything about the file system used in the disk image. |
|
![]() |
![]() |
#8 |
Registered User
Join Date: Feb 2018
Location: Poland
Posts: 362
|
Lol, nice catch. And since "Assign DIRS" lists those files assigned then there is a bug somewhere.
|
![]() |
![]() |
#9 | |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,302
|
Quote:
Remember, the following sequence is an equivalent to OpenFromLock(lock): Code:
lock=Lock("myfiletooopen",SHARED_LOCK); CurrentDir(lock); /* yes, even if lock does point to a file! */ file = Open("",MODE_READ); |
|
![]() |
![]() |
#10 | |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,636
|
Quote:
![]() |
|
![]() |
![]() |
#11 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,646
|
I still fail to see how this is not a bug since any other use but a directory seems to be problematic.
|
![]() |
![]() |
#12 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,831
|
At the OS level, perhaps, but I see no reason why it should work in the console. You can't assign to a file and cd to it, for example. You can't type text files. Seems better to disable it in the console assign command (not talking about the OS level).
|
![]() |
![]() |
#13 | |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
|
Quote:
Assign I would say is the most representative command of the Amiga system. Years ago when I was burning PC-Windows Games and Applications to CD, if I made a mistake in label name, you could trash the CD, instead you would just have to have the Assign command on PC to use that CD normally. Always another Amiga peculiarity, although many people do not know it, there is an Amiga Device that allows you to Edit, Rename, delete files from the CD "virtually", very convenient when in the CD you do not want to show folders with viruses, corrupted files etc.. Last edited by AMIGASYSTEM; 19 December 2022 at 11:05. |
|
![]() |
![]() |
#14 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,831
|
|
![]() |
![]() |
#15 |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
|
No !!! I'm talking about a "Real" CD-RW Burner, but a software "AMiGA" that allows you to change the data of a CD "Virtually" !!!! All changed or deleted data is added on a folder called "Data", if you delete the folder "DATA" the CD will be visible as it was in original !!!! Of course the CD with a normal Device will be seen in its entirety, only the mentioned Device can see and use the changes !!! If I was not clear, I will make a comprehensive video !!! |
![]() |
![]() |
#16 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,831
|
|
![]() |
![]() |
#17 | |
Registered User
Join Date: Feb 2018
Location: Poland
Posts: 362
|
Quote:
That's not the point. When you deliberately specify the parameter that supposedly lists directories it should print only them. Otherwise it is misleading and wrong. If you don't specify any parameters the assign command can print whatever it wants, even a random poems. That's why it is a bug. |
|
![]() |
![]() |
#18 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,395
|
That's interesting. Something (somewhat unrelated but equally odd ) that I used to do that worked for a lot of applications was to make their directory icon a project and then make the default tool for opening it the actual application inside. Probably not wise, but was inspired by the way application drawers in RiscOS worked.
|
![]() |
![]() |
#19 |
Registered User
Join Date: Oct 2013
Location: England
Posts: 424
|
@Akira
Sounds like one of those Mandela thingamabobs. Never heard of it in my life! Then again, I was just as surprised a couple of years ago when I discovered ASL had a delete function in the menu, and that the 'Update All' function in the Workbench menu actually worked as I swear it never used to. I'm talking 3.0 here in both cases. Been using it for 30 years almost. @Karlos I wonder if that is a feature and that's where RiscOS nicked it from in the first place? (Tripos). |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to assign some buffer for a string? | peceha | Coders. Blitz Basic | 3 | 21 August 2018 11:19 |
How to re-assign a keyboard key? | Zerg | support.WinUAE | 7 | 11 October 2013 19:24 |
f1gp: hd installation and assign.. | jolly11 | support.Games | 1 | 21 November 2009 11:57 |
Assign command | fc.studio | support.Apps | 2 | 28 December 2005 18:36 |
Multi-Assign | Shoonay | support.Apps | 17 | 12 April 2005 15:16 |
|
|