BBS: Inland Empire Archive Date: 02-03-93 (09:03) Number: 368 From: JERRY HUNTER Refer#: NONE To: IAN MACLENNAN Recvd: NO Subj: Help on interrupts. Conf: (2) Quik_Bas
> I can use some, but I seem to be unable to acess ones > that use such registers as AH, BH, AL etc. > This is really troubleing me as I am unable to use many > interrupts. Any help would be appreciated. As you well know, AH and AL are the high and low-order bytes of AX. The same applies to BH/BL, etc. Simply convert your AH/AL values to hex (HEX$), and slam 'em together to build the combinant AX. Use CALL INTERRUPTX to pass 'em as you would an interrupt call which uses the NORMAL AX,BX, etc. The following is an example of how I use INTERRPUTX... the following snippet of code transmits a block of characters to a fossil driver (e.g. X00.SYS). It is assumed in this block of code that the fossil has ALREADY been initialized... TYPE RegTypeX AX as Integer BX as Integer CX as Integer DX as Integer BP as Integer SI as Integer DI as Integer FLAGS as Integer DS as Integer ES as Integer END TYPE DEFINT A-Z SUB Export(OutEm$,PortNum) DIM Inreg as RegTypeX, OutReg as RegTypeX InReg.AX = &H1900 ' *** AH = 19, AL = 00, function to X00 InReg.BX = 0 ' *** BX = UnUsed InReg.CX = len(OutEm$) ' *** CX = length of string to send InReg.DX = PortNum ' *** DX = fossilized port to output InReg.BP = 0 ' *** BP = UnUsed InReg.SI = 0 ' *** SI = UnUsed InReg.DI = VARPTR(OutEm$) ' *** DI = TXBufVar Offset InReg.FLAGS = 0 ' *** FLAGS = UnUsed InReg.DS = 0 ' *** DS = UnUsed InReg.ES = VARSEG(OutEm$) ' *** ES = TXBufVar Segment CALL INTERRUPTX(&H14,InReg,OutReg) ' *** just DO it *** END SUB Hope this helps... Regards, J.Hunter --- GEcho 1.00/beta * Origin: DarkStar - QB45 Comes ALIVE! - (501) 631-5976 (1:391/2090)
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