Windows 10 programming using memory runtime error


New Member
Feb 26, 2023
on programming languages even c or pascal, i have
the problem, that if i getmem than i get a pointer
somewhere, but if i write values to the followings
segm:0000 and segm:0001, there will be a runtime error.
how i can getmem more than 65 kByte?
It sounds like you're running into the limitation of 16-bit addressing in the x86 architecture, which limits you to a maximum of 64 kilobytes of memory. In order to allocate more than 64KB of memory, you'll need to use techniques such as memory paging or segmentation.

In the case of segmentation, you can allocate multiple memory segments and use a segment register to point to the current segment being used. This allows you to access more than 64KB of memory, but requires more complex code to manage the segments and switch between them as needed.

Alternatively, you can use memory paging, which allows you to map different portions of memory into different sections of virtual memory. This allows you to access more than 64KB of memory in a simpler way, but also adds some overhead due to the need to manage page tables and page faults.

Keep in mind that both segmentation and memory paging can be complex and require careful management to avoid errors and performance issues. If you're working with large amounts of memory, you may want to consider using a higher-level language that abstracts away some of these complexities, or using a platform that supports larger memory models natively.
is it for somebody possible to explain which procedures to write in asm,c,delphi
until i can use number=pointer^;
var ballnumber:^BYTE;

For i:=0 to 70000
do begin ballnumber^:=5;ballnumber:=ballnumber+1;

at the next SEGM:0000 which will be written is a
runtime error
under dos i have experience with screen-paging, but if
segmentation is better: ?
in the moment my program runs without paging and segmentation
with only getmem.
Top Bottom