![]() |
|
#1
|
|||
|
|||
Four ELearning assembly...with windows, using tasm5 and tlink for assembling and linking.
i am trying to use the Findfirst function (4Eh) of interrupt 21h. Here, I understand that the details of found file are seen in DiscTransferArea. Please...let me know.. Where do or how do I find this elusive DTA? It would be greatly valued if a few hints are given to enable me to make out the right track. Thank you... |
|||
|
#2
|
|||
|
|||
Re: Four EPost your code.
If it's real long write a short version which illustrates the problem. Include compiling errors (if any). Also include your comments on output vs expected output etc... |
|
#3
|
|||
|
|||
Re: Four EMany thanks for your response..
Code:
As i understand, the 4Eh function searches for a file with extension .com as pointed out by the variable ‘Filetype’. If the search is successful, the details of found file are seen in DTA. The issue is this... What exactly is the value present at 9eh in DTA? To read/see that value, how do I access DTA? May be iam a little confused here in my understanding of DTA . Hope you could help me to get this holdup cleared. Regards... |
|
#4
|
|||
|
|||
Re: Four Esorry to be so long getting back.
Quote:
htl-steyr.ac.at/~morg/pcinfo/hardware/interrupts/inte1at0.htm In INT 21 4e Find first matching file. There is a interesting description of what is found in the dta and at what offset it is found at. Basically there is a chunk of data at the dta memory address and you find certain values at certain offsets in the chunk. There are also: INT 21,1A - Set Disk Transfer Address (DTA) and INT 21,2F - Get Disk Transfer Address (DTA) Which provide some additional info. such as: Quote:
80 + 1E = 9e ... and that is what you used in 3d to open the file. Did it work? Disclaimer: I have not done any of this so I could be totally wrong... Last edited by Howard_L : 08-Mar-2009 at 12:05.
|
|
#5
|
|||
|
|||
Re: Four EHoward_L . . thank you for making an honest effort to clear my doubt..
You had wondered where i got the 9Eh from ? Well, it’s like this: When a search function is successful, details of found file are made available in DTA which by default is located at offset 80h in the PSP(program segment prefix). At 1eh from DTA’s beginning, is the asciiz of the file name. Adding these two values together: 80h + 1Eh = 9Eh This is address where the name of the found file is located. It may be superfluous at this stage but i think i owe this to your earnestness. Good luck and god bless. Regards... |
|
#6
|
|||
|
|||
Re: Four EGlad to try , it helps me learn. What's dumb is that I learned about this a few months ago and had forgotten it!!!
Have you tried using the old 'debug' program? It comes with '98 and XP , not sure about Vista. You can view the entire PSP in that (including all the dta bytes). So what is the question? |
|
#7
|
|||
|
|||
Re: Four EMy acquaintance with assembly especially and programming in general is very recent and shallow.
Yes ...one can steal a look at PSP and DTA in debugger as you have suggested. i got it ... rather learned this, after i asked the question and before you could answer it. So, what is the question ... what happened to DTA?? Both got worked out between question and answer. Regards... |
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The