在NASM的无尽循环

时间:2018-04-27 14:54:53

标签: linux assembly x86 nasm jdoodle

我的任务是要求用户输入,输出将返回其名称。

这是我的代码:

section .data
user:     db  'Hello.What is your name ?   '
user_L:    equ $-user ;length of the UserNameMsg segment
hello:     db '  Hello'
hello_L:   equ $-hello

section .bss 
   user_v:  resb 23
section  .text
   global _start    

_start: 
 mov eax, 4
 mov ebx, 1
  mov ecx, user
 mov edx, user_L
   int 0x80

     mov eax, 3
   mov ebx, 0
   mov ecx, user
   mov edx, 23
   int 0x80
   mov eax, 4
   mov ebx, 1
   mov ecx, hello
   mov edx, hello_L
   int 0x80
   mov eax,4
   mov ebx, 1
   mov ecx, user_v
   mov edx, 23
   int 0x80
   mov eax, 1
   mov ebx, 0
   int 0x80

当我在JDoodle's online assembler中运行我的代码时,我收到错误消息:

  

超时 - Timeout Your Program的一些常见原因可能会有无限循环

我不知道如何解决此错误。

0 个答案:

没有答案
相关问题