'===========================================================================
' Subject: CALLING ASSEMBLY ROUTINES          Date: Unknown Date (00:00)   
'  Author: Unknown Author(s)                  Code: MASM, TASM             
'  Origin: CALLING,ASSEMBLY,ROUTINES        Packet: ASMCODE.ABC
'===========================================================================
> I have a question.  What would be the best way to call an assembly
> routine from QuickBasic.  In other words, how would you declare it in
> the main module (QuickBasic), and how would you set it up in the
> assembly routine?


The best way is with Microsoft's MASM:

     DECLARE SUB Multiply(BYVAL Parm1%, BYVAL Param2%, Result%)

.MODEL MEDIUM,BASIC
.CODE
Multiply PROC P1:Word, P2:Word, Result:Word
     MOV  AX,P1
     MOV  CX,P2
     MUL  CX
     MOV  BX,Result
     MOV  [BX],AX
Multiply ENDP
END

With other compilers, set medium model and public:

.model medium
.public
.code
Multiply PROC
     MOV  AX,[BP+4]
     MOV  CX,[BP+6]
     MUL  CX
     MOV  BX,[BP+8]
     MOV  [BX],AX
     RET  6
Multiply ENDP
END
