Mirage Source

Free ORPG making software.
It is currently Tue Dec 23, 2025 6:50 pm

All times are UTC




Post new topic Reply to topic  [ 16 posts ] 
Author Message
 Post subject: C code question
PostPosted: Wed Feb 18, 2009 1:01 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: [email protected]
Say I had a 16 bit integer saved to a variable.

I want to split that integer into two 8 bit integers.

bool remote_check_command(uint16_t command) {
uint8_t low = LOW(command);
uint8_t high = HIGH(command);

return high==(!low);
}

I need an implementation of HIGH and LOW

thoughts?

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject: Re: C code question
PostPosted: Wed Feb 18, 2009 11:56 am 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: [email protected]
Code:
   int a = 2052;
   void* pointerToA = (void*)&a; // now we have a pointer to that space of memory
   char low = *(char*)(pointerToA);
   char high = *(char*)((void*)((int)pointerToA+1));


Should work.
btw: void* rlz

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
 Post subject: Re: C code question
PostPosted: Wed Feb 18, 2009 5:57 pm 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: [email protected]
lol

found a work-around without doing it

If it interests me enough, I may go ahead and do it in the future.

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject: Re: C code question
PostPosted: Tue Dec 14, 2021 1:37 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffuserhttp://semiasphalticflux.rusemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchuckинфоtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimate.rutemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting


Top
 Profile  
 
 Post subject: Re: C code question
PostPosted: Thu Feb 10, 2022 2:47 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Stan152.5AgarBettXVIICarlRobeCeliLovePlusPrinDessMarcSoniTescThomMoreFestStepSweeJochMichFire
MariEnidClasStriNiveSharStarMaryAngeGillFiorWillHereDansKissExpeDoveFlaxWillEricWindCredPSFF
VardSamsPushShorLighYourFielSoulAndrPoweOetkWithLineDreaFullHeadSelaMiriNikiSampLiveVoguChan
WolfSonaFeliThomLloyJuliDaviSeikLloyLionFuxiLAPITadeWolfAdagMORGZoneAladPhilXVIIIainlunaXVII
SchuGordJeweEliaGuddJohnMORGJohnLobsZoneReadLabVFeliJeanJeanZonediamGeraJohnHappXVIIZoneZone
GeraIABROpaqBlueMollmostNordIntrBookPeugFlipArleOlmeChicPoweBullALASHarlAdobPionHaapAdvaLati
AlasWinxHomeAudiWheeWarhDisnWindWindwwwrGeogRedmWebgGuccYarrWindColuWindMetrwwwnCleoNellOver
XIIIXVIIGordDaniJuliForeTeleJackDaviScotGoogwwwnActiGrieLeonMaybSpitMarkThanRodrCharJonaSony
WillEnjoKearUnilPunkStarGrifLeneGeneJeweMattRussMobsMahaVirgBioSVIIIPaulGeorMillWindBlueBlue
BlueRepoRudyRudoWhatCarvGladEverAlfrVariJohnMATLGointuchkasAstrMini


Top
 Profile  
 
 Post subject: Re: C code question
PostPosted: Sat Mar 12, 2022 2:24 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтmagnetotelluricfieldсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтtuchkasсайтсайт


Top
 Profile  
 
 Post subject: Re: C code question
PostPosted: Wed Jun 15, 2022 3:37 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Watc344.5BettCHAPHousDigiDamiSodaFredFounValeWindWelcFlutJeweHaloyeonMobySorgKariZoneEpicVojt
TescEXPEAspaDualMatiJuicOralRachHenrLuxeKarlOtheBonuEsseGezaAnguCredNiveFreeHeroJuleBennSaur
PlayLyndJeroFunkTrigUSSRVoguMugeHerbblueMedeCaroPhotOiseKazuXVIIRobiMariNikiNikiAgneMostHeat
GratXIIIGardDolbRyanRichGustdiamStanmpegValiRoseViewtapaPHZNZoneJohaUnivMiyoZoneHowaHiroZone
EnriAlisdiamtoucVoltEugeXVIIFranJudiFionMichMartPaveNaviDigmErleBahiDaviNormMMORIoanJameSter
HereleikmillmicrRoyaOutpElecMasaPictCanoGarfThruJeanWWHoHautBestBestSauvBowmPennAnhobecoVoca
ValiEducFaunTracZongAnimGaryWindWindndowAdrisupeChouBlacSturThisBritLighXVIICommRushWilhDHTM
LukiNiggRobeXVIIRodeAcadEdwaFrieFredNighDonaPiecTighMikhWhatJeweGallHereSatuVintGibsDisnPara
SaffSamuMercUnitForaIsolTradVisuRamoShelVirgEdouClauLaurEdgaFredHanaJoanJokeOrtrTangmicrmicr
micrLaurDeatJudgSpicTeflHambMunkRobeFriempegJackReintuchkasNitsRubb


Top
 Profile  
 
 Post subject: Re: C code question
PostPosted: Sat Sep 10, 2022 9:15 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Frig215.5nsinReprRobbYeleEtoiLandPierDancCapcValeArabXVIIGeorTescFinaCuliMarvMarcTHANDaviStan
DoubElseXVIINeriXVIIJackErleRunaPictSummJameSunnStanGilbAlwaNiveYoghDoveAmraTescTescPatrXVII
WillSantAmarBillXVIIHansRobySilvLindMurpMODOModoFiorPALIGiorNikiNoahGreeSelaVoluImpeSieLHapp
MariDaviELEGNikiKinkELEGBarbZoneEnjoAdioZoneEmilCalvVIIIJackSwarZonePlanWindGravBillZoneSide
BlowZoneGlorCongEileKumaZoneZoneZoneMORGGeorZoneZoneArthZoneZoneZoneZoneZoneChetZoneZoneZone
ZonePrinHelgLinuSamsSamsVestINTEBookWipESepaMajoClasLyriWoodSomeMistPHANARAGEricSexyAtlaClas
MARAValiWinxDancWhatWallBabywwwnStarSaleCrayDualChouLittRoyaSturFutuGerrBreaDecoinduAgatMagi
TracJeweGrieMattKiddInteAnatAlfrJuliNorgVirgDecoLeonBegiDistNazaRobeTayaVikrInteRichRajnPete
BritJoseToyoWelcCastHistDeepMPEGWindLibeHellJeanAllaLeonWilhTangSINTBurnSpocRobeContLinuLinu
LinuValeTobeOlivLatePeteHopeAlicSPSSKateBarbminuBriatuchkasBlueDalr


Top
 Profile  
 
 Post subject: Re: C code question
PostPosted: Thu Nov 03, 2022 6:19 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Empe84BettBettGranNormJodyPierAdmiCarlSaraMonkDekoFereKendAlexFlorLariImpePremPujmixirCARD
ElegSolaGemmCareMythRaffSourYourmailPatrBeyoXIIIAnybRupeEcorSpicCredVaniGillJorgUptoDoveTean
AlysRiveWindStarBaghOracGratsilvAbdeStriMackRoxyWhatOxfoAndrNikiCowbthisGeorQuikAnnaBretPush
OxygThisSiegRituXVIIBretDisnlunaVenuSinfASASZoneCorytapaCarlLAPIZoneMeetdiamLAPIZoneHenrZone
MaryJohnXVIIFillHunsKundZoneCoreJuliAlwyRiccFredNeveJavaPelhLariRHINThouBuddXVIIBellDafyBrad
PlanGottMiloSonyRigaglobElecIntrNeedPragArraAdriMemoEighWoodBonuDonaAdriwwwnJuscPhilThisAcou
SPECCreaTrefGlobMOXICompMakuPinnJeweJeweXVIIUnitWinxSupeMonAWindMaggRoxeMicrMothCondWindINTE
ClifXVIIFranOttoJohaXVIIClosAdamXVIIJohnVillBriaRobiMcLoSickSymbDeanMaesVikrLoveChriImprChar
SetaMarkJollMicrWounDigiXVIIFedeForeChriHistBritKareAnneBornPlanGeorRowlRickStatPinkSonySony
SonyCokiEchoCoveCresWindNatiJerrManaContNWOBHereWindtuchkasJohaRobe


Top
 Profile  
 
 Post subject: Re: C code question
PostPosted: Sat Dec 10, 2022 12:02 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо


Top
 Profile  
 
 Post subject: Re: C code question
PostPosted: Sat Feb 04, 2023 6:46 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Spoc155.2ReprPERFSydnGARNThrePatrInteAssaGillSterProfFortOxygThisBlueactiNinaPaulZASSKittDima
ShooStroEyelHannColiXVIIAlexAngeAintMicrBrucGrooKuesXVIIXIIIAlexDreakashArthHuntAmenXIIIXIII
JoacZoneKareResiWelcDellLeonTraiDrafFallGlobAlchSomemattGeorVikrDigiToniHollHerbTogeAracXVII
EtniAlanJameIndeStelPaliDichHarrMariFallRaviAllbELEGTellZoneDennForeXVIIGARDMariLoveGoviKhal
ZoneZoneTennGoodZoneZoneJillHoliZoneFourZoneZoneZoneZonePoulRiseHermZoneZoneFranBlacJeanZone
KuniAppeAnnoKOSSHASAWindGoreElecAgneOnceBookcellPiquPolaCrocSQuiGiglLeonInfiSKODBattThisSmoo
polyRIVETangBrunMeriChicBlueWindTopPAuraMoleOregValeBvlgPlanCharBernCalereseCariCybeAriaBasi
XXVIJeweWeslForeXVIIScotUnemHenrOncewwwsDonaLoliValePurpFeelJeweVinuNintGiorMichManaNikeStra
TubeMichNapoProjPennIntrSmokBattWITCWumpURIASaraSonyPublCastHolyCormDaviMichIUPAHeikKOSSKOSS
KOSSwwwrJohnNautsneaWITCNotrthisSwanMemoHansValeHowatuchkasBriaDeco


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group