Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8855127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:03:28+00:00 2026-06-14T14:03:28+00:00

I am working on function calls and returns in x86 assembly. I can’t seem

  • 0

I am working on function calls and returns in x86 assembly. I can’t seem to get this to go without crashing. I am calling the function MIRROR_BYTE from bit_operations. But every time i run the code it has unknown error and crashes. It happens only after I MIRROR_BYTE finishes Really lost here, any help is appreciated. url to full code

http://codepaste.net/av7ikf

 __declspec(naked) void
 bit_operations(unsigned long inputDWord, unsigned long *outputDWord)
 {
     __asm{
         // start code for part B here

         push eax
         push ebx

         mov ebx, [esp + 12] 
         push ebx                 //move inputDword into the stack
             call MIRROR_BYTE
         pop ebx                  //pop inputDword out of the stack

         pop ebx
         pop eax

         // end code for part B here
         ret
     }
 }

 /*
     This function takes 4 bytes as input and mirrors the value of Byte 4 (leftmost).
     For example, for a byte like 10110111, the mirrored byte value is 11101101.
 */

 __declspec(naked) unsigned long
 MIRROR_BYTE( unsigned long inputDWord )
 {
     __asm{

     // not sure what to do here just return dummy al from inputDword
     mov al, byte ptr[esp +4]


     }
 }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:03:29+00:00Added an answer on June 14, 2026 at 2:03 pm

    You need to return from MIRROR_BYTE!!! Without a ret or C return, the CPU will continue executing code after the MIRROR_BYTE proc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a state machine which is supposed to extract function calls of
I am working with a unit-testing suite that hijacks function calls and tests expected
I'm working on a script for looping thru PHP files and renaming function calls
I am calling a php function using ajax call but its not working. I
I have this function working <script type=text/javascript> $(window).scroll(function() { if ($(window).scrollTop() == $(document).height() -
This is what i believe: When a function returns it make a new temporary
I'm working on a function that iterates through a list of ports and calls
I'm working on a Java function that should be called infinitely . This function
Working in a symfony model, I want to override a function and call the
I am trying to call a function makeQuery and it's not working, FireBug is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.