Qbasicnews.com

Full Version: Error inserting ASM code!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!
I try to insert ASM code into QB, but nothing worked. I copied the sourcecode from this page I think it was tutorial 14, but all I get is this error:
subprogram not defined
Do I need to define that Absolute subprogram? Thank you!
meh? Post your source code.

CALL ABSOLUTE is not available by default in QB 4.5 and other versions, only QBASIC 1.1. It might work if you load qb with qb.qlb:

qb /lqb.qlb
Sorry! It was tutorial 13! Here is the sourcecode:
SCREEN 13
ASM$ = ASM$ + CHR$(&HB8) + CHR$(&H01) + CHR$(&H00)
ASM$ = ASM$ + CHR$(&HCD) + CHR$(&H33)
ASM$ = ASM$ + CHR$(&HCB)

DEF SEG = VARSEG(ASM$)
CALL ABSOLUTE (SADD(ASM$))

How can I execute ASM code with QB 4.1 and higher? Thank you!
load qb with qb.qlb attached, like in my previous post.

Then write this at the top of your program:
'$INCLUDE: 'qb.bi'