Segmentation-fault error happening with Assembly code program

后端 未结 2 1696
逝去的感伤
逝去的感伤 2021-01-24 15:03

I keep getting a segmentation fault error when running my code. Everything has compiled well, but I can\'t seem to get it to do what I want. The program is to ask the user to e

2条回答
  •  日久生厌
    2021-01-24 15:57

    div ebx
    

    the problem seems to be here. You have to zero out edx since is is the high order word of the divisor, so probably you're getting something like a division overflow exception.
    If this isn't the case probably the problem is in some of your I/O routines

提交回复
热议问题