Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem "Out of Memory" while writing BBS door in
#21
Alright, I'm still working on this code, trying to get it to compile. I've gone back to the original QB4.5 environment since the others didn't seem to be all that helpful.

I'm including an updated zip file of my modularized work so far, if anybody wants to give it a shot at compiling, or just messing around with it. It's now at the point where it not only won't compile, but it won't run from the IDE, either!

http://www.wam.umd.edu/~ccb/3-22-Dng.zip

The contents of the new zip file are as follow:

Dungeon.MAK my working environment
Dungeon.BAS my main program
Dungeon.BI my basic include header with declarations

Battle.BAS \
Charactr.BAS \
Event0.BAS \
Event1.BAS \
Functs.BAS > my modules
Items.BAS /
Lists.BAS /
Spells.BAS /
UseItem.BAS /
UseItem2.BAS /

qb_edr.lib \
qb_edr.qlb / Easy-Door libraries

easydoor.BI \
easypara.BI \
easyansi.BI / Basic Include files for Easy-Door routines
autoBBS.BI /

Please if anybody can figure anything out, let me know. I've spent so much time on this program; I'd hate to see it wasted!

*peace*

Meg.
Reply
#22
So after modularizing the hell out of my original code, I tried giving up on the IDE for a few.

I compiled each individual BAS file into an OBJ file (11 in total), and then tried linking them into an EXE file and...

============================================

C:\QBASIC\>link @game.lnk

Microsoft ® Overlay Linker Version 3.69
Copyright © Microsoft Corp 1983-1988. All rights reserved.

Object Modules [.OBJ]: /EX /NOE /NOD:BRUN45.LIB DUNGEON+
Object Modules [.OBJ]: BATTLE+
Object Modules [.OBJ]: CHARACTR+
Object Modules [.OBJ]: FUNCTS+
Object Modules [.OBJ]: SPELLS+
Object Modules [.OBJ]: ITEMS+
Object Modules [.OBJ]: LISTS+
Object Modules [.OBJ]: USEITEM+
Object Modules [.OBJ]: USEITEM2+
Object Modules [.OBJ]: EVENT0+
Object Modules [.OBJ]: EVENT1+
Run File [DUNGEON.EXE]: DUNGEON.EXE
List File [NUL.MAP]:
Libraries [.LIB]: BCOM45.LIB+
Libraries [.LIB]: QB_EDR.LIB
QB_EDR.LIB(TEMPEDR2.BAS) : fatal error L1070: BC_CN : segment size exceeds 64K pos: 2DCC Record Type: 98

C:\QBASIC\>

============================================

The link script is borrowed from a tutorial written by Na_th_an I stumbled across online. I'm not sure if I got that first line right.. is all that command line stuff supposed to be in the first entry of "Object Modules" like that?

Anyhow, as you can see, there is some progress. All the OBJ files were compiled individually without running out of memory, which is better than before. But now it looks like it's running out of memory while linking the Easy-Door library into my EXE.

What I'd really love to do is find some way of reducing the subs/functions/routines in the qb_edr.lib file so that it only includes ones that it NEEDS and ones that my program USES. There's like thirty routines in there that I simply am not using which may be taking up unneeded space.

Any tips/suggestions?

*peace*

Meg.
Reply
#23
Well, I was gonna post the OBJs right now. I am getting problems with that LIB, 'cause it is near 100 Kb ... Do you need all the functions in the *.LIB?

I had to do two corrections, 'cause there was a parameter missing in one function and an expression too complex in another one. I failed LINKING as well...

I looked at the size of all the OBJs together... they are almos 400Kb! and the LIB is almost 100Kb!!! I fear that LINK.EXE can't cope with that...

Let me use another linker.

[LATER]

Hmmm - Tried linking with BORLAND C 3.2 and I get _THE SAME ERROR_ ... Hrmmm ... Maybe I should try yet another linker.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#24
and it wasn't much help. It says you're getting the error because a single "segment" contained more than 64K of code or data, sort of the same problem you were having with the compiler. It recommends a solution of compiling and linking with the large memory model. However, QB isn't supposed to have the option of allowing more than one memory model (and I think it's the *huge* one). I think what's going on is that the LINK.EXE that comes with QB is really a generic linker, not necessarily associated with just QB, and the error messages in my manual are for all possible messages that LINK.EXE might generate, regardless of where the compiled code came from. (I suspect you aren't supposed to get that error message when linking QB programs and the fact that you are means that something's just really wrong that's causing a problem that this particular usage of LINK.EXE isn't supposed to see happening. I'd download your code and see what I can do but I'm working 6 days a week (and they aren't necessarily 8-hour days), and I just wouldn't want you to get your hopes up that I'm going to come up with something for you anytime soon.)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#25
Yes I found the two errors, also. For anyone else, they are:

======================================
in module [USEITEM2.BAS], SUB Game.UseItem2:

SUB Game.UseItem2(n, spot)

should be

SUB Game.UseItem2(n, spot, dropme)
======================================

and

======================================
in main program [DUNGEON.BAS], SUB Game.Pause:

SendCR " " + mes$

should be

<code breaking mes$ into mes1$+mes2$+mes3$>
Send " "
Send mes1$
Send mes2$
SendCR mes3$
======================================

Na_th_an, I do *NOT* need all the functions in qb_edr.lib!! I thought that might be a big problem, too. The file size of qb_edr.lib is 98,473 bytes! There are so many subs/function/routines in that library that I don't use at all in my program, but I don't know how to make a LIB file that only has the ones I need.

I've tried running Cresent's MAKEQLB program, which is supposed to do just that, and I get this as output:

======================================
.
.
.
PAUSECLOCK was DECLAREd but not used.
PURGEINBUFFER was DECLAREd but not used.
PURGEOUTBUFFER was DECLAREd but not used.
RESUMECLOCK was DECLAREd but not used.
SENDBELL was DECLAREd but not used.
SENDFILE was DECLAREd but not used.
SENDLEFT was DECLAREd but not used.
SENDMENU was DECLAREd but not used.
SENDMENUSTRING was DECLAREd but not used.
SENDRIGTH was DECLAREd but not used.
SENDRIP was DECLAREd but not used.
SENDTXT was DECLAREd but not used.
SETUSERGRAPHTYPE was DECLAREd but not used.
SPECIALCLS was DECLAREd but not used.
STATUSBAR was DECLAREd but not used.
STATUSPRINT was DECLAREd but not used.
TASKERSLICE was DECLAREd but not used.
TIMEKEYS was DECLAREd but not used.
TIMEOUT was DECLAREd but not used.
WAITOB was DECLAREd but not used.
Creating temporary file: `ChrisMay.obj'.
Error 64 occurred in module MAKEQLB at address 0535:1120
======================================

There's supposed to be another program called PREQLB--made by a company called MicroHelp--that does something similar. However, I've been unable to find it anywhere.

*peace*

Meg.
Reply
#26
Do you mean those are the unused functions?
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#27
By the way, in case you're wondering:

1. I have no idea what 'ChrisMay.Obj' is, but it certainly isn't created anywhere on my computer.

2. ERROR 64 usually means File Not Found, doesn't it?

3. You can get MAKEQLB at this link:

http://www.mirror.ac.uk/collections/hens...%5Bpeek%5D

*peace*

Meg.
Reply
#28
Well I got it to compile too, but no linkie Sad

Here's a list of the errors I got trying to link it...
Reply
#29
Again, which are the unused functions? I could try and tear them from the big LIB.

Or better - Gimme a list of USED FUNCTIONS, so I tear every OBJ file which doesn't contain any of your used functions/subs.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#30
Na_th_an,

Yes, I believe that MAKEQLB generates a big list of routines contained in the input LIB (qb_edr.lib, in this case) that are declared but never called. What you're seeing there is just the tail end of the list, along with an error message at the bottom.

-------------------------------------------------------------------

Plasma357,

I have no idea how you got that many error messages while trying to link. I get just the one. Did you include the qb_edr lib while linking?

*peace*

Meg.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)