• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            coreBugZJ

            此 blog 已棄。

            SPOJ 1. Life, the Universe, and Everything

            1. Life, the Universe, and Everything

            Your program is to use the brute-force approach in order to find the Answer to Life, the Universe, and Everything. More precisely... rewrite small numbers from input to output. Stop processing input after reading in the number 42. All numbers at input are integers of one or two digits.

            Example

            Input:
            1
            2
            88
            42
            99
            Output:
            1
            2
            88
            
            我的代碼:
            section .bss
                    buf : resb 0x4
                    len : resd 0x1
            section .text
                    global  _start
            _start : 
                    xor eax, eax
                    mov [len], eax
                    mov [buf], al
                    mov [buf+1], al
            LOOP_INPUT :
                    call INPUT
                    cmp al, 0xa
                    jne LOOP_INPUT
                    mov al, [buf]
                    cmp al, '4'
                    jne LOOP_JUDGE_E
                    mov al, [buf+1]
                    cmp al, '2'
                    jne LOOP_JUDGE_E
                    jmp EXIT
            LOOP_JUDGE_E :
                    call OUTPUT
                    jmp _start
            INPUT :
                    mov eax, 0x3
                    mov ebx, 0x0
                    mov ecx, buf
                    add ecx, [len]
                    mov edx, 0x1
                    int 0x80
                    mov eax, [len]
                    inc eax
                    mov [len], eax
                    mov al, [ecx]
                    ret
            OUTPUT :
                    mov eax, 0x4
                    mov ebx, 0x1
                    mov ecx, buf
                    mov edx, [len]
                    int 0x80
                    ret
            EXIT :
                    mov eax, 1
                    xor ebx, ebx
                    int 0x80
             
             

            posted on 2011-03-16 13:24 coreBugZJ 閱讀(1033) 評(píng)論(0)  編輯 收藏 引用 所屬分類: Assemble

            亚洲美日韩Av中文字幕无码久久久妻妇 | 嫩草影院久久国产精品| 久久国产乱子伦精品免费强| 日本精品久久久中文字幕| 久久亚洲AV无码西西人体| 欧美黑人激情性久久| 久久精品中文字幕久久| 香蕉久久永久视频| 久久综合久久久| 午夜精品久久久久久毛片| 成人a毛片久久免费播放| 久久中文字幕人妻丝袜| 激情久久久久久久久久| 色综合久久无码中文字幕| 日日狠狠久久偷偷色综合0| 国内精品伊人久久久久AV影院| 亚洲天堂久久精品| 亚洲精品乱码久久久久久自慰| 一级做a爰片久久毛片16| 欧洲成人午夜精品无码区久久| 久久99亚洲综合精品首页| 久久久久久a亚洲欧洲aⅴ| 久久久久久久久波多野高潮| 久久精品国产72国产精福利| 久久Av无码精品人妻系列| 久久精品国产日本波多野结衣| 久久九九免费高清视频| 国产精品一区二区久久| 999久久久免费精品国产| 久久精品黄AA片一区二区三区| 久久人人爽人人人人片av| 一本久久免费视频| 久久精品无码免费不卡| 精品视频久久久久| 国产精品无码久久久久| 国产午夜电影久久| 99久久国产热无码精品免费久久久久| 亚洲精品高清国产一久久| 亚洲国产精品久久久久久| 婷婷综合久久狠狠色99h| 嫩草影院久久99|