30 November 2004, 16:18 | #1 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,658
|
dos/exec/intuition asm tutorials for Kickstart 1.3
Hi!
Started some heavy nostalgia coding... Need to refresh my memory. Anybody got a link to a great site with dos/exec/(intuition) assembler examples? You know; allocate some memory, open a file, input/output to the CLI window, save file, clean up after yourself Last edited by Photon; 30 November 2004 at 17:30. Reason: specified |
01 December 2004, 07:35 | #2 |
Registered User
Join Date: Sep 2002
Location: Germany
Posts: 349
|
You've got a PM...
|
01 December 2004, 10:10 | #3 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,658
|
Thanks for the C help, but I'm *really* looking for assembler examples, so I can see what values to give to the library routines. (And not have to look in an include that defines that value according to some definition in another include... nothing wrong with includes, in fact I could use some Assembler includes, but they should be simple lists of "variablename=value"... I'd get a headache if I tried to translate C includes to Assembler...) For example I seem to remember you give 1002 or 1003 or something to the file open routines depending on if you want to read or write, but I dont remember which.
|
01 December 2004, 10:54 | #4 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,658
|
Amiga Realm links to "The Amiga DOS online reference manual", but the link is dead. Anyone know if it is mirrored somewhere?
|
01 December 2004, 11:19 | #5 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,658
|
Found 3 code examples via google. Will be looking at them.
It's all coming back to me now! ..except this: 1) How to allocate the largest chunk of Chip memory 2) How to access the default CLI window on a Kick 1.3 machine. I seem to remember that opening a console with the name "*" didn't always work. |
01 December 2004, 13:38 | #6 | |
Tik Gora :D
Join Date: Oct 2001
Location: Round yo momma's
Posts: 1,273
|
Quote:
Which particular link you on about? .. coz i tried a couple there and they all worked. If they dont work go and try archive.org .. its excellent for retrieving long gone pages. |
|
01 December 2004, 13:46 | #7 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,658
|
Did you try the link entitled The Amiga DOS online reference manual? i.e. http://www.nethkin.com/bmori/amiga/dos1.html
Anyway after an hour of surfing, I now have enough to work with. Btw, opening a console window with the name "*" seems to work fine. |
01 December 2004, 13:48 | #8 | |
Zone Friend
Join Date: Oct 2003
Location: France
Age: 51
Posts: 161
|
Quote:
|
|
01 December 2004, 13:51 | #9 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,658
|
Ooh, that would almost have been helpful if you'd told me chip=2 and fast=4
Luckily I found that out myself, thanks anyway [Edit: Bah, now you made me look like a f00l by editing your post :P] Last edited by Photon; 01 December 2004 at 15:58. |
01 December 2004, 14:54 | #10 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,658
|
I made a small utility (in AsmOne) to show the largest address range of free chip mem. I didn't know if I was allowed to post longish text chunks in here, so here's the link for it:
http://student.hcedu.net/ws03hen/Amiga/chiprange.s If you're not after the source example, but could use the utility, here's the link: http://student.hcedu.net/ws03hen/Amiga/chiprange Hope it's useful to someone. Last edited by Photon; 01 December 2004 at 15:19. Reason: extra link |
01 December 2004, 15:45 | #11 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,658
|
Found this gem of a site documenting dos.library etc:
http://www.innoidea.hu/subsites/amig...&action=Search ...so now I only need to know the actual values for ACCESS_READ and ACCESS_WRITE when doing a Lock()... |
01 December 2004, 15:56 | #12 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,658
|
Ahh! Found it!
ACCESS_READ=-2 ACCESS_WRITE=-1 ...it's so hard to find when you're drowned in C examples that use values hidden in some include you never see... luckily I got help finding an include that defined it. 8) |
01 December 2004, 16:51 | #13 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,658
|
What's the easiest way to get the NAME of the current directory? I need it to make a program load a data file from the same directory as the program, so if I can get the path to the program, that would work too. Can I get it from a register value that the OS supplies me with at the start of the program? What do the registers contain when a program is called?
(Hoping there's a guru out there that has the answers ) |
01 December 2004, 17:01 | #14 |
Zone Friend
Join Date: Oct 2003
Location: France
Age: 51
Posts: 161
|
ha! I think this function doesnt exist in AmigaDOS
I remember a routine by François Lionet (Amos) for getting full path of the current directory. (the comments are in french, sorry) |
01 December 2004, 17:38 | #15 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,658
|
omg "lea -260(sp),sp" ! ! !
...So he gets the parent dir all the way up to the root and builds a path name? ... Sure would like to know if there's an easier way to do it, though. Is there some symbol I can use in a file name, like ".\" in M$-DOS? And I would still like to know the register values when a program is started. But thanks for the example, I will take a look at it! |
02 December 2004, 08:12 | #16 | |
Registered User
Join Date: Sep 2002
Location: Germany
Posts: 349
|
Quote:
d0=length of parameter line + 1, so e.g. do this: Code:
lea _arg(pc),a5 move.l a0,(a5) subq.l #1,d0 move.b #0,(a0,d0.w) |
|
02 December 2004, 13:41 | #17 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,658
|
Thanks!
No other register values I can rely on? |
03 December 2004, 10:05 | #18 | |
Zone Friend
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,129
|
Quote:
|
|
05 January 2007, 17:55 | #19 | |
Posts: n/a
|
Quote:
I have been thinking and found it too complicated to try allocating absolutely in chip memory. As the memory is needed for COPPER list, samples, etc. and chip memory is needed. Thanks a lot! SoLo2 |
|
05 January 2007, 19:54 | #20 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,658
|
hehe, ancient thread revived
It says so in the book Includes & Autodocs, and also in exec includes that come with most Assemblers and C compilers. Now I don't have to ask much here, since I restored my old Asm-One disks, development system etc. 8) But I always find it's much more efficient if you have full overview and control over the whole program that you're coding. No indirect references to some file somewhere... I like asm code to be "What You See Is What You Get". I got massive anxiety when I tried to make an unfinished version of my DevSys to work. The includes had to be the same as in 1992, there were conditional assembly directives everywhere so you didn't know what got assembled, and always references to a dozen include files so you had to be a detective and find out what each declare value and macro code did. Never again, I say. The opposite of fun. > If you want the normal ASM includes, get Asm-One V1.01 or later (disk) from planetemu or something. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
exec.library v45.24 looking for beta testers | Cosmos | Coders. General | 137 | 26 February 2018 21:20 |
How to find Exec device name and unit number for boot drive | mark_k | Coders. System | 3 | 16 February 2013 19:52 |
PCMCIA fault: DOS error code 225 - Not a valid DOS disk | 4am | support.Hardware | 2 | 07 April 2012 10:20 |
Intuition - Menus | Gilloo | Coders. System | 1 | 05 March 2012 10:11 |
exec.library problem with VisualPrefs | oldpx | support.Apps | 4 | 29 August 2002 00:18 |
|
|