VOGONS


First post, by danib2000

User metadata
Rank Newbie
Rank
Newbie

so im building a text based adventure game for my project in assembly
as you can probably guess i need to create alot of string arrays, now i am afraid that at some point ill run out of memory. so how many chars can i create before i run out?

Reply 1 of 6, by aqrit

User metadata
Rank Member
Rank
Member

that depends...
lets just say code + strings can not exceed 64 KiB

Reply 2 of 6, by danib2000

User metadata
Rank Newbie
Rank
Newbie
aqrit wrote:

that depends...
lets just say code + strings can not exceed 64 KiB

and what if i choose to use graphic mode and print something like 10 pics using bitmap?

Reply 4 of 6, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

You can use all the 640KB minus DOS overheads in assembly.

For 16-bit C 8086, you can compile for compact, large or huge memory model to use far pointers and multiple segment for code and data within 640KB DOS memory.
See https://en.wikipedia.org/wiki/Intel_Memory_Mo … l#Memory_models

To get more memory beyond 640KB DOS memory on 8086, you will need EMS programming. You can google for supported libraries for both C and ASM if you don't want to manage it your own.

Reply 5 of 6, by danib2000

User metadata
Rank Newbie
Rank
Newbie
kjliew wrote:
You can use all the 640KB minus DOS overheads in assembly. […]
Show full quote

You can use all the 640KB minus DOS overheads in assembly.

For 16-bit C 8086, you can compile for compact, large or huge memory model to use far pointers and multiple segment for code and data within 640KB DOS memory.
See https://en.wikipedia.org/wiki/Intel_Memory_Mo … l#Memory_models

To get more memory beyond 640KB DOS memory on 8086, you will need EMS programming. You can google for supported libraries for both C and ASM if you don't want to manage it your own.

Thanks, if ill be in need of extra memory ill do that.