www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/21/08:01:53

From: "Henri Ossi" <henri DOT ossi AT mail DOT htk DOT fi>
Newsgroups: comp.os.msdos.djgpp
Subject: Separating two 8bit numbers from 16bit
Date: Tue, 21 Apr 1998 14:45:57 +0300
Organization: Telecom Finland News Service
Lines: 17
Message-ID: <6hi14m$e2o$1@hiisi.inet.fi>
NNTP-Posting-Host: pc2017.public.htk.fi
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi. (again =)

Now I'm trying to store a 16bit number as two ASCII characters to my file.
So, I was wondering, if there's a fast way to separate a 16bit number to two
8bit numbers?

I know, that I can do this easily with inline asm (and I also can do it),
but is there a fast and short way to do this in C?


Thanks for any answers I get.

-Henri Ossi




- Raw text -


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