Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Does this exist, and if not, is it possible?
#11
Quote:So when is the next ver comming?

And finish your site. We need a new Nemesis QB. :*)

Sometime this summer probably...and I'm working on the site every day. Tongue

http://www.phatcode.net/other/qb4med.zip
Reply
#12
Can you extract individual procedures from an obj file?

And if that is impossible can't you do like this:
In .BAS file (i know about : splitting it up, this is for example purpose only):
MyLib:MyFunc a,b,c$
g%=OtherLib:OtherFunc(i%,b$,c&)

And then you have a folder containing ASM files (or whatever) like this:
MyLib.asm (or whatever)
OtherLib.asm

And in them you have MyFunc and OtherFunc.
You compile AND rename them to obj files, parse everything so each procedure has it's own ID (No point in keeping it readable by humans at this time as this is for the compiler only)

So you have:
in .bas:
AHGB56 a,b,c$ 'MyLib:MyFunc
g%=I55THJN3(i%,b$,c&) 'OtherLib:OtherFunc

and then you compile the .bas and link with the new lib (or individual obj files, whatever)


That way you could just specify the language the external file is written in and then call it as a lib.
MyLib.ASM:MyFunc
MyLib.C:MyFunc
MyLib.whatever:MyFunc

Just include a compiler/linker for each language you want to support.

This would be easy and fast as you don't have to write the function compile it merge it start qb with the new lib test it, only to see it doesent work. Now you just specify it, test it, rewrite it until it works. All that's needed is a simple notepad IDE with run/compile/link support for basic, asm and whatever.

*frustrated* I want this, but don't know how to do it in detail.
Reply
#13
Well, of course it's *possable*, but...are you gonna do it skippy?

There are several reasons why no one else will...

The realmode reasons:

a) Realmode is dead, but aside from that...

b) To keep executable sizes down, programmers just make it so only related functions are in a given object module. That way, if they need the printer module, they don't get the com port, terminal, disk, cdrom, fpu, etc, etc, etc with it.

c) Linkers will not link in modules in a library that aren't used, they are that schmart you know.

The flat/protected mode reasons:

a) You got tons of memory who cares? (personally, I hate this reason, but 99.9% of developers use this reason)

b) To keep executable sizes down, programmers just make it so only related functions are in a given object module. That way, if they need the printer module, they don't get the com port, terminal, disk, cdrom, fpu, etc, etc, etc with it.

c) Linkers will not link in modules in a library that aren't used, they are that schmart you know.

So, it seems to me that the solution is...just change your programming style ;P


You should take the time to look at what QBMCX and BPP do. They both allow you to do basically what you said, but within the scope of how compilers/assemblers and linkers work.
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Reply
#14
I'm using qbmed right now actually, it's nice, but not what i meant.


Recomend a good and easy to learn asm compiler (that can generate obj files to be linked with qb) and I'll do it.

The only problem is, I don't know enough asm. In fact, I don't know any asm at all (well, i know some basics, but I couldn't make anything in it if my life depended on it)

What I want is the ability to call a file as a library, like I said in my previous post.
AFile.asm:AFunc i,b,r
t=OtherFile.asm:OtherFunc(u,o)

The when you run/compile you first compile the used asm files and link their obj's to your program.

That way, if you find an error in one of your asm modules or just want to change it, you just do. You don't have to edit it, compile it, link it to a lib, reload qb with the new lib, test it again. You just edit it, go back to (whatever IDE) and test it with your .bas file.


It's not memory issues I have, it's just I find this to be a smart idea, and if realmode is so dead, why are you using QB?
Reply
#15
Quote:Recomend a good and easy to learn asm compiler (that can generate obj files to be linked with qb) and I'll do it.

MASM, TASM, NASM ;P

Quote:The only problem is, I don't know enough asm. In fact, I don't know any asm at all (well, i know some basics, but I couldn't make anything in it if my life depended on it)

Yeah, I had the problem a few years ago, all you need is practice and a good book. Check your local library.

Quote:What I want is the ability to call a file as a library, like I said in my previous post.
AFile.asm:AFunc i,b,r
t=OtherFile.asm:OtherFunc(u,o)

The when you run/compile you first compile the used asm files and link their obj's to your program.

That way, if you find an error in one of your asm modules or just want to change it, you just do. You don't have to edit it, compile it, link it to a lib, reload qb with the new lib, test it again. You just edit it, go back to (whatever IDE) and test it with your .bas file.

Well, there is nothing like that for DOS (well, PWB, but it's not that great). Your best bet is to use a Win32 based IDE (Ultra Edit 32 or Visual SlickEdit are good choices) and create a batch file to do the compiling for you.

I don't know about 'qbmed', but QBCMX and BPP will compile basic modules specified in them. It would only take a couple minutes to add support for C and assembler modules.

Quote:It's not memory issues I have, it's just I find this to be a smart idea, and if realmode is so dead, why are you using QB?

Actually, I don't anymore. I use QB to test a couple things now and then only because VB6 takes longer to load then a command prompt and QB.

True, I did enter the QB Competition at http://qbasic.tk, but that doesn't count ;P

Take a quick look at BPP/QBCMX (again, dunno about 'qbmed') and using a Win32 editor. You will find that coding major QB projects is a breeze using this method.
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Reply
#16
As soon as I get a new release of Novix out I'm gonna look into it.

You still don't understand what I mean 1000101...

In QB you can do:
'$INCLUDE: 'other.bas'

And you can use modules so you can access their functions/subs.

I want to do something like this:
You have 2 ASM files, they both contain a number of functions/subs designed for QB
They are named: File1.ASM and File2.ASM

In your .BAS file you go (and i know about the colon, it's just an example):
File1.ASM:SubInASMFile
t%=File1.ASM:FunctionInFile
t%=t%+File2.ASM:FunctionInFile2(alpha, beta&, gamma$)
PRINT t%

This is in an other IDE than QB ofcourse.

Then you hit F5 it does this:
Go through the code to find all external files (the *.ASM ones) and remove the file identifier so File1:MySub becomes MySub

It finds File1.ASM and File2.ASM.

It uses an ASM compiler to create OBJ files from them.

Then you compile your .BAS file and link it with the obj files generated from file1.asm and file2.asm.

Now you have an EXE

If there is any error you just edit the ASM files (if it's htere the error is located) and hit F5 again.

No need to compile the asm files manually and link them/merge them to a library and reload qb with the new lib.


And NO I don't want a 32bit environment, and I find that making large projects in QB isn't all that hard... I'm working with a 120k+ code right now.
Reply
#17
Before telling me I don't know what my own program and a very similar program does, shut the hell up, read my post and actually look at what they do.

They do exactly what you want if you would take the time to look at them.

And the reason I suggested Win32 IDEs is because they provide a hell of a lot more then any DOS IDE. Visual SlickEdit + BPP/QBMCX does exactly what you want if you would take the time to look at them instead of repeating yourself when you've been given the answer.

Further, I'm not talking about large (120K+) projects, I'm talking about *complex* multi-module (6+) projects.
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Reply
#18
I have looked at BPP and QBMCX, it is NOT what I wanted. Yes you can include individual .BAS files and specify lib's in the source.

I am listening to what you say, no need to get all mad. I just said it's not what I wanted, and then I tried to explain again.

If you can include non-compiled asm files with BPP and/or QBMCX please tell me how? (Cause I can't find it) Instead of just telling me: They can do that!.

I never said you don't know your own program, I just said it doesent seem that you understand what I mean. And if you don't then it's my error for not explaining it clearly.

Did I make you upset over something, then please tell me what I did, maybe I'm not explaining clearly or something, but don't tell me to shut up.

Read what I want, then tell me if BPP/QBMCX can do that, if they can please tell me how, because I, as I've said, can't find it.
Reply
#19
Z!re you are correct. You cant include *.ASM files in either of the two programs.

1000101: read his post carefully. IMO he hasnt written anything that should offend you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)