![]() |
problem opening a file
I write a program in C but i have not the right to use the standard library. I want to open a file so i use an assembly procedure that i have write, open_file. Here is what i mean:
At C code part: Code:
int fp;I would appreciate your help. Thanks a lot for your time |
Re: problem opening a file
( I had mis-read your post first )
I will look into the ASM code and tell you later. |
Re: problem opening a file
If you're allowed to use the BIOS then it's fairly easy; just write a program in C that does the same, then step through it at the assembler level using the debugger. That'll show you what the standard library does, then you can use that for inspiration.
|
Re: problem opening a file
when i try to use the debugger(ddd), i cannot debug and it returns me the message "Program exited with code 0176. You can't do that without a process to debug"
|
Re: problem opening a file
ok finally i did that, but when it comes for the function that opens the file, simply refers to it as fopen, so i cannot see what fopen does in assembly language
|
Re: problem opening a file
You need to use a debugger that will work at the assembly level and will allow you to step through individual assembly instructions.
See Section 8.6 of the gdb manual; this seems relevant. http://sourceware.org/gdb/current/on...b_9.html#SEC64 There's also an apparently relevant section in the ddd documentation: http://www.gnu.org/manual/ddd/html_m...el%20Debugging RTFM! |
| All times are GMT +5.5. The time now is 05:18. |