Article View: comp.os.msdos.programmer
Article #4355Re: Writing assembly procedures for higher level languages
From: Mark Hall
Date: Thu, 24 Jan 1991 22:13
Date: Thu, 24 Jan 1991 22:13
30 lines
1804 bytes
1804 bytes
jhall@wpi.WPI.EDU (John Clinton Hall) writes:
>AccordingtMicrosoft's _Mixed-Language Programming Guide_, "A procedure
>caled from any of the Microsoft high-level languages should preserve the
>values of SI, DI, SS, and DS (in additon to BP, which is already saved)."
>However, does one need to save the ES register if it is mdified? How abo
>the flags register?
To save the ES register, you can always:
MOV AX,ES
PUSH AX
...
POP AX
MOV ES,AX
The general registers (AX - DX) can transfer stuff into the segment registers
and vice versa. Just remember: if you save the REAL AX register, and then mov
like above, you'll have to pop the "fake" AX register before you pop the
"real" one.
--
| Internet: data@{bucs1,buhub}.bradley.edu, al632@cleveland.freenet.edu |
|-----------------------------------------------------------------------------|
| F'net : 1:232/28 1:2250/9 (fname.lname@f<node>.n<net>.z<zone>.fidonet.org) |
|-----------------------------------------------------------------------------|
| "He sees you when you're sleeping, he knows when you're awake, but Captain, |
| it makes no sense!" "But Spock, with Santa, ALL things are possible!" |
| Kirk and Spock...Hallmark Greeting Cards |
Technical Details
Message-ID:
<1991Jan24.221332.5802@bradley.bradley.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!bradley.bradley.edu!buhub!dataReferences:
<1991Jan24.133054.8715@wpi.WPI.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!bradley.bradley.edu!buhub!data From: data@buhub (Mark Hall) Newsgroups: comp.os.msdos.programmer Subject: Re: Writing assembly procedures for higher level languages Message-ID: <1991Jan24.221332.5802@bradley.bradley.edu> Date: 24 Jan 91 22:13:32 GMT References: <1991Jan24.133054.8715@wpi.WPI.EDU> Sender: news@bradley.bradley.edu Organization: Bradley University Lines: 30