🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #5917

I can't get SHR EAX,16 to work in protected mode ...

#5917
From: Robert Hartill
Date: Mon, 22 Apr 1991 20:42
43 lines
1951 bytes
Please, Please, Please HELP..

This problem has been driving me mad for days now,

I've got a protected mode program for a 80386,

I've set up the first 30 interrupts to a routine I have which prints the
register contents..

I do this by moving the register into EAX, and print one hex digit at a time
from EAX..

After I shift EAX 16 places to the right (to get at the top 16bits) EAX seems
to contain 0. 

Even if I do..
	MOV EAX,12345678h
	SHR EAX,16
	call print_hex

I still get 0.

N.B print_hex works fine for the lower 16bits.

-----
When I tried
	PUSH EAX
	POP  AX
	POP  AX

which I would expect to leave the high 16bits of EAX in AX,
all hell breaks loose, the ISR appears to be re-entered before it completes..

-sorry I can't explain it better, you have to see it to appreciate it.

 
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::     Robert Hartill, Dept Of Computing Mathematics, UWCC, Cardiff, UK.     ::
::          e-mail : rhl@cm.cf.ac.uk         Fax : 0222 666182               ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Thank heavens, the sun has gone in, and I don't have to go out and enjoy it.
-Logan Pearsall Smith.
-------------------------------------------------------------------------------
Technical Details
Message-ID: <1991Apr22.204217.29963@cm.cf.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!cf-cm!rhl

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!cf-cm!rhl
From: rhl@computing-maths.cardiff.ac.uk (Robert Hartill)
Newsgroups: comp.os.msdos.programmer,alt.lang.asm
Subject: I can't get SHR EAX,16 to work in protected mode ...
Message-ID: <1991Apr22.204217.29963@cm.cf.ac.uk>
Date: 22 Apr 91 20:42:17 GMT
Sender: rhl@computing-maths.cardiff.ac.uk (Robert Hartill)
Reply-To: rhl@computing-maths.cardiff.ac.uk (Robert Hartill)
Organization: University of Wales College of Cardiff, Cardiff, WALES, UK.
Lines: 43