need Help about function 70 Hello,
I would like to know how i kan copy a file with the function 70,
with the 58th, a kan load the first byte to know how big the file is, but with the 70th , he dont return the size of se file.
in other words, Kan you say me how kan y get the filesize with the function 70?
It nice,
now, i kan try to build a install program.
it will useful for making a install cdrom
trolly- 08-22-2006
hum i tried to do , but it don't work.
how big is the filesize var? (db, dw or dd) .
after the int 40 (to spell the function 70.5) i writed that:
mov ebx,
mov ,ebx
the program compile, but the file size are'nt stored int fileinfo.filesize. why?
lost- 08-23-2006
qword :)
just look in docs
hidnplayr- 08-23-2006
qword? in 32-bit? how do you have to read that into memory :p
after reading the docs, i asume you have to use function 70 - 1 instead.
http://diamondz.land.ru/klbr_doc_eng/7001.htm
for that qword, you could check if the first dword is 0 and then use the second dword as the actual filesize, right? :)
Mario79- 08-23-2006
trolly
Probably, there are many reasons, on which your code does not work:
1) You check an error code, which comes back after call 70/5?
2) The data fileinfo can be intersected with other data, for example with the stack.
3) You precisely save in .filesize? You are sure, what this variable is on the place, instead of on a place of high 32 bits qword?
For more concrete answer you need to show on a forum the greater piece of the code. That you has written difficultly to judge a problem.
Good luck.
hidnplayr- 08-23-2006
oh yes, you can also read in data-blocks from the file untill you get an eof error
diamond- 08-24-2006
File size is declared as qword. There is such thing as 64-bit arithmetic in 32-bit mode (double precision integer arithmetic). But now only FAT is supported where file size must not be greater than 4 Gb, so high dword is always 0 and low dword represents file size itself. So two strings of code in your post must work. If does not equal to file size, then there is error in other code. Some reasons are enumerated by Mario79 (e.g. file not found (note that syntax /HD/* is obsolete and not supported), intersection of BDFE with other data, wrong pointer in fileblock (not to bdfe variable)).
trolly- 08-24-2006
ho yes, i've found the problem source.
i've used the synthax : '/HD/1' instead '/HD0/1'
thank for yours help.
trolly- 08-25-2006
Ok, now, i can use the function 70 to copy a file.
it work fine for copy a file from /hd0/1/ tho an other destination
but when i try to copy a file from /cd3/1 (cd-drive), the programm freeze, could anybody help me?
ther is the link from my code:
http://stephaneweg.cabspace.com/filelib.zip
this file contain :
filelib.inc : the code to load/write/copy a file
test.asm : the main program
diamond- 08-29-2006
Your code is OK. Probably kernel code can not work with your CD. Check whether KFar can read CD.
trolly- 08-29-2006
kfar can read cd.
In my demo program, when i click the button to copy the file, the cd-rom turn, than he stop and the program freeze (somtimes, all the system freeze)
diamond- 08-31-2006
Try to read autorun.inf in the internal viewer in kfar (F3 key). It is possible that kfar (due to kernel errors) can read CD contents but cannot read CD files.
trolly- 08-31-2006
ok, i will try.
What is the latest kernel version? (I've the 0.5.8.1 distrib)
Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.