        .model small
        .386
        .code
        	mov eax, 1	;We want to use the value 1 as our argument
	cpuid		;call the cpuid instruction
	push edx	;We need to store an extra copy of the flags on the stack
	
	and edx, 1	;now we can 'and' out the first bit
	cmp edx, 0	;compare the result with 0
        je errr          ;If it's zero this feature's not supported

	pop edx		;Now we need to restore the flags to the original for another test
	shr edx, 23	;Shift the flags to the right 23 times so the mmx value is in the first bit
	and edx, 1	;Now check for mmx
	cmp edx, 0	;Check to see if it's supported
        je errr          ;If it's not, jmp to err.
	
	;Other wise continue
	mov eax, 1
	ret

errr:   mov eax, 0 
	ret	

        mov ah,4ch
        int 21h
        end
