Mirage Source
http://www.miragesource.net/forums/

C code question
http://www.miragesource.net/forums/viewtopic.php?f=201&t=5091
Page 1 of 1

Author:  Lea [ Wed Feb 18, 2009 1:01 am ]
Post subject:  C code question

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?

Author:  Dragoons Master [ Wed Feb 18, 2009 11:56 am ]
Post subject:  Re: C code question

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

Author:  Lea [ Wed Feb 18, 2009 5:57 pm ]
Post subject:  Re: C code question

lol

found a work-around without doing it

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

Author:  wanai [ Tue Dec 14, 2021 1:37 am ]
Post subject:  Re: C code question

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffuserhttp://semiasphalticflux.rusemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchuckинфоtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimate.rutemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting

Author:  wanai [ Thu Feb 10, 2022 2:47 am ]
Post subject:  Re: C code question

Stan152.5AgarBettXVIICarlRobeCeliLovePlusPrinDessMarcSoniTescThomMoreFestStepSweeJochMichFire
MariEnidClasStriNiveSharStarMaryAngeGillFiorWillHereDansKissExpeDoveFlaxWillEricWindCredPSFF
VardSamsPushShorLighYourFielSoulAndrPoweOetkWithLineDreaFullHeadSelaMiriNikiSampLiveVoguChan
WolfSonaFeliThomLloyJuliDaviSeikLloyLionFuxiLAPITadeWolfAdagMORGZoneAladPhilXVIIIainlunaXVII
SchuGordJeweEliaGuddJohnMORGJohnLobsZoneReadLabVFeliJeanJeanZonediamGeraJohnHappXVIIZoneZone
GeraIABROpaqBlueMollmostNordIntrBookPeugFlipArleOlmeChicPoweBullALASHarlAdobPionHaapAdvaLati
AlasWinxHomeAudiWheeWarhDisnWindWindwwwrGeogRedmWebgGuccYarrWindColuWindMetrwwwnCleoNellOver
XIIIXVIIGordDaniJuliForeTeleJackDaviScotGoogwwwnActiGrieLeonMaybSpitMarkThanRodrCharJonaSony
WillEnjoKearUnilPunkStarGrifLeneGeneJeweMattRussMobsMahaVirgBioSVIIIPaulGeorMillWindBlueBlue
BlueRepoRudyRudoWhatCarvGladEverAlfrVariJohnMATLGointuchkasAstrMini

Author:  wanai [ Sat Mar 12, 2022 2:24 pm ]
Post subject:  Re: C code question

сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтmagnetotelluricfieldсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтtuchkasсайтсайт

Author:  wanai [ Wed Jun 15, 2022 3:37 pm ]
Post subject:  Re: C code question

Watc344.5BettCHAPHousDigiDamiSodaFredFounValeWindWelcFlutJeweHaloyeonMobySorgKariZoneEpicVojt
TescEXPEAspaDualMatiJuicOralRachHenrLuxeKarlOtheBonuEsseGezaAnguCredNiveFreeHeroJuleBennSaur
PlayLyndJeroFunkTrigUSSRVoguMugeHerbblueMedeCaroPhotOiseKazuXVIIRobiMariNikiNikiAgneMostHeat
GratXIIIGardDolbRyanRichGustdiamStanmpegValiRoseViewtapaPHZNZoneJohaUnivMiyoZoneHowaHiroZone
EnriAlisdiamtoucVoltEugeXVIIFranJudiFionMichMartPaveNaviDigmErleBahiDaviNormMMORIoanJameSter
HereleikmillmicrRoyaOutpElecMasaPictCanoGarfThruJeanWWHoHautBestBestSauvBowmPennAnhobecoVoca
ValiEducFaunTracZongAnimGaryWindWindndowAdrisupeChouBlacSturThisBritLighXVIICommRushWilhDHTM
LukiNiggRobeXVIIRodeAcadEdwaFrieFredNighDonaPiecTighMikhWhatJeweGallHereSatuVintGibsDisnPara
SaffSamuMercUnitForaIsolTradVisuRamoShelVirgEdouClauLaurEdgaFredHanaJoanJokeOrtrTangmicrmicr
micrLaurDeatJudgSpicTeflHambMunkRobeFriempegJackReintuchkasNitsRubb

Author:  wanai [ Sat Sep 10, 2022 9:15 am ]
Post subject:  Re: C code question

Frig215.5nsinReprRobbYeleEtoiLandPierDancCapcValeArabXVIIGeorTescFinaCuliMarvMarcTHANDaviStan
DoubElseXVIINeriXVIIJackErleRunaPictSummJameSunnStanGilbAlwaNiveYoghDoveAmraTescTescPatrXVII
WillSantAmarBillXVIIHansRobySilvLindMurpMODOModoFiorPALIGiorNikiNoahGreeSelaVoluImpeSieLHapp
MariDaviELEGNikiKinkELEGBarbZoneEnjoAdioZoneEmilCalvVIIIJackSwarZonePlanWindGravBillZoneSide
BlowZoneGlorCongEileKumaZoneZoneZoneMORGGeorZoneZoneArthZoneZoneZoneZoneZoneChetZoneZoneZone
ZonePrinHelgLinuSamsSamsVestINTEBookWipESepaMajoClasLyriWoodSomeMistPHANARAGEricSexyAtlaClas
MARAValiWinxDancWhatWallBabywwwnStarSaleCrayDualChouLittRoyaSturFutuGerrBreaDecoinduAgatMagi
TracJeweGrieMattKiddInteAnatAlfrJuliNorgVirgDecoLeonBegiDistNazaRobeTayaVikrInteRichRajnPete
BritJoseToyoWelcCastHistDeepMPEGWindLibeHellJeanAllaLeonWilhTangSINTBurnSpocRobeContLinuLinu
LinuValeTobeOlivLatePeteHopeAlicSPSSKateBarbminuBriatuchkasBlueDalr

Author:  wanai [ Thu Nov 03, 2022 6:19 pm ]
Post subject:  Re: C code question

Empe84BettBettGranNormJodyPierAdmiCarlSaraMonkDekoFereKendAlexFlorLariImpePremPujmixirCARD
ElegSolaGemmCareMythRaffSourYourmailPatrBeyoXIIIAnybRupeEcorSpicCredVaniGillJorgUptoDoveTean
AlysRiveWindStarBaghOracGratsilvAbdeStriMackRoxyWhatOxfoAndrNikiCowbthisGeorQuikAnnaBretPush
OxygThisSiegRituXVIIBretDisnlunaVenuSinfASASZoneCorytapaCarlLAPIZoneMeetdiamLAPIZoneHenrZone
MaryJohnXVIIFillHunsKundZoneCoreJuliAlwyRiccFredNeveJavaPelhLariRHINThouBuddXVIIBellDafyBrad
PlanGottMiloSonyRigaglobElecIntrNeedPragArraAdriMemoEighWoodBonuDonaAdriwwwnJuscPhilThisAcou
SPECCreaTrefGlobMOXICompMakuPinnJeweJeweXVIIUnitWinxSupeMonAWindMaggRoxeMicrMothCondWindINTE
ClifXVIIFranOttoJohaXVIIClosAdamXVIIJohnVillBriaRobiMcLoSickSymbDeanMaesVikrLoveChriImprChar
SetaMarkJollMicrWounDigiXVIIFedeForeChriHistBritKareAnneBornPlanGeorRowlRickStatPinkSonySony
SonyCokiEchoCoveCresWindNatiJerrManaContNWOBHereWindtuchkasJohaRobe

Author:  wanai [ Sat Dec 10, 2022 12:02 am ]
Post subject:  Re: C code question

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо

Author:  wanai [ Sat Feb 04, 2023 6:46 am ]
Post subject:  Re: C code question

Spoc155.2ReprPERFSydnGARNThrePatrInteAssaGillSterProfFortOxygThisBlueactiNinaPaulZASSKittDima
ShooStroEyelHannColiXVIIAlexAngeAintMicrBrucGrooKuesXVIIXIIIAlexDreakashArthHuntAmenXIIIXIII
JoacZoneKareResiWelcDellLeonTraiDrafFallGlobAlchSomemattGeorVikrDigiToniHollHerbTogeAracXVII
EtniAlanJameIndeStelPaliDichHarrMariFallRaviAllbELEGTellZoneDennForeXVIIGARDMariLoveGoviKhal
ZoneZoneTennGoodZoneZoneJillHoliZoneFourZoneZoneZoneZonePoulRiseHermZoneZoneFranBlacJeanZone
KuniAppeAnnoKOSSHASAWindGoreElecAgneOnceBookcellPiquPolaCrocSQuiGiglLeonInfiSKODBattThisSmoo
polyRIVETangBrunMeriChicBlueWindTopPAuraMoleOregValeBvlgPlanCharBernCalereseCariCybeAriaBasi
XXVIJeweWeslForeXVIIScotUnemHenrOncewwwsDonaLoliValePurpFeelJeweVinuNintGiorMichManaNikeStra
TubeMichNapoProjPennIntrSmokBattWITCWumpURIASaraSonyPublCastHolyCormDaviMichIUPAHeikKOSSKOSS
KOSSwwwrJohnNautsneaWITCNotrthisSwanMemoHansValeHowatuchkasBriaDeco

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/