View Full Version : Assembly file I/O urgent
fuadsm
05-19-2004, 04:26 PM
Hi everyone..
I am sorry for taking your time but I really need a help today...
I have a project in assembly and i have to submit it on Monday and sitll having troubles with some parts..
first,, How to read a name from a file and then tell the program to go to the next line to read a float point number..
and
how do I know that I reached the end of the file.??
in general, can anyone explain
how to make a pointer to follow lines in the file.
Art of Assembly book was not helpful for me!!
regards :(
Roy Sinclair
05-19-2004, 08:27 PM
I remember enough Burroughs Medium Systems assembler that I could probably help you with that but I suspect that's not the assembler you're using.
Don't let yourself get into such a hurry that you forget to include relevant details like the assembler you're using, the machine you're targeting (in the case of a cross-assembler) and the OS(es) it's expected to run under.
Also the code you've got so far would help since it'll show what you've done so far and what still needs to be done. In fact, if this is a classroom assignment (which it sounds like) then your code should be a mandatory part of the post since we should only provide the clues that'll help you get your code working and not the code itself.
fuadsm
05-19-2004, 09:15 PM
thanks alot for your reply...your right...I forget to write the important info..
anyways, as I said its a course project(Assignment) and our text book does not talk about these topics I am asking about and until now..I have not got a good tutorial talking in details about file I/O
I got some ideas about how to do file I/O using INT 21H,but still don't know how define a variable to read numbers and names...
I mean the program should read floating point numbers from a file..
We are using Pentium processor and MASM assembler...
Plz if you know any site that provides me about reading float numbers from a file and store them in a variable...plz help...
my problem occures in if the data file is for example
fuad
1234
81.4
anotherRecored
4321
71.94
how to manage the INT 21H to do this and store them correctly...
I messed up my code and its not worth to put it here...
plz again if anyone knows a site with good tutorial..plz post it..
regards,
fuad
Roy Sinclair
05-19-2004, 10:03 PM
Well I have to admit that the last time I did any MASM coding it was back when DOS 5.0 was the current version and DR-DOS was giving MS a run for their money.
Whether it's messed up or not, your code is required. We cannot write this for you since to do so would be to deny you the learning you're supposed to be getting. Even messed up, the code is a start.
krylite
05-19-2004, 10:48 PM
Try "Mastering Turbo Assembler" by Tom Swan, imo the last best book on TASM and DOS console 8086 assembly.
Another site where assembly may still be used: www.gamedev.net
Jason
05-19-2004, 11:11 PM
the code would help, I did masm coding not to long ago and I know I did something similar but I think I incorporated some C++ with it to do file manipulation I can't remember. I will have to look at my notes...code helps though even if its wrong...
Jason
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.