BBS: Inland Empire Archive Date: 08-07-92 (18:25) Number: 160 From: BOB PERKINS Refer#: NONE To: JOHN GALLAS Recvd: NO Subj: Re: fossil help Conf: (2) Quik_Bas
JG> I need to do 18h and 19h (read block and write block) through a JG> fossil driver, but they require the setting of the ES flag, which JG> isn't in the normal RegType. Its only in the RegTypeX. but when JG> I use X it doesn't work.. Can someone post some code on how to use JG> those two? Well, it would have been easier if you'd posted what you have. Are you sure you are loading the registers properly? I haven't tested the code below but I think it should work. If not, well then maybe it'll give you the help you need. :-) For function 18h: '$include: 'qb.bi' dim regsx as regtypex text$="" instring$ = space$(256) 'initialize a little buffer port% = 0 'assign the port regsx.ax = &h1800 'load the function # into ah.. regsx.cx = len(instring$) 'number of bytes to get.. regsx.dx = port% 'set the port regsx.es = varseg(instring$) 'get segment of variable in es regsx.di = sadd(instring$) 'get offset of variable in di interruptx &h14, regsx, regsx 'call the interrupt if regsx.ax > 0 then ' text$=left$(instring$,regsx.ax) 'ax returns # of characters end if 'received.. For function 19h: '$include: 'qb.bi' dim regsx as regtypex outstring$="This is my output string" 'make our output string port% = 0 'assign the port regsx.ax = &h1900 'load the function # into ah regsx.cx = len(outstring$) 'how many characters to send regsx.dx = port% 'set the port regsx.es = varseg(outstring$) 'get segment of variable in es regsx.di = sadd(outstring$) 'get offset of variable in di interruptx &h14, regsx, regsx 'call the interrupt if regsx.ax <> len(outstring$) then 'if the number of characters print "Error!" '- sent is less that the length end if '- of the string then error. --- Msg V4.5 * Origin: Reciprocity Failure (1:124/4115.236)
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