VOGONS


gwbasic: 60300 byte free

Topic actions

First post, by noshutdown

User metadata
Rank Oldbie
Rank
Oldbie

what does this limit imply? does it mean i can write 60300 bytes of source code(about 1000+ lines i think), or that the translated binary instructions at 60300 bytes long, or i can store 60300 bytes of data?
that sounds really limited in contrast to 640kb conventional memory.

Reply 2 of 5, by root42

User metadata
Rank l33t
Rank
l33t

Gwbasic probably uses a small memory model and can only address one segment, i.e. 64KiB. If you want more, you might want to use qbasic.

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 3 of 5, by VileR

User metadata
Rank l33t
Rank
l33t
noshutdown wrote:

what does this limit imply? does it mean i can write 60300 bytes of source code(about 1000+ lines i think), or that the translated binary instructions at 60300 bytes long, or i can store 60300 bytes of data?

It's for the tokenized binary representation of your code, plus data. There are things like (IIRC) string space and communication buffers that can be adjusted from the command line if you check the manual.
As mentioned above, you only get a single segment. You can always (ab)use DEF SEG to save/load data in other segments, but that's probably not a good idea unless you know what you're doing.

64K might look limited, but most other machines which ran old-school MS BASIC dialects tended to have even less RAM free for programs.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 4 of 5, by noshutdown

User metadata
Rank Oldbie
Rank
Oldbie

i found that ibm bascom1.0(ms bascom 5.xx) compiled binaries can only use <64kb of ram aswell.
qbasic can use <192kb(arrays<160kb, strings<32kb) of ram.
quickbasic interpreter mode can use <384kb(arrays<320kb, strings<64kb) of ram.
ibm bascom2.0(ms bascom6.0) and quickbasic compiled binaries can use almost all available conventional ram, although strings are still limited to <64kb.

Reply 5 of 5, by Gene Wirchenko

User metadata
Rank Member
Rank
Member
VileRancour wrote:
It's for the tokenized binary representation of your code, plus data. There are things like (IIRC) string space and communicati […]
Show full quote
noshutdown wrote:

what does this limit imply? does it mean i can write 60300 bytes of source code(about 1000+ lines i think), or that the translated binary instructions at 60300 bytes long, or i can store 60300 bytes of data?

It's for the tokenized binary representation of your code, plus data. There are things like (IIRC) string space and communication buffers that can be adjusted from the command line if you check the manual.
As mentioned above, you only get a single segment. You can always (ab)use DEF SEG to save/load data in other segments, but that's probably not a good idea unless you know what you're doing.

64K might look limited, but most other machines which ran old-school MS BASIC dialects tended to have even less RAM free for programs.

String space is included in that 60300 bytes.

I never thought of using DEF SEG that way.

"old-school" is misleading. It is 8-bit systems that had this limitation, because the operating system and BASIC had to load into the total 64K address space. A typical value under CP/M was about 29K.

Sincerely,

Gene Wirchenko