MS DOS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives FAQs MS DOS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old May 3rd, 2008, 01:49 PM
gerotica
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
List of lists code example

Does anybody have a working example code using dos int 52h to know all
program in memory in dos? I´ve been trying to use it unsucesfully for
quite a time

Reply With Quote
  #2  
Old May 4th, 2008, 06:09 PM
gerotica
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
List of lists code example

Everytime I try to search for "how mem.exe works" or something like
that I end up with "you need to use int21h/52h to get list-of-lists
and walk through the MCB chain" Well, I tried this:

#include "dos.h"
#include "mem.h"

struct mcb
{
char flag;
unsigned owner;
unsigned length;
char junk[3];
char name[8];
};

void main(void)
{
union REGS inregs, outregs;
struct SREGS sregs;
struct mcb mcb;
unsigned char far *p, *addr;

inregs.h.al = 0x00;
inregs.h.ah = 0x52;

intdosx(&inregs, &outregs, &sregs);
p = MK_FP(_DS, _BX-2);
memcpy(&mcb, p, sizeof(mcb));
}

Sorry if this looks absurd someway, but I´ve tried A LT of things
before that
Watching mcb var never returns the 'M' signature I would see if the
first MCB was pointed correctly I tried using *p, $p, p in every
situations (sorry about it, but i am desesperated already)
What am I doing wrong?

Reply With Quote
  #3  
Old May 5th, 2008, 05:09 PM
Robert Riebisch
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
List of lists code example

gerotica wrote:

Everytime I try to search for "how mem.exe works" or something like
that I end up with "you need to use int21h/52h to get list-of-lists
and walk through the MCB chain" Well, I tried this:

Why not get source code for FreeDS' MEM?

--
Robert Riebisch
Bitte NUR in der Newsgroup antworten!
Please reply to the Newsgroup NLY!

Reply With Quote
Reply

Viewing: Web Development Archives FAQs MS DOS > List of lists code example


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 Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | 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 1 hosted by Hostway