main.asm

来自「开放源码的编译器open watcom 1.6.0版的源代码」· 汇编 代码 · 共 1,574 行 · 第 1/5 页

ASM
1,574
字号
                mov     edx,offset DGROUP:L159
                mov     eax,dword ptr _AsmFiles+0cH
                call    near ptr fopen_
                mov     dword ptr _AsmFiles,eax
                cmp     dword ptr _AsmFiles,00000000H
                jne     short L30
                push    dword ptr _AsmFiles+0cH
                push    00000001H
                call    near ptr Fatal_
                add     esp,00000008H
L30:            mov     eax,dword ptr _AsmFiles+14H
                call    near ptr ObjWriteOpen_
                mov     dword ptr _pobjState+1H,eax
                cmp     dword ptr _pobjState+1H,00000000H
                jne     short L31
                push    dword ptr _AsmFiles+14H
                push    00000001H
                call    near ptr Fatal_
                add     esp,00000008H
L31:            mov     byte ptr _pobjState,02H
                call    near ptr DelErrFile_
                lea     esp,[ebp]-14H
                pop     edi
                pop     esi
                pop     edx
                pop     ecx
                pop     ebx
                pop     ebp
                ret
get_fname_:     push    ebp
                mov     ebp,esp
                push    000001b0H
                call    near ptr __CHK
                push    ebx
                push    ecx
                push    esi
                push    edi
                sub     esp,00000190H
                mov     dword ptr [ebp]-24H,eax
                mov     dword ptr [ebp]-28H,edx
                cmp     dword ptr [ebp]-28H,00000000H
                jne     near ptr L37
                cmp     dword ptr [ebp]-24H,00000000H
                jne     short L32
                lea     edx,[ebp]-78H
                mov     eax,0000043fH
                call    near ptr MsgGet_
                lea     eax,[ebp]-78H
                push    eax
                push    00000001H
                call    near ptr Fatal_
                add     esp,00000008H
L32:            cmp     dword ptr _AsmFiles+0cH,00000000H
                je      short L33
                push    00000005H
                call    near ptr Fatal_
                add     esp,00000004H
L33:            lea     eax,[ebp]-20H
                push    eax
                lea     eax,[ebp]-1cH
                push    eax
                lea     ecx,[ebp]-18H
                lea     ebx,[ebp]-14H
                lea     edx,[ebp]-19cH
                mov     eax,dword ptr [ebp]-24H
                call    near ptr _splitpath2_
                mov     eax,dword ptr [ebp]-20H
                cmp     byte ptr [eax],00H
                jne     short L34
                mov     dword ptr [ebp]-20H,offset DGROUP:L160
L34:            mov     eax,dword ptr [ebp]-20H
                push    eax
                mov     ecx,dword ptr [ebp]-1cH
                mov     ebx,dword ptr [ebp]-18H
                mov     edx,dword ptr [ebp]-14H
                lea     eax,[ebp]-108H
                call    near ptr _makepath_
                lea     eax,[ebp]-108H
                call    near ptr strlen_
                inc     eax
                call    near ptr AsmAlloc_
                mov     dword ptr _AsmFiles+0cH,eax
                lea     edx,[ebp]-108H
                mov     eax,dword ptr _AsmFiles+0cH
                call    near ptr strcpy_
                cmp     dword ptr _AsmFiles+14H,00000000H
                jne     short L35
                mov     dword ptr [ebp]-20H,offset DGROUP:L161
                mov     eax,dword ptr [ebp]-20H
                push    eax
                mov     ecx,dword ptr [ebp]-1cH
                xor     ebx,ebx
                xor     edx,edx
                lea     eax,[ebp]-108H
                call    near ptr _makepath_
                lea     eax,[ebp]-108H
                call    near ptr strlen_
                inc     eax
                call    near ptr AsmAlloc_
                mov     dword ptr _AsmFiles+14H,eax
                lea     edx,[ebp]-108H
                mov     eax,dword ptr _AsmFiles+14H
                call    near ptr strcpy_
L35:            cmp     dword ptr _AsmFiles+10H,00000000H
                jne     short L36
                mov     dword ptr [ebp]-20H,offset DGROUP:L162
                mov     eax,dword ptr [ebp]-20H
                push    eax
                mov     ecx,dword ptr [ebp]-1cH
                xor     ebx,ebx
                xor     edx,edx
                lea     eax,[ebp]-108H
                call    near ptr _makepath_
                lea     eax,[ebp]-108H
                call    near ptr strlen_
                inc     eax
                call    near ptr AsmAlloc_
                mov     dword ptr _AsmFiles+10H,eax
                lea     edx,[ebp]-108H
                mov     eax,dword ptr _AsmFiles+10H
                call    near ptr strcpy_
L36:            jmp     near ptr L44
L37:            lea     eax,[ebp]-20H
                push    eax
                lea     eax,[ebp]-1cH
                push    eax
                lea     ecx,[ebp]-18H
                lea     ebx,[ebp]-14H
                lea     edx,[ebp]-19cH
                mov     eax,dword ptr [ebp]-24H
                call    near ptr _splitpath2_
                mov     eax,dword ptr [ebp]-20H
                cmp     byte ptr [eax],00H
                jne     short L40
                cmp     dword ptr [ebp]-28H,00000001H
                jne     short L38
                mov     dword ptr [ebp]-1a0H,offset DGROUP:L162
                jmp     short L39
L38:            mov     dword ptr [ebp]-1a0H,offset DGROUP:L161
L39:            mov     eax,dword ptr [ebp]-1a0H
                mov     dword ptr [ebp]-20H,eax
                jmp     short L41
L40:            mov     edx,dword ptr [ebp]-20H
                lea     eax,[ebp]-78H
                call    near ptr strcpy_
                lea     eax,[ebp]-78H
                mov     dword ptr [ebp]-20H,eax
L41:            mov     eax,dword ptr [ebp]-1cH
                cmp     byte ptr [eax],00H
                je      short L42
                mov     eax,dword ptr [ebp]-1cH
                cmp     byte ptr [eax],2aH
                jne     short L43
L42:            push    00000000H
                lea     eax,[ebp]-1cH
                push    eax
                xor     ecx,ecx
                xor     ebx,ebx
                lea     edx,[ebp]-19cH
                mov     eax,dword ptr _AsmFiles+0cH
                call    near ptr _splitpath2_
                mov     dword ptr [ebp]-14H,offset DGROUP:L163
                mov     dword ptr [ebp]-18H,offset DGROUP:L163
L43:            mov     eax,dword ptr [ebp]-20H
                push    eax
                mov     ecx,dword ptr [ebp]-1cH
                mov     ebx,dword ptr [ebp]-18H
                mov     edx,dword ptr [ebp]-14H
                lea     eax,[ebp]-108H
                call    near ptr _makepath_
                lea     eax,[ebp]-108H
                call    near ptr strlen_
                inc     eax
                call    near ptr AsmAlloc_
                mov     edx,dword ptr [ebp]-28H
                shl     edx,02H
                mov     dword ptr _AsmFiles[edx]+0cH,eax
                lea     edx,[ebp]-108H
                mov     eax,dword ptr [ebp]-28H
                shl     eax,02H
                mov     eax,dword ptr _AsmFiles[eax]+0cH
                call    near ptr strcpy_
L44:            lea     esp,[ebp]-10H
                pop     edi
                pop     esi
                pop     ecx
                pop     ebx
                pop     ebp
                ret
do_envvar_cmdline_:
                push    ebp
                mov     ebp,esp
                push    0000002cH
                call    near ptr __CHK
                push    ebx
                push    ecx
                push    esi
                push    edi
                sub     esp,00000014H
                mov     dword ptr [ebp]-24H,eax
                mov     dword ptr [ebp]-20H,edx
                cmp     dword ptr [ebp]-20H,0000000aH
                jge     near ptr L56
                mov     eax,dword ptr [ebp]-24H
                call    near ptr getenv_
                mov     dword ptr [ebp]-14H,eax
                cmp     dword ptr [ebp]-14H,00000000H
                je      near ptr L56
                mov     eax,dword ptr [ebp]-14H
                mov     dword ptr [ebp]-18H,eax
                mov     eax,dword ptr [ebp]-14H
                mov     dword ptr [ebp]-1cH,eax
L45:            mov     eax,dword ptr [ebp]-18H
                cmp     byte ptr [eax],00H
                je      near ptr L56
L46:            mov     eax,dword ptr [ebp]-1cH
                cmp     byte ptr [eax],20H
                je      short L47
                mov     eax,dword ptr [ebp]-1cH
                mov     al,byte ptr [eax]
                and     eax,000000ffH
                cmp     eax,00002f74H
                jne     short L48
L47:            jmp     short L49
L48:            mov     eax,dword ptr [ebp]-1cH
                cmp     byte ptr [eax],00H
                jne     short L50
L49:            jmp     short L51
L50:            mov     eax,dword ptr [ebp]-1cH
                inc     dword ptr [ebp]-1cH
                jmp     short L46
L51:            mov     eax,dword ptr [ebp]-1cH
                cmp     byte ptr [eax],00H
                jne     short L52
                mov     edx,dword ptr [ebp]-20H
                inc     edx
                mov     eax,dword ptr [ebp]-18H
                call    near ptr parse_token_
                jmp     short L56
L52:            mov     eax,dword ptr [ebp]-1cH
                mov     byte ptr [eax],00H
                mov     eax,dword ptr [ebp]-1cH
                inc     dword ptr [ebp]-1cH
                mov     edx,dword ptr [ebp]-20H
                inc     edx
                mov     eax,dword ptr [ebp]-18H
                call    near ptr parse_token_
L53:            mov     eax,dword ptr [ebp]-1cH
                cmp     byte ptr [eax],20H
                je      short L54
                mov     eax,dword ptr [ebp]-1cH
                mov     al,byte ptr [eax]
                and     eax,000000ffH
                cmp     eax,00002f74H
                jne     short L55
L54:            mov     eax,dword ptr [ebp]-1cH
                inc     dword ptr [ebp]-1cH
                jmp     short L53
L55:            mov     eax,dword ptr [ebp]-1cH
                cmp     byte ptr [eax],00H
                je      short L56
                mov     eax,dword ptr [ebp]-1cH
                mov     dword ptr [ebp]-18H,eax
                jmp     near ptr L45
L56:            lea     esp,[ebp]-10H
                pop     edi
                pop     esi
                pop     ecx
                pop     ebx
                pop     ebp
                ret
AddConstant_:   push    ebp
                mov     ebp,esp
                push    000000f4H
                call    near ptr __CHK
                push    ebx
                push    ecx
                push    edx
                push    esi
                push    edi
                sub     esp,000000d8H
                mov     dword ptr [ebp]-1cH,eax
                mov     byte ptr [ebp]-18H,00H
L57:            cmp     byte ptr [ebp]-18H,05H
                jb      short L59
                jmp     short L60
L58:            mov     al,byte ptr [ebp]-18H
                inc     byte ptr [ebp]-18H
                jmp     short L57
L59:            xor     eax,eax
                mov     al,byte ptr [ebp]-18H
                lea     eax,[eax+eax*8]
                lea     edx,[ebp]-4cH
                add     edx,eax
                xor     eax,eax
                mov     al,byte ptr [ebp]-18H
                shl     eax,02H
                mov     dword ptr _AsmBuffer[eax],edx
                jmp     short L58
L60:            lea     edx,[ebp]-0ecH
                mov     eax,dword ptr [ebp]-1cH
                call    near ptr AsmScan_
                mov     edx,00000001H
                xor     eax,eax
                call    near ptr StoreConstant_
                lea     esp,[ebp]-14H
                pop     edi
                pop     esi
                pop     edx
                pop     ecx
                pop     ebx
                pop     ebp
                ret
ProcessCmdlineOptions_:
                push    ebp

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?