Article View: comp.lang.asm370
Article #286Re: info on ipk and spka instructions
From: Lewis T. Flynn
Date: Thu, 18 Jan 1990 21:15
Date: Thu, 18 Jan 1990 21:15
22 lines
1707 bytes
1707 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:
<3a0p02uY80x201@amdahl.uts.amdahl.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!uakari.primate.wisc.edu!ames!amdahl!terryReferences:
<9001181830.AA15303@lilac.berkeley.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!uakari.primate.wisc.edu!ames!amdahl!terry From: terry@uts.amdahl.com (Lewis T. Flynn) Newsgroups: comp.lang.asm370 Subject: Re: info on ipk and spka instructions Message-ID: <3a0p02uY80x201@amdahl.uts.amdahl.com> Date: 18 Jan 90 21:15:41 GMT References: <9001181830.AA15303@lilac.berkeley.edu> Reply-To: terry@amdahl.uts.amdahl.com (Lewis T. Flynn) Distribution: inet Organization: Amdahl Corporation, Sunnyvale CA Lines: 22