📄 a_nasm.asm
字号:
hmach3b: rol eax, 6hmach2b: and eax, 00008888hhmach4b: sub esi, 88888888hhmach1b: sbb edx, 88888888hpal4: mov bh, byte [ecx+88888888h]hoffs5: mov cl, byte [eax+88888888h] mov eax, edxhmach3c: rol eax, 6pal5: mov bl, byte [ecx+88888888h]hmach2c: and eax, 00008888h shl ebx, 16hmach4c: sub esi, 88888888hhmach1c: sbb edx, 88888888hhoffs6: mov cl, byte [eax+88888888h] mov eax, edx ;(hmach3d: rol eax, 6hmach2d: and eax, 00008888hhmach4d: sub esi, 88888888hhmach1d: sbb edx, 88888888hpal6: mov bh, byte [ecx+88888888h]hoffs7: mov cl, byte [eax+88888888h] mov eax, edx sub ebp, 4 noppal7: mov bl, byte [ecx+88888888h] jnc NEAR prebeginhline64skipthe4byte: test ebp, 2 jz skipdrawthe2 rol ebx, 16 mov word [edi+2], bx sub edi, 2skipdrawthe2: test ebp, 1 jz skipdrawthe1 shr ebx, 24 mov byte [edi+3], blskipdrawthe1: pop ebp retshorthline: test ebp, ebp jz endshorthlinebegshorthline: mov eax, esihxsiz4: shr eax, 26hysiz4: shld eax, edx, 6hoffs8: mov cl, byte [eax+88888888h]pal8: mov bl, byte [ecx+88888888h] sub esi, [asm1] sub edx, [asm2] mov byte [edi], bl dec edi dec ebp jnz begshorthlineendshorthline: pop ebp ret ;eax: 00000000 00000000 00000000 temp---- ;ebx: 00000000 00000000 00000000 temp---- ;ecx: UUUUUUuu uuuuuuuu uuuuuuuu uuuuuuuu ;edx: VVVVVVvv vvvvvvvv vvvvvvvv vvvvvvvv ;esi: cnt----- -------- -------- -------- ;edi: vid----- -------- -------- -------- ;ebp: paloffs- -------- -------- -------- ;esp: ???????? ???????? ???????? ????????_asm_prohlineasm4: push ebp lea ebp, [ecx+88888888h]prohpala: mov ecx, esi lea esi, [eax+1] sub edi, esiprohbeg: mov eax, ecx shr eax, 20prohshru: mov ebx, edx shr ebx, 26prohshrv: and eax, 88888888hprohand: movzx eax, byte [eax+ebx+88888888h]prohbuf: mov al, [eax+ebp] sub ecx, [asm1] sub edx, [asm2] mov [edi+esi], al dec esi jnz prohbeg pop ebp retALIGN 16_asm_setupvlineasm: ;First 2 lines for VLINEASM1, rest for VLINEASM4 mov byte [premach3a+2], al mov byte [mach3a+2], al push ecx mov byte [machvsh1+2], al ;32-shy mov byte [machvsh3+2], al ;32-shy mov byte [machvsh5+2], al ;32-shy mov byte [machvsh6+2], al ;32-shy mov ah, al sub ah, 16 mov byte [machvsh8+2], ah ;16-shy neg al mov byte [machvsh7+2], al ;shy mov byte [machvsh9+2], al ;shy mov byte [machvsh10+2], al ;shy mov byte [machvsh11+2], al ;shy mov byte [machvsh12+2], al ;shy mov cl, al mov eax, 1 shl eax, cl dec eax mov dword [machvsh2+2], eax ;(1<<shy)-1 mov dword [machvsh4+2], eax ;(1<<shy)-1 pop ecx retALIGN 16_asm_prosetupvlineasm: ;First 2 lines for VLINEASM1, rest for VLINEASM4 mov byte [premach3a+2], al mov byte [mach3a+2], al push ecx mov byte [promachvsh1+2], al ;32-shy mov byte [promachvsh3+2], al ;32-shy mov byte [promachvsh5+2], al ;32-shy mov byte [promachvsh6+2], al ;32-shy mov ah, al sub ah, 16 mov byte [promachvsh8+2], ah ;16-shy neg al mov byte [promachvsh7+2], al ;shy mov byte [promachvsh9+2], al ;shy mov byte [promachvsh10+2], al ;shy mov byte [promachvsh11+2], al ;shy mov byte [promachvsh12+2], al ;shy mov cl, al mov eax, 1 shl eax, cl dec eax mov dword [promachvsh2+2], eax ;(1<<shy)-1 mov dword [promachvsh4+2], eax ;(1<<shy)-1 pop ecx retALIGN 16_asm_setupmvlineasm: mov byte [maskmach3a+2], al mov byte [machmv13+2], al mov byte [machmv14+2], al mov byte [machmv15+2], al mov byte [machmv16+2], al retALIGN 16 _asm_setuptvlineasm: mov byte [transmach3a+2], al retALIGN 16_asm_prevlineasm1: test ecx, ecx jnz _asm_vlineasm1 add eax, edxpremach3a: shr edx, 32 mov dl, byte [esi+edx] mov cl, byte [ebx+edx] mov byte [edi], cl retALIGN 16_asm_vlineasm1: push ebp mov ebp, ebx inc ecxfixchain1a: sub edi, 320beginvline: mov ebx, edxmach3a: shr ebx, 32fixchain1b: add edi, 320 mov bl, byte [esi+ebx] add edx, eax dec ecx mov bl, byte [ebp+ebx] mov byte [edi], bl jnz short beginvline pop ebp mov eax, edx ret;Masked vlineALIGN 16_asm_mvlineasm1: push ebp mov ebp, ebxbeginmvline: mov ebx, edxmaskmach3a: shr ebx, 32 mov bl, byte [esi+ebx] cmp bl, 255 je short skipmask1maskmach3c: mov bl, [ebp+ebx] mov byte [edi], blskipmask1: add edx, eaxfixchain1m: add edi, 320 sub ecx, 1 jnc short beginmvline pop ebp mov eax, edx retALIGN 16_asm_fixtransluscence: mov dword [transmach4+2], eax mov dword [tmach1+2], eax mov dword [tmach2+2], eax mov dword [tmach3+2], eax mov dword [tmach4+2], eax mov dword [tran2traa+2], eax mov dword [tran2trab+2], eax mov dword [tran2trac+2], eax mov dword [tran2trad+2], eax retALIGN 16_asm_settransnormal: mov byte [transrev0+1], 83h mov byte [transrev1+1], 27h mov byte [transrev2+1], 3fh mov byte [transrev3+1], 98h mov byte [transrev4+1], 90h mov byte [transrev5+1], 37h mov byte [transrev6+1], 90h mov word [transrev7+0], 0f38ah mov byte [transrev8+1], 90h mov word [transrev9+0], 0f78ah mov byte [transrev10+1], 0a7h mov byte [transrev11+1], 81h mov byte [transrev12+2], 9fh mov word [transrev13+0], 0dc88h mov byte [transrev14+1], 81h mov byte [transrev15+1], 9ah mov byte [transrev16+1], 0a7h mov byte [transrev17+1], 82h retALIGN 16_asm_settransreverse: mov byte [transrev0+1], 0a3h mov byte [transrev1+1], 7h mov byte [transrev2+1], 1fh mov byte [transrev3+1], 0b8h mov byte [transrev4+1], 0b0h mov byte [transrev5+1], 17h mov byte [transrev6+1], 0b0h mov word [transrev7+0], 0d38ah mov byte [transrev8+1], 0b0h mov word [transrev9+0], 0d78ah mov byte [transrev10+1], 87h mov byte [transrev11+1], 0a1h mov byte [transrev12+2], 87h mov word [transrev13+0], 0e388h mov byte [transrev14+1], 0a1h mov byte [transrev15+1], 0bah mov byte [transrev16+1], 87h mov byte [transrev17+1], 0a2h ret;Masked & transluscent vlineALIGN 16_asm_tvlineasm1: push ebp mov ebp, eax xor eax, eax inc ecx mov dword [transmach3c+2], ebx jmp short begintvlineALIGN 16begintvline: mov ebx, edxtransmach3a: shr ebx, 32 mov bl, byte [esi+ebx] cmp bl, 255 je short skiptrans1transrev0:transmach3c: mov al, [ebx+88888888h]transrev1: mov ah, byte [edi]transmach4: mov al, byte [eax+88888888h] ;transluc[eax] mov byte [edi], alskiptrans1: add edx, ebpfixchain1t: add edi, 320 dec ecx jnz short begintvline pop ebp mov eax, edx ret ;eax: -------temp1------- ;ebx: -------temp2------- ;ecx: dat dat dat dat ;edx: ylo2 ylo4 ;esi: yhi1 yhi2 ;edi: ---videoplc/cnt---- ;ebp: yhi3 yhi4 ;esp:ALIGN 16_asm_vlineasm4: push ebp mov eax, dword [ylookup + ecx*4] add eax, edi mov dword [machvline4end+2], eax sub edi, eax mov eax, dword [bufplce] mov ebx, dword [bufplce + 4] mov ecx, dword [bufplce + 8] mov edx, dword [bufplce + 12] mov dword [machvbuf1+2], ecx mov dword [machvbuf2+2], edx mov dword [machvbuf3+2], eax mov dword [machvbuf4+2], ebx mov eax, dword [palookupoffse] mov ebx, dword [palookupoffse + 4] mov ecx, dword [palookupoffse + 8] mov edx, dword [palookupoffse + 12] mov dword [machvpal1+2], ecx mov dword [machvpal2+2], edx mov dword [machvpal3+2], eax mov dword [machvpal4+2], ebx ; 谀哪哪哪哪哪哪哪履哪哪哪哪哪哪哪
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -