From: CSBVAX::MRGATE!@KL.SRI.Com:leichter-jerry@yale-venus.ARPA@SMTP 10-JUL-1987 03:31 To: EVERHART Subj: Re: Help with a Kernal mode macro program Received: from yale-venus.ARPA by KL.SRI.COM with TCP; Thu 9 Jul 87 14:00:39-PDT Date: 9 JUL 1987 16:12:28 EST From: To: dstevens@sitvxb.BITNET (David L Stevens) cc: INFO-VAX@kl.sri.com Subject: Re: Help with a Kernal mode macro program Reply-To: Greetings, I am trying to modify FINGER to go out and get the Server and Port name from the UCB blocks for the LAT device, we are using LAT-Plus. I have below the code that I use, the problem I am having is that the MOVC3 statement in the Kernal Mode code, crashes the system every time I run it.... .entry latinfkrn,^M ... movc3 port_len, srv_info_port(r8), (r6) movc3 modifies registers r0-r5. r0-r1 are not a problem unless your code uses them (I didn't look at it that closely), but you MUST save r2-r5 in your entry mask (or save/restore them yourself, if that's preferable for some reason). BTW, it's not clear to me that locking the pages involved in the working set is sufficient for your purposes; you have to be sure they are in memory before they are accessed. I don't know for certain, but I suspect $LKWSET will simply start the paging going - I don't think it will necessarily wait for it to complete. The usual technique, if all the code fits in no more than two pages, is to place the IPL you are setting in memory at the end of the code. The instruc- tion that sets the IPL is then itself guaranteed to be in memory, and it is certain to fault in the page containing the IPL. While at elevated IPL, neither page will fault out. (This can, of course, fail horribly if the SETIPL and the IPL itself get more than 2 pages apart, as there can then be a "hole" between the two.) If you do this, the $LKWSET is redundant. -- Jerry -------