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!bonnie!akgua!mcnc!decvax!genrad!panda!talcott!harvard!seismo!brl-tgr!tgr!37270588%sdcc3@sdcsvax.ARPA From: 37270588%sdcc3@sdcsvax.ARPA Newsgroups: net.micro.cpm Subject: Re: changing user areas Message-ID: <8705@brl-tgr.ARPA> Date: Wed, 27-Feb-85 06:54:53 EST Article-I.D.: brl-tgr.8705 Posted: Wed Feb 27 06:54:53 1985 Date-Received: Sun, 3-Mar-85 05:01:42 EST Sender: news@brl-tgr.ARPA Lines: 31 > Sorry to keep bugging you about this things but I've run into another little >problem, I need to be able to change the user area from the program. The >inline statement totally confused me and the Bdos function adjusts the wrong >register. Do you know how to change to the user area? ------------ The BDOS function code for "getting" and "setting" the user area is 20h. Perhaps you are not distinguishing hex from decimal or vice-versa (20h = 32d). Anyways, the contents of register E determines whether to get or set the user area. 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 number. 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); { put new_user in register E to change } end; --Irwin Hom {ihnp4, sdcsvax!bang}!crash!ihom bang!crash!ihom@nosc sdamos!crash!ihom@ucsd