Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making ASM libraries for QB
#1
How would I do it? I'm really lost here.
I'm using MASM 6.15.
I suppose I'd have to make the OBJs and then LIB and LINK them? If so, how?
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#2
You have to compile them using the MEDIUM memory model and the Pascal calling convention. I've never done that, so I guess more experienced posters will elaborate Big Grin
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#3
Hmm...Wouldn't we want the BASIC model specifier, not PASCAL?
Code:
.model medium, BASIC
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#4
I didn't even know that that existed. If you knew it, why did you ask? Tongue

All I know is that QB passes parameters using the Pascal "order". You have to declare your functions "pascal" in C if you want to write a library in C, I just thought it was the same with assembly.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#5
Well - maybe QB differs from "BASIC". :lol:
No, my question is mainly how do I turn my objs into a .qlb?
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#6
Still asking asm questions here? Smile
A qlb is only needed when you want to use the library inside the qb IDE. Otherwise you use .obj files directly when you link or .lib files which are just a collection of .obj files in one file. Using masm use this frame

Code:
.model medium, basic
                .386
                .code
                
mybasroutine    proc    public uses someregs,\
                        arg1:word,\
                        arg2:dword
                        
                local   mylocalvar:dword
                
                ;;
                ;; Code here
                ;;
                
                ret
mybasroutine    endp
                end

Then to create a .lib do this

ml /c myobj.asm
lib mylib +myobj.obj;

And to create a qlb do this
qb 4.5: link /q mylib.lib,mylib.qlb,nul,bqlb45.lib;
qb 7.1: link /q mylib.lib,mylib.qlb,nul,qbxqlb.lib;
vbdos 1.0: link /q mylib.lib,mylib.qlb,nul,vbdosqlb.lib;

The only thing that differs qb 4.x libs (not qlbs) to pds/vbdos libs is that the later uses far strings, so that's something you'll have to think about if you're building a lib for all of them. Atleast i think that's the only thing that differs them, i don't remember. But i'm pretty sure.
oship me and i will give you lots of guurrls and beeea
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)