bader wrote
i am a little confused because i feel that somewhere i need the path of the file in order to read it
not just the name of the file, otherwise i must know in which folder it resides(maybe in the same folder as the assembler) !!
You should consider the argument to your assembler to be a path and filename. For example
asm somewhere/file.asm
should produce the output file "somewhere/file.hack".
The I/O library will handle paths passed into its open functions based on the current working directory.
This way, your working directory can be the directory where you are developing your assembler and you can test it using full paths to the test sources.
Alternatively, you can add the directory where your assembler's executable is stored to your PATH variable so that it can be run when the working directory is the source file's directory.
--Mark