LINUX-汇编-多值内存位置访问(1)

.section .data
  myvalue:
     .byte 67,68,69,70,0
  mygs:
     .asciz "%s\n"
   
.section .text
.globl main
   main:
    movl $myvalue,%ecx
    inc %ecx#本来应输出CDEF,68代表D
    push %ecx
    push $mygs    
    call printf
    push $0
    call exit
       
    
    
 deepfuture@deepfuture-laptop:~/private/mytest$ gcc -o test12 test12.s

deepfuture@deepfuture-laptop:~/private/mytest$ ./test12

DEF

deepfuture@deepfuture-laptop:~/private/mytest$ 


你可能感兴趣的:(linux,gcc)