language: Assembler (nasm-2.10.01)
date: 371 days 14 hours ago
link:
visibility: private
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
        .file   "test_dasblinkenlight.c"
        .intel_syntax noprefix
        .def    ___main;        .scl    2;      .type   32;     .endef
        .section .rdata,"dr"
LC0:
        .ascii "%u\0"
LC1:
        .ascii "Zero\0"
LC2:
        .ascii "One\0"
LC3:
        .ascii "Two\0"
LC4:
        .ascii "Three\0"
LC5:
        .ascii "Four\0"
LC6:
        .ascii "\12Done\0"
        .section        .text.startup,"x"
        .p2align 2,,3
        .globl  _main
        .def    _main;  .scl    2;      .type   32;     .endef
_main:
LFB12:
        .cfi_startproc
        push    ebp
        .cfi_def_cfa_offset 8
        .cfi_offset 5, -8
        mov     ebp, esp
        .cfi_def_cfa_register 5
        and     esp, -16
        sub     esp, 32
        call    ___main
        lea     eax, [esp+28]
        mov     DWORD PTR [esp+4], eax
        mov     DWORD PTR [esp], OFFSET FLAT:LC0
        call    _scanf
        cmp     DWORD PTR [esp+28], 4
        ja      L2
        mov     eax, DWORD PTR [esp+28]
        jmp     [DWORD PTR L8[0+eax*4]]
        .section .rdata,"dr"
        .align 4
L8:
        .long   L3
        .long   L4
        .long   L5
        .long   L6
        .long   L7
        .section        .text.startup,"x"
L7:
        mov     DWORD PTR [esp], OFFSET FLAT:LC5
        call    _printf
        .p2align 2,,3
L2:
        mov     DWORD PTR [esp], OFFSET FLAT:LC6
        call    _printf
        xor     eax, eax
        leave
        .cfi_remember_state
        .cfi_restore 5
        .cfi_def_cfa 4, 4
        ret
L6:
        .cfi_restore_state
        mov     DWORD PTR [esp], OFFSET FLAT:LC4
        call    _printf
        jmp     L2
L3:
        mov     DWORD PTR [esp], OFFSET FLAT:LC1
        call    _printf
        jmp     L2
L4:
        mov     DWORD PTR [esp], OFFSET FLAT:LC2
        call    _printf
        jmp     L2
L5:
        mov     DWORD PTR [esp], OFFSET FLAT:LC3
        call    _printf
        jmp     L2
        .cfi_endproc
LFE12:
        .def    _scanf; .scl    2;      .type   32;     .endef
        .def    _printf;        .scl    2;      .type   32;     .endef