编辑代码

section .data         ;  // 注释
    userMsg db "please enter a number"
    lenuserMeg equ $ - userMsg
    dispMsg db "you have entered:
    lendispMag equ $ - dispMag


section .bss
 
    num resb 5
section .text
    global _start

_start:
    mov eax, 4
    mov ebx, 1
    mov ecx, userMsg
    mov edx, lenuserMeg
    int 80h

    mov eax, 3    
    mov ebx, 2    
    mov ecx, num    
    mov edx, 5    
    int 80h  

    mov eax, 4    
    mov ebx, 1    
    mov ecx, dispMsg    
    mov edx, lendispMeg    
    int 80h  

    mov eax, 4    
    mov ebx, 1    
    mov ecx, num    
    mov edx, 5    
    int 80h  

    mov eax, 1
    mov ebx, 0    ;  sys_write
    int 0x80         ;  系统调用
    
       ;  sys_exit
            ;  系统调用