delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/06/23:03:29

Message-ID: <009301bdf19e$c0093e80$986f19c4@default>
From: rylan AT intekom DOT co DOT za (StefanViljoen,6599)
To: <djgpp AT delorie DOT com>
Subject: Re: allocating dword aligned memory with __dpmi_allocate_memory
Date: Wed, 7 Oct 1998 04:37:57 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.2106.4
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Reply-To: djgpp AT delorie DOT com

-----Original Message-----
From: Nate Eldredge <nate AT cartsys DOT com>
Newsgroups: comp.os.msdos.djgpp
To: Omar Hawk <omarhawk AT t-online DOT de>
Cc: djgpp AT delorie DOT com <djgpp AT delorie DOT com>
Date: Tuesday, October 06, 1998 4:01 AM
Subject: Re: allocating dword aligned memory with __dpmi_allocate_memory


>Omar Hawk wrote:
>> 
>> Hello there,
>> 
>> I want to write an assembler function that copies mem using the string
>> instructions MOVSD & MOVSW. I'd like to use MOVSD to store 2 words a
>  void *p = malloc(size + 3);
>  p = (void *)((((unsigned long)p)+3)&~4);


Hi Nate,

Hey, what does the tilde "~" do here? "+3)&~4) ?

I've never heard of a tilde opearator - what's it used for? (Newbie alert!)

Fanx!

Kind Regards,

Rylan
Is truth beauty or is beauty truth?
http://home.intekom.com/rylan/index.html


- Raw text -


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