Announcement

Collapse
No announcement yet.

PB 2.1 "Too Large" error

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • PB 2.1 "Too Large" error

    Hi, this is my first post. Had a search for a solution, but no success.

    Way back in the days of yore (mid 80s), I had an accounting business & writted me own progs.

    Now, at the age of 74, I am re-living my prowess and messing about with BASIC again. :wavey:

    I have tried to load my main accounts code into PB, and get the error :-

    "TOO LARGE - TRUNCATE? (Y/N)"

    Smaller code files load OK.

    I have XP Pro, and assume that the system does not allocate enough space. My laptop with Vista & DOS (?emulator?) "DOS Box" runs PB OK, but I get the same error message.

    My accounts progs are at www.CIAccounts.com if you wish to see them.

    I hope that before I "kick the proverbial" that I will be able to mess about with my progs again.

    ATB

    Ted
    Last edited by EDWARD C AYLWARD; 18 Feb 2008, 02:33 PM. Reason: Looking for notification icon - OK - thanks

  • #2
    If you mean loading the source code gave that message.....

    I never got that message, but I'll guess the PB/DOS editor has a filesize limit.

    I'd definitely say NO to "truncate" (Because I have no clue what the IDE editor will do with it) and exit, then I'd try to break up that source file into at least two pieces, and $INCLUDE the second piece. You can edit with notepad or anything else you are comfy with.

    But if you mean trying to load (run) the executable, then I'm not surprised because these "Windows MS-DOS sessions" usually aren't tuned to provide maximum memory like we all had our MS-DOS machines tuned to do by using things like "lh" (load high) in our autoexec.bat file, or by NOT loading all available drivers.

    If the problem only occurs when you are trying to run from the IDE, the solution is easy: Don't do that. Compile to EXE and run the EXE from the command line.

    If the problem is running that EXE from the command line...... I think there is a way to "tune" the MS-DOS environment to get more memory, but I'm not up on that and someone else will have to help you.

    However, if we are at this worst-case scenario, I'm not sure I would count on my users being able to tune their MS-DOS environment, and I'd suggest its time to look at CHAINing to reduce the amount of memory required at any one time.

    MCM

    Comment


    • #3
      Thanks

      Thanks, Michael.

      Yes it was in loading the source code into the compiler.

      Are you running XP?

      A while back I answered "Yes" to "Truncate?" using a dummy file. and you're right, it just loaded a part of the file. About two thirds of it.

      With Windows98, I could load it all in OK. Wonder what the difference is with subsequent versions of the OS?

      As I'm doing it for fun, no probs .... different story if my living depended on it!!!:laugh:

      I saw that it is poss to compile the code in two parts, and use a $ statement to allow them to run as one. Never done that .... and not likely to? Unless I get really bored.

      I'm interested in if we get an answer as to why Win98 was OK, and XP is not. After all, I wrote it all as it is now. It does seeem that the XP OS affects how the code is loaded?

      All execise for the grey matter ... !

      You'll have a laugh at this! I get lost with $ statments & "load high" etc, yet I'm the proud author of a prgramming book published by IMS! How simple thing were in those rosy yesterdays? :shhh:

      Thanks again,

      Ted

      Comment


      • #4
        >I'm interested in if we get an answer as to why Win98 was OK, and XP is not

        Here's how you get your answer...
        From command prompt in either O/S..
        Code:
        C:\> mem /c
        That will tell you how much memory is available for user programs. I have forty-seven cents says there is way less with the XP machine.

        here's what I get on my Win/XP machine
        Code:
        Microsoft Windows XP [Version 5.1.2600]
        (C) Copyright 1985-2001 Microsoft Corp.
        
        C:\Documents and Settings\Michael>mem /c
        Conventional Memory :
        
          Name                Size in Decimal       Size in Hex
        -------------      ---------------------   -------------
          MSDOS              12080      ( 11.8K)       2F30
          KBD                 3296      (  3.2K)        CE0
          HIMEM               1248      (  1.2K)        4E0
          COMMAND             3728      (  3.6K)        E90
          FREE                 112      (  0.1K)         70
          FREE              634720      (619.8K)      9AF60
        
        Total  FREE :       634832      (620.0K)
        
        Upper Memory :
        
          Name                Size in Decimal       Size in Hex
        -------------      ---------------------   -------------
          SYSTEM            184304      (180.0K)      2CFF0
          MOUSE              12528      ( 12.2K)       30F0
          MSCDEXNT             464      (  0.5K)        1D0
          REDIR               2672      (  2.6K)        A70
          DOSX               34848      ( 34.0K)       8820
          FREE                 912      (  0.9K)        390
          FREE               26272      ( 25.7K)       66A0
        
        Total  FREE :        27184      ( 26.5K)
        
        Total bytes available to programs (Conventional+Upper) :      662016   (646.5K)
        Largest executable program size :                             633776   (618.9K)
        Largest available upper memory block :                         26272   ( 25.7K)
        
           1048576 bytes total contiguous extended memory
                 0 bytes available contiguous extended memory
            941056 bytes available XMS memory
                   MS-DOS resident in High Memory Area
        
        C:\DOCUME~1\Michael>
        A 619 Kb user program is pretty good size. BUt as you see I have MS-DOS resident in high memory area, which frees up that 34 K for user programs.

        The PB/IDE probably "tried" to load it all, but discovered it just could not get enough memory, and decided to give you that "truncate" option.

        As I said before, you may end up tuning your DOS settings to accomodate your source file size, but using $INCLUDE files is a perfectly fine way to write and edit your code. Just make one of the files all the stuff which never changes (eg formatting functions, file access functions, etc) and you won't even notice.

        MCM

        Comment


        • #5
          Many thanks, again, Michael.

          As I said, I only had another go at the progs because I found the "DOS-Box" emulator.

          I have just beeen having a look at the progs & code that I have saved, and am completely confused!!

          I have not looked at the progs for some years. I now find that I am going to re-trace my steps to remind myself of the accounts system. Might even do the training module on the www.CIAccounts.com site. That will really test my brain!

          If I take the plunge, how do I set the memory to give me more space for PB? I'll see what I have got with your command line query.

          I am so grateful for you giving your time to an ol' duffer! :laugh::laugh:

          ATB

          Ted

          Comment


          • #6
            Old MS-DOS'ers never die, they just get swapped out.

            Comment


            • #7
              Hi, Michael.

              I think that I am going commit "sausage fried".

              I'm so amazed at the knowledge that I have lost. After all, I was writing bits & pieces for cp/m before Bill Gates was born. (Who wants DOS???:wavey

              I have forgotten my command line syntax. Had a job remembering the print to file command >c:\filename.txt

              The laptop (Vista) would not let me put a file to c:\ I had to go to a subdirectory!!!!!!! Also would not let me change a config file in DOS-Box until I changed the permissions. I suppose that it is safety first.

              The desktop (XP Pro) accepted it OK .... what a life!!!!

              Anyway, if it is any use here is what I got. Does it tell you anything?
              Can I do anything useful to get PB to accept bigger files ...128KB?

              Ted

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

              DESKTOP XP PRO

              FREE 1184 ( 1.2K) 4A0
              FREE 626576 (611.9K) 98F90
              Total FREE : 627872 (613.2K)
              Upper Memory :
              Name Size in Decimal Size in Hex
              SYSTEM 180208 (176.0K) 2BPFO
              MOUSE 12528 ( 12.2K) 30F0
              MSCDEXNT 464 ( 0.51<) 1DO
              REDIR 2672 ( 2.61<) A70
              DOSX 34848 ( 34.01<) 8820
              FREE 1152 ( 1.11<) 480
              FREE 30128 ( 29.41<) ?
              Tota1 FREE : 31280 ( 30.51<)
              Total bytes available to programs (Conventional+Upper) :659152 (643.7
              Largest executable program size :626576 611.9
              Largest available upper memory block :30128 29.4
              1048576 bytes total contiguous extended memory
              0 bytes available contiguous extended memory
              941056 bytes available XMS memory
              MS—DOS resident in High Memory Area

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

              LAPTOP VISTA
              Conventional Memory :
              Name Size in Decimal Size in Hex
              ------------- --------------------- -------------
              MSDOS 12032 ( 11.8K) 2F00
              KBD 3360 ( 3.3K) D20
              HIMEM 1248 ( 1.2K) 4E0
              MOUSE 12528 ( 12.2K) 30F0
              COMMAND 3760 ( 3.7K) EB0
              MSCDEXNT 352 ( 0.3K) 160
              REDIR 2176 ( 2.1K) 880
              DOSX 34832 ( 34.0K) 8810
              FREE 112 ( 0.1K) 70
              FREE 944 ( 0.9K) 3B0
              FREE 583728 (570.0K) 8E830
              Total FREE : 584784 (571.1K)
              Total bytes available to programs :584784 (571.1K)
              Largest executable program size : 582752 (569.1K)
              1048576 bytes total contiguous extended memory
              0 bytes available contiguous extended memory
              941056 bytes available XMS memory
              MS-DOS resident in High Memory Area
              Last edited by EDWARD C AYLWARD; 19 Feb 2008, 10:54 AM. Reason: Sorry ... the info is not formatted .. is in the file!

              Comment


              • #8
                Desktop XP:
                Largest executable program size :626576 611.9

                Laptop Vista:
                Largest executable program size : 582752 (569.1K)


                That tells me a lot. Like, on your laptop you have 42 Kb less memory available to your programs... programs like, let's say, the PB/IDE.

                And when you load your progam source file, your IDE must require somewhere between 561 and 611 Kb. (that's the IDE itself plus the size of the file to be edited).

                Meaning.... it's time to get used to using $INCLUDE files if you intend to develop on your laptop
                ---OR ---
                It's time to ediit your programs with something else, and use the command-line compiler 'pbc.exe' to compile
                --OR---
                Hope someone here can tell you how to get more memory available to your MS-DOS programs on your laptop.

                MCM

                Comment


                • #9
                  You're gr8, Michael,

                  I'm beginning to regret opening my "can of worms"!

                  I haven't used pbc.exe, but at one time did use $include & the chain statement. I'ts such a long time since I did any serious programming. I did start on a prog to solve Suduku, but gave up!

                  I remember that I did split the big prog into smaller modules & accessed them via a Menu prog. I think that these are the progs I have on the site. Snag is, I can't find the source code for the split modules.

                  This afternoon, I have pulled out my old CD backups from 2001 to back track and get my thoughts in order. Tho' with 'secondary senile dementia' :laugh::laugh: I have a struggle!

                  It has been a gr8 boost to my self esteem to get this far.

                  What I'll do is settle down for a couple of days & try to recollect the stages I went thro'.

                  As a matter of interest the progs started on a Dragon 64, then on to an Atari 1040, then a PC with DOS 3.1, then Win95 with Windows 3.11, then Win98, then WinXP, and now Vista. Not bad since 1986!! What Ho!

                  BTW ....... what is IDE ..... I'm sure I must know!!

                  Eternally gr8ful,

                  Ted

                  Comment


                  • #10
                    Oh, boy!:tongue:

                    Hi, Michael,

                    Had to get this off my chest ...

                    An hour ago I settled down to listen to some oldies on the radio ...... but, just could not settle ....

                    I had to remember how I split the big prog into small ones, for my final set-up. So went on the computer.

                    I had the .exe files but could not find the .bas files. Sorted on c: drive no good. The penny dropped & I looked at the dates on the .exe files. This was April 2003. I always did a monthly back-up to CD. Found the CD, and hey presto there were the .bas files ......! :laugh::laugh::laugh::laugh:

                    What I had not done was to transfer the files from the working folder that I was using to split the big file, to the main folder after completion.

                    I am the most fastidious backer-upper you could meet. With me it's belt, braces & a bit of string.

                    Copied the files to their correct folder from the b/u CD, and then to the laptop - Vista - and loaded them into DOS-Box and PB, and all run OK. So I have now regained full control of my 'baby'!

                    What a palaver it has been. Tho' a comfort to know that my analytical abilities are still there ...... (Don't tempt providence, Ted!)

                    The interesting thing to remember is the fact that in Win95 & 98 I could load the big source file, but that after the OS changed, and I had to split the file.

                    It has been most helpful to have someone to spark off.

                    As I say ...... many thanks,

                    Ted

                    Comment


                    • #11
                      New Beast, same teeth
                      OR
                      New Beast, New teeth

                      As a matter of interest the progs started on a Dragon 64, then on to an Atari 1040, then a PC with DOS 3.1, then Win95 with Windows 3.11, then Win98, then WinXP, and now Vista. Not bad since 1986!! What Ho!
                      Just goes to show over the years you have been able to "Grow-Adapt" - "Grow-Adapt" which In My Opinion is quickly becoming a "Lost Art"

                      Kinda like kids these days are forced to use calculators to do math (My day you were not allowed to bring them things in and turn upside down using "7734"), and even farther back (if pressed my Dad would kill me if I don't remember the basics of a slide-rule or pencil and paper) and now I find kids that can not add $3.20 + $4.80 = $8.00 (or if I change up $3.19 + $4.81 = $8.00, somehow that REALLY screws them up) without a calculator

                      Core point is...."Unless you can do the basics, you can NEVER understand how the tools you use actually work" and in my mind "Without Tools" you are at the mercy of who-ever told you the answer was correct

                      OBTW..DOS is NOT Dead, it lives on in "Command-Line"
                      Engineer's Motto: If it aint broke take it apart and fix it

                      "If at 1st you don't succeed... call it version 1.0"

                      "Half of Programming is coding"....."The other 90% is DEBUGGING"

                      "Document my code????" .... "WHYYY??? do you think they call it CODE? "

                      Comment


                      • #12
                        Hi, Cliff.

                        I agree. How many youngsters can do long division maually?

                        I did my training with a "slip stick"! In 1968 were knocked over when we bought a programable calculator with !TWO! yup .... !TWO! memories!!:laugh::laugh:

                        As you may have read, I'm an 'oldie' on my way out, but the early learning & training does stick in the ol' grey matter.

                        You talk about calculating with dollars (metric), we had to deal with, "I buy 17 books for £3:12:7 [three pounds, twelve shillings & seven pence]. How much did I spend?" Pounds in units - shillings in twenties - pennies in twelves!

                        You have to understand why 3 times 6 equals 18 (!most times! hehe)

                        My gripe with the DOS memory allocation is that I started with the Dragon with six modules, and gradually merged them into one prog with Windows 3.11. Then it was downhill, and I had to split them back to four modules.

                        Another is that the Lprint is a bugger. I put the output to .txt files for Notepad. But, in the end you have to move on and learn VB.

                        I'll be passing the time resurecting my "baby". If anything interesting happens, I'll post it.

                        So long, mate. :wavey:

                        Ted

                        Comment


                        • #13
                          No... not exactly.

                          Actually, in the end, you probably have to consider learning to use a 32-bit Windows compiler. And the perfect match for you is probably the PowerBASIC Console Compiler 4.0.

                          Virtually unlimited memory. PRINT to any printer (USB, etc.). You can even print in color with graphics. Much faster execution speed. Arrays with millions of elements. Strings with millions of characters. New features that will amaze you! {smile}

                          Yet you still use familiar functions like PRINT, LOCATE, LINE INPUT, COLOR, etc., just like your 18-year-old DOS compiler. Unlike VB, the learning curve is practically zero. The rewards are substantial.

                          Check out all the details at:

                          http://www.powerbasic.com/products/pbcc/

                          Best regards,

                          Bob Zale
                          PowerBASIC Inc.

                          Comment


                          • #14
                            Many thanks, Bob.

                            As you will realise PB 2.1 earned me a bit of cash a couple of decades ago. I think that I did have Borland Turbo Basic before PB. I expect that it's on a floppy somewhere!

                            I'll have a look at the link. I am retired now, so have no professional motive to update. My mental faculties do need a boost ....... "If you don't use it, you lose it!"

                            I did try to learn VB, but was not up to it. If PB 4.0 takes in my current source code, it could provide me with an incentive to go that extra mile.

                            Congrats to your team ..... (A couple of decades late!)

                            ATB

                            Ted

                            PS Bob, had a look at the link, and I'm very interested. Two queries.

                            1. I don't have a receipt. I have looked for a licence number. Is there one on the PB prog?

                            2. As I am working with both an XP DT & Vista LT, can I load it onto both?

                            Thanks, Ted
                            Last edited by EDWARD C AYLWARD; 20 Feb 2008, 01:21 PM. Reason: Added thoughts

                            Comment


                            • #15
                              Hi Ted,

                              Fwiw, They still had my info on file from when I was with Brookhaven National Laboratory 10+ years ago...

                              And as for the console compiler (Bob and Co take note) the (re) learning curve has been virtually zero (zip, nada, you get the picture). And I'm not even using any of the other editors which are talked about here.

                              I'll look at those *after* I've got DDT down (and have had time to skim my Windows SDK stuff)

                              It's been fun diving back in.

                              John, Hypnotherapist Extraordinaire, NLP Trainer,
                              and Full Time Grad Student in Clinical Psychology
                              ---------------------------------------------------
                              John Strasser
                              Phone: 480 - 344 - 7713
                              http://www.inthespiritmarketing.com
                              http://www.lifetranscendent.com
                              John,
                              --------------------------------
                              John Strasser
                              Phone: 480 - 273 - 8798

                              Comment


                              • #16
                                Bloody Nora, John!

                                fwiw?????? Oh! "For what it's worth" ... new one for me hehehe :laugh::laugh:

                                Where did you spring from?

                                Sorry, I don't know what a DDT & SDK is [are]!

                                "John, Hypnotherapist Extraordinaire, NLP Trainer,
                                and Full Time Grad Student in Clinical Psychology"

                                You're looking cleverererer than me is .... can't have that, ol' mate!

                                Nice to hear from you.

                                ATB

                                Ted

                                Comment


                                • #17
                                  Is it the file that is too large or a line/lines? I know the new IDEs will trunicate/wrap long lines...
                                  sigpic
                                  Mobile Solutions
                                  Sys Analyst and Development

                                  Comment


                                  • #18
                                    > know the new IDEs will trunicate/wrap long lines...

                                    The PB/DOS IDE* is hardly new....


                                    * (I)ntegrated (D)evelopment (E)nvironment.... since Ted asked earlier

                                    Comment


                                    • #19
                                      I meant the Windows IDEs do this. Old DOS may have too. And, why is a DOS IDE thread under Windows Forum?
                                      sigpic
                                      Mobile Solutions
                                      Sys Analyst and Development

                                      Comment


                                      • #20
                                        Hi Edward, :wavey:
                                        I and others can save you a "TON" of time wasted on wrong avenues in here, and from my experience they have saved whats left of my hair on multiple avenues
                                        early learning & training does stick in the ol' grey matter.
                                        Yes it does...even if you have to dust a lil' off the bottle to enjoy the wealth of knowledge

                                        You talk about calculating with dollars (metric), we had to deal with, "I buy 17 books for £3:12:7 [three pounds, twelve shillings & seven pence]. How much did I spend?" Pounds in units - shillings in twenties - pennies in twelves!
                                        I had the same problem converting Miles to Kilometers when I was in Germany (not that I often needed to know how fast I was going, but if memory serves, rough math, MPH * 9 and drop the decimal point....or more like MPH * 0.9)

                                        [quote
                                        My gripe with the DOS memory allocation is that I started with the Dragon with six modules, and gradually merged them into one prog with Windows 3.11. Then it was downhill, and I had to split them back to four modules.
                                        [/quote]
                                        Modules vs one program, I consider a matter of choice of what is easiest to maintain "YEARS after you wrote it"...whatever is easier for you to remember is the route to go

                                        Another is that the Lprint is a bugger. I put the output to .txt files for Notepad. But, in the end you have to move on and learn VB.
                                        I will have to assume you meant VB5 or 6 in this case...(Is there an icon for a bullhorn for what I am about to say?)

                                        "PUT DOWN the gun, and step away from the keyboard"

                                        Seriously though do not fall into the trap that myself, and several "VB Refugee's learned from past mistakes

                                        (sure VB can be attractive but when you want to do something serious, it gets complicated)

                                        Forgive me Bob if I speak for you, but I think from my VB experience for the most part Edward PBCC is for you, but if you need a "Windows-like" interface then PB/Win is one heck of a good step (stay away from VB)

                                        Some PBCC'ers will correct me on this a lil' but if used to a console type program, and "Just want to get your feet wet" then the learning curve is almost Nill, and from my ole' VB days the learning is still almost Nill

                                        (Bob, and the staff, and all the wonderful people in the forums have made my merge of "Old Technology (or what just works) to End User (Do I click the "Yes" button) one heck of a move, and to top it all off, gave me avenues to work on really complicated subjects that I would NEVER have thought of without learning more complicated languages) and at a minimal cost, so I was more than surprised

                                        Well enough of my comments, and cant wait for your well thought out questions, I am sure many of us in here can help you out where possible


                                        [/quote]
                                        Engineer's Motto: If it aint broke take it apart and fix it

                                        "If at 1st you don't succeed... call it version 1.0"

                                        "Half of Programming is coding"....."The other 90% is DEBUGGING"

                                        "Document my code????" .... "WHYYY??? do you think they call it CODE? "

                                        Comment

                                        Working...
                                        X