.586P
.MODEL FLAT, STDCALL

EXTRN ExitProcess:PROC
EXTRN MessageBoxA:PROC

.CODE
Start:
 SUB  EAX,EAX
 MOV  DX,1234H
 IN   EAX,DX
 CMP  EAX,"DNGL"
 LEA  EAX,IsPresent
 MOV  EDX,30H
 JE   Write
 LEA  EAX,IsNotPresent
 MOV  EDX,40H
Write:
 CALL MessageBoxA, 0, EAX, OFFSET mTitle, EDX
 CALL ExitProcess, 0

.DATA
 mTitle       DB "SoftDongle Test",0
 IsPresent    DB "Dongle is present!",0
 IsNotPresent DB "Dongle isn't present!",0

END Start

