fossil help

 BBS: Inland Empire Archive
Date: 08-08-92 (07:03)             Number: 153
From: LUIS ESPINOZA                Refer#: NONE
  To: JOHN GALLAS                   Recvd: NO  
Subj: fossil help                    Conf: (2) Quik_Bas
On (05 Aug 92) John Gallas wrote to All...

 JG> I need some help with using a fossil with QB!  I posted a message
 JG> idaknow how
 JG>  long ago (probably last week) but nobody replied.  I don't know if
 JG> that
 JG>  because the message didn't get out or cause noone knows!  But I'm
 JG> feeling
 JG>  whiny so I'll ask again..  I need to do 18h and 19h (read block and
 JG> write
 JG>  block) through a fossil driver, but they require the setting of the
 JG> ES flag,
 JG>  which isn't in the normal RegType.  Its only in the RegTypeX.  but
 JG> when I use
 JG>  X it doesn't work..  Can someone post some code on how to use those
 JG> two?
        I don't remember seeing this post. But I got some code for ya:


'*  FossilGetb()
'* '* Gets a buffer of charactes from a given port and returns the number '* of characters actually received. '* '* Note: The string passed MUST!! have space available for the number '* of characters requested. '* '* Usage: A$ = SPACE$(256) '* X = FossilGetb(COM1 ,A$, 256) '* FUNCTION FossilGetb% (Port%, Buffer$, Length%) DIM InRegsX AS RegTypeX, OutRegsX AS RegTypeX InRegsX.dx = Port% = &H1800 ' FOSSIL Service 18h = Length% ' CX = Characters to get = VARSEG(Buffer$) ' ES = Segment of Buffer$ InRegsX.di = SADD(Buffer$) ' DI = Offset of Buffer$ InterruptX 20, InRegsX, OutRegsX FossilGetb% = END FUNCTION '* FossilGetch() '*
'* '* Gets a character from a given port. '* '* Note: You must check for data available before calling this '* functions, as it will wait forever for a given byte. '* FUNCTION FossilGetch$ (Port%) DIM InRegs AS RegType, OutRegs AS RegType InRegs.dx = Port% = &H200 ' FOSSIL Service 02h Interrupt 20, InRegs, OutRegs FossilGetch$ = CHR$( END FUNCTION --- PPoint 1.33 * Origin: The Rubber Room (1:207/213.5)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET