home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.smalltalk
- Path: sparky!uunet!news.univie.ac.at!scsing.switch.ch!univ-lyon1.fr!ghost.dsi.unimi.it!rpi!gatech!swrinde!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!ticipa!ticipa.pac.sc.ti.com!tomb
- From: tomb@ticipa.pac.sc.ti.com (Thomas Burns)
- Subject: Re: HELP! 2 question...
- In-Reply-To: sokol@mem.kharkov.ua's message of Tue, 26 Jan 93 08: 51:06 +0200
- Message-ID: <TOMB.93Jan27085056@ticipa.pac.sc.ti.com>
- Sender: usenet@ticipa.pac.sc.ti.com (USENET News System)
- Organization: Texas Instruments Manufacturing Technology Center
- References: <AAQzDPheA3@mem.kharkov.ua>
- Date: Wed, 27 Jan 1993 14:50:56 GMT
- Lines: 46
-
- In article <AAQzDPheA3@mem.kharkov.ua> sokol@mem.kharkov.ua (Sokolinski Dmitry I) writes:
-
- > Dear collegues !
- > 1. Does anyone know how to invoke user primitive in
- > Smalltalk V286 in real mode ?
-
- Assuming that the primitive module header is defined as follows:
-
- PRIM_MODULE_HEADER STRUC
- installEntry DW ? ; 0 entry point for installation routine
- reserved1 DW 0 ; 2
- DW 0 ; 4
- realCodeSeg DW ? ; 6 after loading, will contain real mode addr
- primTableOffset DW ? ; 8 offset of table of primitive subroutines
- realParmSeg DW ? ; A after loading, will contain real mode addr
- ; of virtual machine communication area.
- reserved2 DW 0 ; C
- DW 0 ; E
- PRIM_MODULE_HEADER ENDS
-
- The following code, when called from within a user primitive, will
- execute code in real mode:
-
- mov cx, ds:[realCodeSeg]
- mov dx, <near address of function>
- mov ah, 1
- int 50h
-
- To properly access your data, the first few lines of your real mode
- function will need to do something like:
-
- push cs
- pop ds
-
- to set up the data segment. Note that generally all registers (except
- AX, I believe) are trashed by the interrupt. To save data, define
- some storage in the data segment for information passing between real
- and protected mode.
-
- tom
-
- --
- Tom Burns Domain: tomb@spdc.ti.com
- Texas Instruments TI MSG: THOS
- P.O. Box 655012, M/S 463 Voice: (214) 995-9707
- Dallas, TX 75265 FAX: (214) 995-1916
-