www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/18/09:46:20

From: "Keith McCormick" <kdm98 AT spiritone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Memory allocation - Help!?!
Date: 18 Aug 1999 08:52:31 GMT
Organization: <none>
Lines: 49
Message-ID: <934966351.247441@ridge.spiritone.com>
NNTP-Posting-Host: ridge.spiritone.com
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Trace-ISP: 934966350 7028 208.130.243.231 hf5o/F45:xqz98
X-Complaints-To-ISP: abuse at spiritone dot com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I have cobbled together some assembly functions that set memory locations to
N and copy memory locations.  The set memory function works with the linear
frame buffer  ( used the __dpmi_physical_address_mapping() ),but when I
tried to use it w/ a pointer created using malloc() I get a SIGSEV.  I then
tried to use the __dpmi_allocate_linear_memory() function.  This crashed my
computer.  The set function has only worked w/ the Vesa LFB.

Assembly fragment:

dest_fquadset       equ 8
data_fquadset       equ 12
count_fquadset      equ 16

_fquadset:
 push ebp
 mov ebp, esp
 push eax
 push ecx
 push edi
 push es

 mov edi, [ebp + dest_fquadset]
 mov ax, [ebp + data_fquadset]
 shl eax, 16
 mov ax, [ebp + data_fquadset]
 mov ecx, [ebp + count_fquadset]
 shr ecx,1
 rep stosd

 pop es
 pop edi
 pop ecx
 pop eax
 mov esp, ebp
 pop ebp
 ret


I am trying to create a buffer to do the drawing to and then copying it to
the frame buffer.  Could anyone tell me how I can create a memory buffer
that will work?

KeithM

Also, should I manually free the physical_address_mapping or does to DJGPP
startup fragment do this at program termination?



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019