Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old April 28th, 2007, 05:39 AM
mr_shadow's Avatar
mr_shadow mr_shadow is offline
java & php
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 159 mr_shadow User rank is Lance Corporal (50 - 100 Reputation Level)mr_shadow User rank is Lance Corporal (50 - 100 Reputation Level)mr_shadow User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 10 h 9 m 26 sec
Reputation Power: 3
Implementing dir/s in assembly

Hi,
I'm forced to write a program with assembly language ( masm assembler ) which perform multiple tasks,
and one of them is to implement dir /s command on it, I mean the ability to find all files and folders in the hard disk and then save it to a file,
I've done something like this in C programming language some years ago, but even in C ( which uses dyamic data structures such as link list ) it was difficult to implement,

does anyone have any idea, or suggesstion to do this in assembly ?

any help would be appreciated !
sincerely,
__________________
I have given a name to my pain and call it "dog": it is just as faithful, just as obtrusive and shameless, just as entertaining, and just as clever as any other dog !

Reply With Quote
  #2  
Old April 30th, 2007, 02:56 AM
mr_shadow's Avatar
mr_shadow mr_shadow is offline
java & php
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 159 mr_shadow User rank is Lance Corporal (50 - 100 Reputation Level)mr_shadow User rank is Lance Corporal (50 - 100 Reputation Level)mr_shadow User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 10 h 9 m 26 sec
Reputation Power: 3
any opinions ?

Reply With Quote
  #3  
Old May 1st, 2007, 11:45 AM
salem's Avatar
salem salem is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2005
Posts: 1,608 salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)  Folding Points: 153 Folding Title: Novice Folder
Time spent in forums: 1 Month 1 Day 12 h 42 m 38 sec
Reputation Power: 276
If all you're doing is saving the filenames as soon as you find them, all you need to store is the current directory hierarchy.

Which is pretty easily achieved by using recursion.

Prototype a really simple example in C, then translate to ASM (or just save the compiler's asm output and massage it into MASM syntax).
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.

Reply With Quote
  #4  
Old May 5th, 2007, 05:26 AM
mr_shadow's Avatar
mr_shadow mr_shadow is offline
java & php
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 159 mr_shadow User rank is Lance Corporal (50 - 100 Reputation Level)mr_shadow User rank is Lance Corporal (50 - 100 Reputation Level)mr_shadow User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 10 h 9 m 26 sec
Reputation Power: 3
dude, I should only use MASM and assembly for this project , I cannot use programming languages such as C, etc

In this case , how to implement search algorithms such as DFS ,BFS , etc ... in assembly ? !!!
as far as I know, there's another way , but I don't know how , I think I should use some interrupts to read the filenames directly from the hard disk. implemeting the logic in assembly would not work in this case , ?

can anyone help me with that interrupt ?
thanks all !

Reply With Quote
  #5  
Old August 17th, 2007, 12:33 PM
calpol2004's Avatar
calpol2004 calpol2004 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 249 calpol2004 User rank is Sergeant Major (2000 - 5000 Reputation Level)calpol2004 User rank is Sergeant Major (2000 - 5000 Reputation Level)calpol2004 User rank is Sergeant Major (2000 - 5000 Reputation Level)calpol2004 User rank is Sergeant Major (2000 - 5000 Reputation Level)calpol2004 User rank is Sergeant Major (2000 - 5000 Reputation Level)calpol2004 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 5 Days 9 h 40 m 44 sec
Reputation Power: 48
Send a message via MSN to calpol2004
just figure out what algorithm in your going to use in C then convert the sytax to asm. It's not exactly cheating, if this is for an assignment or something then it's training you for a real a job and in a real job your going to write it in C first simply because it would be quicker and simpler.

You don't have to write out the whole program in C, just write out the algorithm in pseudo code on a piece of scrap paper first with C's conditionals (if, while, switch) and then start structuring your asm program. the art of assembly book goes over converting those conditionals to asm and even gives you tips on altering them for certain situations to gain a few cpu cycles . Creating complex conditionals through jumps and cmp's in asm without a planned out structure of your program just gives you a headache as it just looks like mud.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Implementing dir/s in assembly


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway