Article View: comp.lang.asm370
Article #289Re: info on ipk and spka instructions
From: "Lewis T. Flynn"
Date: Thu, 18 Jan 1990 21:15
Date: Thu, 18 Jan 1990 21:15
23 lines
1817 bytes
1817 bytes
In article <9001181830.AA15303@lilac.berkeley.edu> IBM 370 Assembly Programming
Discussion List <ASM370%UCF1VM.bitnet@lilac.berkeley.edu> writes:
>
> can anyone explain the syntax and operation of these statements for me?
> i cannot find their definition in my favorite text (assembly language,
> george struble, third edition, 1984). i gather they manipulate the psw,
> but in the only example i've seen of their use, i don't understand how:
>
> ipk , * get psw key into r2
> st 2,key * save key
> spka 0(0) * set key to 0
>
> any help would be appreciated. thank you in advance.
This code extracts the currect protect key from the PSW and puts it into
register 2 (by definition of the instruction), saves it, and then sets the
PSW protect key to 0. These are "semi priveledged" instructions, which means
that either you are in supervisor state or have the appropriate bits in
the control registers set (in this case cr0 bit 4 and cr3 the psw key mask).
These are documented in any recent Principles of Operation (370, XA, or
ESA). You really should have a POO if you are working in assembler.
Terry
Technical Details
Message-ID:
<9001190050.AA21874@lilac.berkeley.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!ncis.tis.llnl.gov!lll-winken!uwm.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!amdahl.UUCP!terryShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!ncis.tis.llnl.gov!lll-winken!uwm.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!amdahl.UUCP!terry
From: terry@amdahl.UUCP ("Lewis T. Flynn")
Newsgroups: comp.lang.asm370
Subject: Re: info on ipk and spka instructions
Message-ID: <9001190050.AA21874@lilac.berkeley.edu>
Date: 18 Jan 90 21:15:41 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: IBM 370 Assembly Programming Discussion List <ASM370%UCF1VM.bitnet@lilac.berkeley.edu>
Distribution: inet
Organization: The Internet
Lines: 23