BBS: Inland Empire Archive Date: 10-31-92 (20:54) Number: 399 From: ROBERT CHURCH Refer#: NONE To: ALL Recvd: NO Subj: My first assembly sub... Conf: (2) Quik_Bas
I need some help with the following function. It only works when it is passed Port% = 4 BYVAL. I only have comm ports 1 and 2. I assume the problem is in the passing of the argument. Thanks ;InitFOSSIL - initializes a fossil driver and returns either -1 for success ; or 0 for failure. ; ;DECLARE FUNCTION InitFOSSIL% (BYVAL Port%) .Model Medium, Basic .Code InitFOSSIL Proc, Port:Word Mov AH,04h ; we want function 04h, init fossil driver Mov DX,Port ; copy the Port to DX. Int 14h Cmp AX,1954h ; check to see if the fossil is there Jne NoGood ; if not, jump to NoGood Mov AX,-1 ; set AX to True Jmp Done NoGood: Mov AX,0 ; set AX to False Done: Ret InitFOSSIL Endp End [-=ROB=-] --- * Origin: Real programmers lick nine-volt batteries (FidoNet 1:105/330.3)
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