[comp.sys.hp] Microsoft QuickBASIC incompatibility

ghull@raider (Gordon Hull) (07/05/88)

It looks like Microsoft has introduced a potentially dangerous, and certainly 
exasperating, undocumented incompatibility between QuickBASIC 2.x - 3.0 and 
4.0 regarding external assembly language routines.  Here's a quick rundown of 
the situation and my analysis of same: 
  
One of the modules of a program I'm working on uses an assembly language 
routine (that I wrote) to quickly side-scroll characters on the CGA medium 
res. screen (320x200, 4 color).  The routine is no big deal; it just computes 
some addresses and does a REPNZ MOVSW instruction for each scan line 
involved, with the direction flag cleared (forward move, for a left scroll), 
or set (backwards move, for a right scroll).  The routine appeared to be 
working fine under 3.0.  Then, several months later, as I was porting the 
module to 4.0, the right scroll suddenly and inexplicably caused the machine 
to crash.  Cold.  The left scroll still worked fine. 
  
I tried everything I could think of - recompiling the routine, re-linking it, 
and going over the code by hand several times.  I could not find a bug. 
Frustrated and confused, I tried the BLOCKMOVE routine in ADVBAS 3.4 and a 
QuickBASIC routine to accomplish the scrolling; again, the right scroll 
hung the machine and the left scroll worked (albeit slowly). 
  
Then, a flash of inspiration hit me.  I added a PUSHF instruction to the 
right scroll, and everything worked fine. 
  
The only conclusion that I can come to is that QB4 must have not have the 
direction flag set at the end of a machine language routine; it keeps it 
cleared and then doesn't bother to execute a CLD before its string moves. 
The manual, of course, says nothing about this. 
  
Has anybody else experienced the same problem? 
  
________________________ 
Gordon Hull 
  
   USENET: ghull@raider.UUCP 
   FIDO:   Gordon Hull at 1:116/12 
   USMAIL: Gordon Hull, 907 Kay St. Murfreesboro, TN 37130 
  
   FROM CommStuff IMPORT StdDisclaimer; 
________________________ 

---
 * Origin: Raiders Roost: Mid TN's FIRST FIDO<->UUCP GATEWAY ! (Opus 1:116/12)
SEEN-BY: 116/12

--  
     ______
    /     / * Middle Tennessee's FIDO<->UUCP Gateway *      (615) 896-7964
   /_____/   ___   o  ___   ___   ___          * Murfreesboro, Tennessee *
  /   \     /__/  /  /  /  /__   /__/        Bob Reineri - System   Operator
_/     \___/  /__/__/__/__/__ __/  \_        Mark Bailey - UUCP Project Mgr.
UUCP: !{ames,osu-cis,rutgers,decwrl,mit-eddie}!killer!raider  FIDO: 1:116/12

ken@hpclkms.HP.COM (Kenneth Sumrall) (07/26/88)

Hi there!  (  (c) Peter Gabriel :-) )

     I have a choice of two HP IPC's that I can take home, and in evaluating
which one was better, I compared the ROM revision numbers.  One of the ROM's 
was part number 00095-60006, Rev. A.  The other ROM was part number 82991A,
Rel. 5.0.   I don't know how to compare releases with revisions, or numbers
with letters, so I want to know which ROM is newer.  (I am inclined to think
that the Rel. 5.0 is newer, but I want to be sure)  

     Also, a program on the System Disk (Rel. 1.0.0) that comes with the IPC
called prep_sys is supposed to fix a bug in the disk handler, and a few other
small bugs.  This program works on the Rev. A ROM, but not on the Rel. 5.0 
ROM.  (The error message is wrong ROM version)  Does this mean that Rel. 5.0
fixed this bug? 

    Now for my final question.  I heard a rumor about a ROM upgrade that put
the csh and some other programs in the ROM.  Is this true? If so, where can
I get it  (i.e., what is the part number)  Thanks in advance!

Kenneth Sumrall
ken%hpclkms@hplabs.hp.com

P.S.  In case you don't know, IPC stands for Integral Personal Computer.
-------------------------------------------------------------------------------
|       I KEEP PITCHIN' EM, AND YOU KEEP MISSIN' EM!!  -Foghorn Leghorn       |
-------------------------------------------------------------------------------