English 中文(简体)
简易组别方案
原标题:Simple assembly division program crashing
  • 时间:2011-11-22 19:10:50
  •  标签:
  • assembly
  • x86

我写了一幅简单的集会节目,以进行分裂,然而,在试图在视觉演播室里进行编辑时,我刚刚被告知,我触发了一个断点,赢得了一些汇编。

其他方案迄今为止已经编纂了罚款,我看不到我在此错误中做什么。

    .386
    .model flat, c
    .stack 100h
printf PROTO arg1:Ptr Byte, printlist:VARARG
    .data
msg1fmt byte 0Ah,"%d",0
number sdword 5
divisor sdword 1
answer sdword ?
    .code
main proc
    mov eax, number
    cdq
    idiv divisor
    mov answer, eax
    INVOKE printf, ADDR msg1fmt, answer
main endp
    end
问题回答

暂无回答




相关问题
How can I do a CPU cache flush in x86 Windows?

I am interested in forcing a CPU cache flush in Windows (for benchmarking reasons, I want to emulate starting with no data in CPU cache), preferably a basic C implementation or Win32 call. Is there a ...

What are the names of the new X86_64 processors registers?

Where can I find the names of the new registers for assembly on this architecture? I am referring to registers in X86 like EAX, ESP, EBX, etc. But I d like them in 64bit. I don t think they are the ...

How do I disassemble raw 16-bit x86 machine code?

I d like to disassemble the MBR (first 512 bytes) of a bootable x86 disk that I have. I have copied the MBR to a file using dd if=/dev/my-device of=mbr bs=512 count=1 Any suggestions for a Linux ...

32bit application access to 64bit registry

I have an OS Shell written in 32bit that is replacing the Explorer.exe of a Vista machine. I run a utility which is also written in 32bit, which allows to switch between the Explorer shell and My ...

Left Shift Overflow on 68k/x86?

I heard that the Motorola 68000 and Intel x86 architectures handle overflow from left shifting differently. Specifically the 68k LSL vs. the Intel SAL/SHL assembly instructions. Does anyone know the ...

Translate a FOR to assembler

I need to translate what is commented within the method, to assembler. I have a roughly idea, but can t. Anyone can help me please? Is for an Intel x32 architecture: int secuencia ( int n, ...

热门标签