Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA
Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!houxm!whuxl!whuxlm!akgua!sdcsvax!dcdwest!ittvax!decvax!genrad!panda!talcott!harvard!seismo!brl-tgr!tgr!bang!crash!ihom@nosc.ARPA
From: ihom@nosc.ARPA
Newsgroups: net.micro.cpm
Subject: Re: changing user areas
Message-ID: <8702@brl-tgr.ARPA>
Date: Wed, 27-Feb-85 04:42:55 EST
Article-I.D.: brl-tgr.8702
Posted: Wed Feb 27 04:42:55 1985
Date-Received: Sun, 3-Mar-85 03:58:08 EST
Sender: news@brl-tgr.ARPA
Lines: 22

The BDOS function code for "getting" and "setting" the user area is 20h.
The contents of register E determines whether to get or set.  If register
E contains FFh, then the curent user area is returned in register A.
Any other valid user number in register E will set you to that user.
i.e.
 
procedure change_users;
   const
      user_code = $0020;   { BDOS call }
      current = $FF;
   var
      new_user : byte;
   begin
      writeln('Current user is: ',bdos(user_code,current));
      write('New user? ');
      readln(new_user);
      bdos(user_code,new_user);
   end;

--Irwin Hom          {ihnp4, sdcsvax!bang}!crash!ihom
				 bang!crash!ihom@nosc
			       sdamos!crash!ihom@ucsd