Xref: utzoo comp.sys.ibm.pc.hardware:6895 comp.lang.pascal:5854 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!samsung!uunet!mcsun!hp4nl!rulway.LeidenUniv.nl!rulcri!vereijken From: vereijken@rulcri.leidenuniv.nl (Jan Joris Vereijken) Newsgroups: comp.sys.ibm.pc.hardware,comp.lang.pascal Subject: Turbo Pascal 6.0 code generation for 80286 Message-ID: <1991Mar26.010615.1@rulcri.leidenuniv.nl> Date: 26 Mar 91 00:06:15 GMT Sender: news@rulway.LeidenUniv.nl (Usenet news account) Organization: Leiden University Computer Centre Lines: 48 Nntp-Posting-Host: rulcr1 Hi, I have run into something very strange: under Turbo Pascal one can choose to generate specific 80286 code ($G+ switch). This code is not supposed to run on XT-like (8088/8086-based) machines. However, it seems to do... Facts: - My system is V30-based clone, using a BIOS called "PC-SPEED V1.50" (Actually it's a modified Atari ST, it runs about every MSDOS thing just fine. I am sure I have a V30, as I installed it myself.) - I compiled (for 80286) BGIDEMO.PAS, TCALC.PAS and a few (big) things I wrote myself. - The code generated DID differ from the "normal" code (for 8088). I checked this. The 80286-code is shorter, and is generated faster(!). - All the above programs ran like a charm on my V30 machine! - I did NOT benchmark the speed of the 8088 vs. 80286 code. (Actually I did, but then proclaimed my results unreliable). This is not supposed to happen! I want my machine to be locked up! I PAID for that (Borland manuals say it should lock up). I have given it some thought and have come up with the following: - Maybe a V30 (which is a enhanced 8086) can handle the 80286 instructions Turbo 6.0 generates? (Of course not ALL 80286 instruction, but maybe TP6.0 only generates a proper subset.) - Maybe I have a BIOS that catches the 80286 instructions and emulates them? (Is this possible somehow? I only have a limited 8086-machinecode experience.) - Maybe the programs I ran did in fact NOT function properly, but I did not notice? (Say again? Me not notice???) - Maybe I'm going crazy? (I'm not crazy! I'm a dictionary!) However, I still do not figure why things are as they are (a well-known concept when applied to life-at-large). Who sheds some light on the matter? Thanx! - Jan Joris - forchk@rullf2.LeidenUniv.NL vereijken@hlerul5.bitnet (P.S.: Reply to me personally too, as I do not subscribe to this list.)