📄 stprin~1.asm
字号:
.386p
ifdef ??version
if ??version GT 500H
.mmx
endif
endif
model flat
ifndef ??version
?debug macro
endm
endif
?debug S "E:\WORK\打印超时\StPrinter.cpp"
?debug T "E:\WORK\打印超时\StPrinter.cpp"
_TEXT segment dword public use32 'CODE'
_TEXT ends
_DATA segment dword public use32 'DATA'
_DATA ends
_BSS segment dword public use32 'BSS'
_BSS ends
DGROUP group _BSS,_DATA
_DATA segment dword public use32 'DATA'
align 2
_IoPortBase label word
dw 888
_DATA ends
_BSS segment dword public use32 'BSS'
align 4
_CircleTimes label dword
db 4 dup(?)
_BSS ends
_DATA segment dword public use32 'DATA'
align 2
_MakePrt label word
dw 15
_DATA ends
_TEXT segment dword public use32 'CODE'
DllEntryPoint segment virtual
align 2
@DllEntryPoint proc near
?live16385@0:
@1:
push ebp
mov ebp,esp
mov eax,1
@3:
@2:
pop ebp
ret 12
@DllEntryPoint endp
DllEntryPoint ends
_TEXT ends
_TEXT segment dword public use32 'CODE'
@_outp$qusuc segment virtual
align 2
@@_outp$qusuc proc near
?live16386@0:
push ebp
mov ebp,esp
@4:
mov dx, word ptr [ebp+8]
mov al, byte ptr [ebp+12]
out dx, al
xor ah, ah
movzx eax,ax
@6:
@5:
pop ebp
ret
@@_outp$qusuc endp
@_outp$qusuc ends
_TEXT ends
_TEXT segment dword public use32 'CODE'
@_inp$qus segment virtual
align 2
@@_inp$qus proc near
?live16387@0:
push ebp
mov ebp,esp
@7:
mov dx,word ptr [ebp+8]
in al,dx
xor ah,ah
@9:
@8:
pop ebp
ret
@@_inp$qus endp
@_inp$qus ends
_TEXT ends
_TEXT segment dword public use32 'CODE'
SelectPrinter segment virtual
align 2
@SelectPrinter proc near
?live16388@0:
@10:
push ebp
mov ebp,esp
mov eax,dword ptr [ebp+8]
?live16388@16: ; EAX = _prt
test eax,eax
jne short @11
mov word ptr [_MakePrt],15
@11:
dec eax
jne short @12
mov word ptr [_MakePrt],7
?live16388@48: ;
@12:
@13:
pop ebp
ret 4
@SelectPrinter endp
SelectPrinter ends
_TEXT ends
_TEXT segment dword public use32 'CODE'
Set_IoPortBase segment virtual
align 2
@Set_IoPortBase proc near
?live16389@0:
@14:
push ebp
mov ebp,esp
mov ax,word ptr [ebp+8]
mov word ptr [_IoPortBase],ax
@15:
pop ebp
ret 4
@Set_IoPortBase endp
Set_IoPortBase ends
_TEXT ends
_TEXT segment dword public use32 'CODE'
InitPrinter segment virtual
align 2
@InitPrinter proc near
?live16390@0:
@16:
push ebx
push esi
push edi
mov ebx,offset _CircleTimes
mov edi,offset _IoPortBase
?live16390@16: ; EBX = &_CircleTimes, EDI = &_IoPortBase
call @GetTickCount
mov esi,eax
?live16390@32: ; EBX = &_CircleTimes, ESI = BeginTimeMillis, EDI = &_IoPortBase
;
xor eax,eax
mov dword ptr [ebx],eax
jmp short @18
@17:
inc dword ptr [ebx]
@18:
cmp dword ptr [ebx],100000000
jl short @17
call @GetTickCount
mov ecx,eax
sub ecx,esi
?live16390@64: ; ECX = LapseMillis, EBX = &_CircleTimes, EDI = &_IoPortBase
test ecx,ecx
jle short @20
mov eax,100000000
cdq
idiv ecx
mov dword ptr [ebx],eax
jmp short @21
?live16390@96: ; EBX = &_CircleTimes, EDI = &_IoPortBase
@20:
mov dword ptr [ebx],100000
?live16390@112: ; EDI = &_IoPortBase
@21:
push 0
mov cx,word ptr [edi]
add cx,2
push ecx
call @@_outp$qusuc
add esp,8
push 10
call @Sleep
push 255
mov ax,word ptr [edi]
add ax,2
push eax
call @@_outp$qusuc
add esp,8
push 10
call @Sleep
mov dl,byte ptr [_MakePrt]
and dl,8
push edx
mov cx,word ptr [edi]
add cx,2
push ecx
call @@_outp$qusuc
add esp,8
push 10
call @Sleep
mov al,byte ptr [_MakePrt]
and al,-52
push eax
mov dx,word ptr [edi]
add dx,2
push edx
call @@_outp$qusuc
add esp,8
push 300
call @Sleep
call @IsPrnStatusOk
mov ebx,eax
?live16390@256: ; EBX = ret, EDI = &_IoPortBase
test ebx,ebx
je @22
push 0
mov ax,word ptr [edi]
add ax,2
push eax
call @@_outp$qusuc
add esp,8
push 10
call @Sleep
push 255
mov dx,word ptr [edi]
add dx,2
push edx
call @@_outp$qusuc
add esp,8
push 10
call @Sleep
mov cl,byte ptr [_MakePrt]
and cl,8
push ecx
mov ax,word ptr [edi]
add ax,2
push eax
call @@_outp$qusuc
add esp,8
push 10
call @Sleep
mov dl,byte ptr [_MakePrt]
and dl,-52
push edx
mov cx,word ptr [edi]
add cx,2
push ecx
call @@_outp$qusuc
add esp,8
push 200
call @Sleep
mov ax,word ptr [edi]
inc eax
push eax
call @@_inp$qus
pop ecx
test al,-128
jne short @23
mov eax,ebx
jmp @24
?live16390@416: ;
@23:
@22:
push 27
call @biosprint
mov ebx,eax
test ebx,ebx
je short @25
mov eax,ebx
jmp @24
@25:
push 64
call @biosprint
mov ebx,eax
test ebx,ebx
je short @26
mov eax,ebx
jmp @24
@26:
push 27
call @biosprint
mov ebx,eax
test ebx,ebx
je short @27
mov eax,ebx
jmp @24
@27:
push 103
call @biosprint
mov ebx,eax
test ebx,ebx
je short @28
mov eax,ebx
jmp @24
@28:
push 18
call @biosprint
mov ebx,eax
test ebx,ebx
je short @29
mov eax,ebx
jmp @24
@29:
push 20
call @biosprint
mov ebx,eax
test ebx,ebx
je short @30
mov eax,ebx
jmp @24
@30:
push 27
call @biosprint
mov ebx,eax
test ebx,ebx
je short @31
mov eax,ebx
jmp @24
@31:
push 84
call @biosprint
mov ebx,eax
test ebx,ebx
je short @32
mov eax,ebx
jmp @24
@32:
push 27
call @biosprint
mov ebx,eax
test ebx,ebx
je short @33
mov eax,ebx
jmp @24
@33:
push 70
call @biosprint
mov ebx,eax
test ebx,ebx
je short @34
mov eax,ebx
jmp @24
@34:
push 28
call @biosprint
mov ebx,eax
test ebx,ebx
je short @35
mov eax,ebx
jmp @24
@35:
push 120
call @biosprint
mov ebx,eax
test ebx,ebx
je short @36
mov eax,ebx
jmp @24
@36:
push 1
call @biosprint
mov ebx,eax
test ebx,ebx
je short @37
mov eax,ebx
jmp @24
@37:
push 27
call @biosprint
mov ebx,eax
test ebx,ebx
je short @38
mov eax,ebx
jmp @24
@38:
push 73
call @biosprint
mov ebx,eax
test ebx,ebx
je short @39
mov eax,ebx
jmp @24
@39:
push 0
call @biosprint
mov ebx,eax
test ebx,ebx
je short @40
mov eax,ebx
jmp @24
@40:
push 27
call @biosprint
mov ebx,eax
test ebx,ebx
je short @41
mov eax,ebx
jmp @24
@41:
push 81
call @biosprint
mov ebx,eax
test ebx,ebx
je short @42
mov eax,ebx
jmp @24
?live16390@704: ; EBX = ret
@42:
push 0
call @biosprint
test ebx,ebx
je short @43
mov eax,ebx
jmp @24
?live16390@720: ;
@43:
push 27
call @biosprint
mov ebx,eax
test ebx,ebx
je short @44
mov eax,ebx
jmp @24
@44:
push 112
call @biosprint
mov ebx,eax
test ebx,ebx
je short @45
mov eax,ebx
jmp @24
@45:
push 0
call @biosprint
mov ebx,eax
test ebx,ebx
je short @46
mov eax,ebx
jmp @24
@46:
push 27
call @biosprint
mov ebx,eax
test ebx,ebx
je short @47
mov eax,ebx
jmp @24
@47:
push 119
call @biosprint
mov ebx,eax
test ebx,ebx
je short @48
mov eax,ebx
jmp @24
@48:
push 0
call @biosprint
mov ebx,eax
test ebx,ebx
je short @49
mov eax,ebx
jmp @24
@49:
push 27
call @biosprint
mov ebx,eax
test ebx,ebx
je short @50
mov eax,ebx
jmp @24
@50:
push 120
call @biosprint
mov ebx,eax
test ebx,ebx
je short @51
mov eax,ebx
jmp @24
@51:
push 1
call @biosprint
mov ebx,eax
test ebx,ebx
je short @52
mov eax,ebx
jmp @24
@52:
push 27
call @biosprint
mov ebx,eax
test ebx,ebx
je short @53
mov eax,ebx
jmp @24
@53:
push 33
call @biosprint
mov ebx,eax
test ebx,ebx
je short @54
mov eax,ebx
jmp @24
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -