⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 procvid.asm

📁 linux下的任天堂模拟器代码。供大家参考。
💻 ASM
📖 第 1 页 / 共 5 页
字号:
    jmp %%yes3%%try3%endif    test byte[pressed+4],1    jz %%no3%%yes3    mov bl,3%%no3%ifdef __UNIXSDL__    cmp dword[numlockptr],0 ; if numlock on, let's try this first    je %%try4    test byte[pressed+04Bh],1    jz %%try4    jmp %%yes4%%try4%endif    test byte[pressed+5],1    jz %%no4%%yes4    mov bl,4%%no4%ifdef __UNIXSDL__    cmp dword[numlockptr],0 ; if numlock on, let's try this first    je %%try5    test byte[pressed+04Ch],1    jz %%try5    jmp %%yes5%%try5%endif    test byte[pressed+6],1    jz %%no5%%yes5    mov bl,5%%no5%ifdef __UNIXSDL__    cmp dword[numlockptr],0 ; if numlock on, let's try this first    je %%try6    test byte[pressed+04Dh],1    jz %%try6    jmp %%yes6%%try6%endif    test byte[pressed+7],1    jz %%no6%%yes6    mov bl,6%%no6%ifdef __UNIXSDL__    cmp dword[numlockptr],0 ; if numlock on, let's try this first    je %%try7    test byte[pressed+047h],1    jz %%try7    jmp %%yes7%%try7%endif    test byte[pressed+8],1    jz %%no7%%yes7    mov bl,7%%no7%ifdef __UNIXSDL__    cmp dword[numlockptr],0 ; if numlock on, let's try this first    je %%try8    test byte[pressed+048h],1    jz %%try8    jmp %%yes8%%try8%endif    test byte[pressed+9],1    jz %%no8%%yes8    mov bl,8%%no8%ifdef __UNIXSDL__    cmp dword[numlockptr],0 ; if numlock on, let's try this first    je %%try9    test byte[pressed+049h],1    jz %%try9    jmp %%yes9%%try9%endif    test byte[pressed+10],1    jz %%no9%%yes9    mov bl,9%%no9%ifdef __UNIXSDL__    cmp dword[numlockptr],0 ; if numlock on, let's try this first    je %%try0    test byte[pressed+052h],1    jz %%try0    jmp %%yes0%%try0%endif    test byte[pressed+11],1    jz %%no0%%yes0    mov bl,0%%no0%ifdef __UNIXSDL__    cmp dword[numlockptr],1 ; if numlock on, disregard numpad    je %%noleft%endif    test byte[pressed+75],1    jz %%noleft    cmp bl,0    jne %%plzsub    add bl,9    jmp %%donesub%%plzsub    dec bl%%donesub    mov byte[pressed+75],2%%noleft%ifdef __UNIXSDL__    cmp dword[numlockptr],1 ; if numlock on, disregard numpad    je %%noright%endif    test byte[pressed+77],1    jz %%noright    cmp bl,9    jne %%plzadd    sub bl,9    jmp %%doneadd%%plzadd    inc bl%%doneadd    mov byte[pressed+77],2%%noright%ifdef __UNIXSDL__    cmp dword[numlockptr],1 ; if numlock on, disregard numpad    je %%noup%endif    test byte[pressed+72],1    jz %%noup    cmp al,0    jne %%plzsubten    add al,90    jmp %%goneup%%plzsubten    sub al,10%%goneup    mov byte[pressed+72],2    add al,bl    mov [current_zst],eax    pop eax    jmp .updatescreen%1%%noup%ifdef __UNIXSDL__    cmp dword[numlockptr],1 ; if numlock on, disregard numpad    je %%nodown%endif    test byte[pressed+80],1    jz %%nodown    cmp al,90    jne %%plzaddten    sub al,90    jmp %%gonedown%%plzaddten    add al,10%%gonedown    mov byte[pressed+80],2    add al,bl    mov [current_zst],eax    pop eax    jmp .updatescreen%1%%nodown%ifndef __MSDOS__%ifdef __UNIXSDL__    test byte[pressed+92],1%else    test byte[pressed+0CBh],1%endif    jz %%noleft2    cmp bl,0    jne %%plzsub2    add bl,9    jmp %%donesub2%%plzsub2    dec bl%%donesub2%ifdef __UNIXSDL__    mov byte[pressed+92],2%else    mov byte[pressed+0CBh],2%endif%%noleft2%ifdef __UNIXSDL__    test byte[pressed+94],1%else    test byte[pressed+0CDh],1%endif    jz %%noright2    cmp bl,9    jne %%plzadd2    sub bl,9    jmp %%doneadd2%%plzadd2    inc bl%%doneadd2%ifdef __UNIXSDL__    mov byte[pressed+94],2%else    mov byte[pressed+0CDh],2%endif%%noright2%ifdef __UNIXSDL__    test byte[pressed+90],1%else    test byte[pressed+0C8h],1%endif    jz %%noup2    cmp al,0    jne %%plzsubten2    add al,90    jmp %%goneup2%%plzsubten2    sub al,10%%goneup2%ifdef __UNIXSDL__    mov byte[pressed+90],2%else    mov byte[pressed+0C8h],2%endif    add al,bl    mov [current_zst],eax    pop eax    jmp .updatescreen%1%%noup2%ifdef __UNIXSDL__    test byte[pressed+96],1%else    test byte[pressed+0D0h],1%endif    jz %%nodown2    cmp al,90    jne %%plzaddten2    sub al,90    jmp %%gonedown2%%plzaddten2    add al,10%%gonedown2%ifdef __UNIXSDL__    mov byte[pressed+96],2%else    mov byte[pressed+0D0h],2%endif    add al,bl    mov [current_zst],eax    pop eax    jmp .updatescreen%1%%nodown2%endif    add al,bl    mov [current_zst],eax    pop eax%endmacroNEWSYM saveselect    mov byte[f3menuen],1    mov byte[ForceNonTransp],1    cmp byte[ForceNewGfxOff],0    jne .nong16b    cmp byte[cbitmode],0    je .nong16b%ifdef __MSDOS__    call GetScreen%endif.nong16b    cmp dword[MessageOn],0    je .nochangem    mov dword[MessageOn],1.nochangem    mov al,[newengen]    mov byte[newengen],0    push eax    call copyvid    pop eax    mov [newengen],al    call StopSound    cmp byte[soundon],0    je .nosound    mov byte[csounddisable],1%ifdef __MSDOS__    call SB_blank%endif.nosound    cmp byte[cbitmode],1    je near .16b.updatescreen8b%ifdef __MSDOS__    call saveselectpal%endif    ; draw a small blue box with a white border    mov esi,70+70*288    add esi,[vidbuffer]    mov ecx,150    mov al,80.loop    mov byte[esi],144    inc esi    dec ecx    jnz .loop    add esi,288-150    dec al    mov ecx,150    jnz .loop    ; draw filled boxes for existing files    call DetermineNewest    push ebx    mov eax,[current_zst]    push eax    mov bl,10    div bl    add al,'0'    mov [slotlevelnum],al    drawfillboxhelp 0    drawfillboxhelp 1    drawfillboxhelp 2    drawfillboxhelp 3    drawfillboxhelp 4    drawfillboxhelp 5    drawfillboxhelp 6    drawfillboxhelp 7    drawfillboxhelp 8    drawfillboxhelp 9    pop eax    mov [current_zst],eax    pop ebx    mov esi,75+73*288    add esi,[vidbuffer]    mov edi,.stringa    call OutputGraphicString    mov esi,75+83*288    add esi,[vidbuffer]    mov edi,.stringb    call OutputGraphicString    mov esi,75+93*288    add esi,[vidbuffer]    mov edi,.stringb2    call OutputGraphicString    mov esi,171+93*288    add esi,[vidbuffer]    mov edi,slotlevelnum    call OutputGraphicString    mov esi,75+118*288    add esi,[vidbuffer]    mov edi,.stringc    call OutputGraphicString    mov esi,75+128*288    add esi,[vidbuffer]    mov edi,.stringd    call OutputGraphicString    mov esi,75+138*288    add esi,[vidbuffer]    mov edi,.stringe    call OutputGraphicString    mov al,128    mov esi,70+70*288    add esi,[vidbuffer]    mov ecx,150    call drawhline    mov esi,70+70*288    add esi,[vidbuffer]    mov ecx,80    call drawvline    mov esi,70+149*288    add esi,[vidbuffer]    mov ecx,150    call drawhline    mov esi,219+70*288    add esi,[vidbuffer]    mov ecx,80    call drawvline    mov esi,75+103*288    add esi,[vidbuffer]    mov ecx,111    call drawhline    mov esi,75+114*288    add esi,[vidbuffer]    mov ecx,111    call drawhline    mov esi,75+104*288    add esi,[vidbuffer]    mov bl,11.nextvline    mov ecx,10    push esi    push ebx    call drawvline    pop ebx    pop esi    add esi,11    dec bl    jnz .nextvline    mov esi,78+106*288    add esi,[vidbuffer]    mov al,1    call outputchar    mov bl,9.nextnumchar    add esi,11    inc al    push ebx    call outputchar    pop ebx    dec bl    jnz .nextnumchar    mov byte[curblank],0h    mov dl,160    call drawbox    push ebx    call copyvid    pop ebx    ; wait until esc/enter is pressed.noesc    mov dl,128    call drawbox    mov ecx,2500    call delay    testpressed 8b    test byte[pressed+1],1    jnz near .esc    test byte[pressed+28],1    jnz near .enter    mov ecx,2500    call delay    testpressed 8b    test byte[pressed+1],1    jnz near .esc    test byte[pressed+28],1    jnz near .enter    push ebx    call copyvid    pop ebx    mov ecx,2500    call delay    testpressed 8b    test byte[pressed+1],1    jnz near .esc    test byte[pressed+28],1    jnz near .enter    mov ecx,2500    call delay    testpressed 8b    test byte[pressed+1],1    jnz near .esc    test byte[pressed+28],1    jnz near .enter    mov dl,160    call drawbox    push ebx    call copyvid    pop ebx    jmp .noesc.enter    mov byte[pressed+28],2.esc    mov eax,pressed    mov ecx,256.looppr    cmp byte[eax],1    jne .notpr    mov byte[eax],2.notpr    inc eax    dec ecx    jnz .looppr%ifdef __MSDOS__    mov byte[pressed+1],0%endif    mov word[t1cc],0    mov byte[csounddisable],0    call StartSound%ifdef __MSDOS__    call dosmakepal%endif    mov byte[f3menuen],0    mov byte[ForceNonTransp],0    retSECTION .bss.allred resw 1.allgrn resw 1.allgrnb resw 1.blue   resw 1.stepb  resw 1SECTION .text; Start 16-bit stuff here.16b    cmp byte[newengen],0    je .notng    mov byte[GUIOn],1.notng    ; draw shadow behind box    mov esi,80*2+90*288*2    add esi,[vidbuffer]    mov ecx,150    mov al,70    mov ah,5.loop16b2    mov dx,[esi]    and dx,[vesa2_clbit]    shr dx,1    mov [esi],dx    add esi,2    dec ecx    jnz .loop16b2    add esi,288*2-150*2    dec al    mov ecx,150    jnz .loop16b2.updatescreen16b    mov ax,018h    mov cl,[vesa2_rpos]    shl ax,cl    mov [.allgrn],ax    mov ax,25    mov cl,[vesa2_rpos]    shl ax,cl    mov [.allgrnb],ax    mov ax,12    mov cl,[vesa2_gpos]    shl ax,cl    or [.allgrnb],ax    mov ax,01Fh    mov cl,[vesa2_rpos]    shl ax,cl    mov [.allred],ax    mov ax,012h    mov cl,[vesa2_bpos]    shl ax,cl    mov dx,ax    mov ax,01h    mov cl,[vesa2_gpos]    shl ax,cl    mov bx,ax    mov ax,01h    mov cl,[vesa2_rpos]    shl ax,cl    or bx,ax    ; draw a small blue box with a white border    mov esi,70*2+70*288*2    add esi,[vidbuffer]    mov ecx,150    mov al,80    mov ah,5.loop16b    mov [esi],dx    add esi,2    dec ecx    jnz .loop16b    add esi,288*2-150*2    dec ah    jnz .nocolinc16b    add dx,bx    mov ah,5.nocolinc16b    dec al    mov ecx,150    jnz .loop16b    ; draw filled boxes for existing files    call DetermineNewest    push ebx    mov eax,[current_zst]    push eax    mov bl,10    div bl    add al,'0'    mov [slotlevelnum],al    drawfillboxhelp16b 0    drawfillboxhelp16b 1    drawfillboxhelp16b 2    drawfillboxhelp16b 3    drawfillboxhelp16b 4    drawfillboxhelp16b 5    drawfillboxhelp16b 6    drawfillboxhelp16b 7    drawfillboxhelp16b 8    drawfillboxhelp16b 9    pop eax    mov [current_zst],eax    pop ebx    mov esi,75*2+73*288*2    add esi,[vidbuffer]    mov edi,.stringa    call OutputGraphicString16b    mov esi,75*2+83*288*2    add esi,[vidbuffer]    mov edi,.stringb    call OutputGraphicString16b    mov esi,75*2+93*288*2    add esi,[vidbuffer]    mov edi,.stringb2    call OutputGraphicString16b    mov esi,171*2+93*288*2    add esi,[vidbuffer]    mov edi,slotlevelnum    call OutputGraphicString16b    mov esi,75*2+118*288*2    add esi,[vidbuffer]    mov edi,.stringc    call OutputGraphicString16b    mov esi,75*2+128*288*2    add esi,[vidbuffer]    mov edi,.stringd    call OutputGraphicString16b    mov esi,75*2+138*288*2    add esi,[vidbuffer]    mov edi,.stringe    call OutputGraphicString16b    mov ax,0FFFFh    mov esi,70*2+70*288*2    add esi,[vidbuffer]    mov ecx,150    call drawhline16b    mov esi,70*2+70*288*2    add esi,[vidbuffer]    mov ecx,80    call drawvline16b    mov esi,70*2+149*288*2    add esi,[vidbuffer]    mov ecx,150    call drawhline16b    mov esi,219*2+70*288*2

⌨️ 快捷键说明

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