home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!email!ps1.iaee.tuwien.ac.at!sorokin
- From: sorokin@ps1.iaee.tuwien.ac.at (Zhenja)
- Subject: Extended register problem and 64k array
- Message-ID: <sorokin.34@ps1.iaee.tuwien.ac.at>
- Sender: news@email.tuwien.ac.at
- Nntp-Posting-Host: pc77.iaee.tuwien.ac.at
- Organization: Inst. for General Electrics & Electronics, TU Vienna
- Date: Wed, 30 Dec 1992 13:48:29 GMT
- Lines: 39
-
- 1. Can I use the following trick to bypass extended register non-
- conservation problem by some interrupts (Novell, etc.)?
- I write a separate assembler procedure of the sort
-
- proc test386
- enter 0,0
- sti ;mask interrupts
-
- ... operations with EAX,EBX,ECX, etc.
-
- cli ;enable interrupts
- leave
- ret
- endp
-
- and use it as external procedure in my TP program.
-
- What could be wrong with this?
-
- 2. I need to have an EXACTLY 64k-long array (say, 8192 of doubles).
-
- Type declaration will allow me to use only 8190 ($fff0 div 8) doubles.
- If I use MemAllocSeg function to allocate $FFFF bytes with Offset=0 and
- switch off range checking then I can address the 8192nd double and it will
- not jump over segment border.
-
- The question is: when I allocate $FFFF bytes, can it happen that the last
- byte in this segment (i.e. seg(myarray):$FFFF) will then be assigned to
- another variable (which will naturally crash the program)?
- How can I prevent it?
- Is it enough to set switch "Word allign data" to ON?
-
- Sincerely,
- Sorokin Zhenya,
- Vienna, Austria.
- Sorokin Zhenya
- Vienna, Austria.
-
-
-