_?ShoMsg PROC push edx push ecx mov edx,eax mov ecx,4 _?1: rol edx,8 mov al,dl call $OutByte loop _?1 pop ecx pop edx ret _?ShoMsg ENDP ?dump$desc PROC REG16OUT dx lea eax,GDT add edx,eax mov ecx,[edx+4] REG32OUT ecx mov ecx,[edx] REG32OUT ecx ret ?dump$desc ENDP PRINTER_PORT EQU 378h $CrLf PROC NEAR push ax mov al,13 call $OutByte mov al,10 call $OutByte pop ax ret $CrLf ENDP $Eject PROC NEAR push ax mov al,13 call $OutByte mov al,10 call $OutByte mov al,12 call $OutByte pop ax ret $Eject ENDP $Reg16Out PROC NEAR push eax call $Cvt2Word mov al,' ' call $OutByte pop eax ret $Reg16Out ENDP $Reg32Out PROC NEAR push eax call $Cvt2Dword mov al,' ' call $OutByte pop eax ret $Reg32Out ENDP $Cvt2Dword PROC NEAR push eax rol eax,16 call $Cvt2Word rol eax,16 call $Cvt2Word pop eax ret $Cvt2Dword ENDP $Cvt2Word PROC NEAR push ax xchg ah,al call $Cvt2Byte mov al,ah call $Cvt2Byte pop ax ret $Cvt2Word ENDP $Cvt2Byte PROC NEAR push ax mov ah,al shr al,4 call $Cvt2Nibble mov al,ah and al,15 call $Cvt2Nibble pop ax ret $Cvt2Byte ENDP $Cvt2Nibble PROC NEAR or al,30h cmp al,3ah jl SHORT $c2h$1 add al,7 $c2h$1: call $OutByte ret $Cvt2Nibble ENDP $OutByte PROC NEAR push cx push bx push dx mov dx,PRINTER_PORT out dx,al mov bl,16 xor cx,cx inc dx ; point to sts port $out$busy1: in al,dx test al,80h jnz SHORT $out$strobe loop $out$busy1 dec bl jnz SHORT $out$busy1 $out$strobe: mov al,0dh ; signal printer we have data inc dx ; use the strobe port out dx,al mov cx,255 $out$w8: jmp SHORT $+2 loop $out$w8 dec al ; turn strobe bit off out dx,al pop dx pop bx pop cx ret $OutByte ENDP $At PROC NEAR push ax call $OutByte mov al,' ' call $OutByte pop ax ret $At ENDP