.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 exitdeepfuture@deepfuture-laptop:~/private/mytest$ gcc -o test12 test12.s
deepfuture@deepfuture-laptop:~/private/mytest$ ./test12
DEF
deepfuture@deepfuture-laptop:~/private/mytest$