Hello, I'm totally new here as member, although i 've read a lot as guest before.
I'm using Linux and would like to start coding assembler. In earlier times, i coded assembler under DOS, but that's years ago.
OK, I would like to try coding a program, which can find out the full path of another file, which is passed as parameter, After having found out the full path, this should be written in a text file. The sense of this task should be creating a playlist for mpg123.
So to say, we start "myprog song.mp3" and myprog finds out the full path of "song.mp3" and writes it down on a textfile. Hereby I would prefer "raw code", that's to say no API ot whatever, but "ax=**, int 80h".

I know dealing parameters, I know opening the textfile, writing to it and closing it, what I DON'T Know is, how to get the full path of the song.mp3

Aunt Google couldn't help me, so I hope, herein is someone, who pleasently could do so.  ;)

PS: Sry for my English, it's not my nature language, I'm German.
Posted on 2007-11-04 13:09:42 by CmdrHaggard
Hereby I would prefer "raw code", that's to say no API ot whatever, but "ax=**, int 80h".

You (exctept some trick) can't avoid using API on any OS. AFAIK, "int 80h" is linux' API interrupt.

So first thing to read is... Linux API ;)
Posted on 2007-11-04 13:32:24 by ti_mo_n
So, thanks for the fast reply. How I mentioned, Aunt Google wasn't too informative, the only thing I found was a List about use and syntax of int 80h, but HLA-specific. (At least I understood it like this).

I would gladly apreciate any link to any source of information, which leads me forward in this task.

Thanks again!  :)
Posted on 2007-11-04 13:38:22 by CmdrHaggard

So, thanks for the fast reply. How I mentioned, Aunt Google wasn't too informative, the only thing I found was a List about use and syntax of int 80h, but HLA-specific. (At least I understood it like this).

I would gladly apreciate any link to any source of information, which leads me forward in this task.

Thanks again!  :)


NASMX has an include file to support the INT 0x80 syscall interface, the Linux version that is. The include file (syscall.inc) has the function names (prefixed with "SYS_") with respective numbers. You can use these names in conjunction with man pages to figure out how to achieve your goal.

Not everything will be feasible through the syscall interface, perhaps getcwd is what you are looking for, but some things are just better through LibC. The NASMX LibC include file has been rather neglected, and not recommended to utilize at this point. However, you can find more info and examples at http://asm.sourceforge.net/.
Posted on 2007-11-04 14:27:07 by SpooK
Yep, this seems to be the right way. I'll test it tomorrow.
Many thanks for your help!  :)

Then I 've just to find a not too complex (likely GUI-based) Debugger under Linux for starting work.
OK, thanks again and Good Night.
Posted on 2007-11-05 13:46:40 by CmdrHaggard
for list of int 80 syscalls, accompained with headers, see lscr.sf.net
Posted on 2007-11-05 14:35:24 by vid