
	.386
	NO_SEGMENTS=1
	MASM6	EQU	1
	MASM	EQU	1

	include vmm.inc		;it will reset model

	.model	flat,stdcall
	include	..\include\macro.inc

	PUBLIC	R3_read
	PUBLIC	DOSEXE

.data
DOSEXE	db 4Dh,5Ah,90h,00,03,00,00,00,04,00,00h,00,0FFh,0FFh,00,00
	db 0B8h,00,00,00,00,00,00,00,40h,00h,00h,00,00,00,00,00
	db 20h-4 dup(0)
	dd 80h		;pe head ptr

	db 0eh, 1fh, 0BAh, 0eh, 00, 0B4h, 09, 0CDh, 21h, 0B8h, 01, 4Ch,0CDh, 21h
	db 'This program cannot'
	db ' be run in DOS mode.'
	db 0dh,0dh,0ah,'$'
 
.code
R3_read	PROC	p:DWORD,len:DWORD
	pushad
	mov	ebx,p
	xor	ecx,ecx
	.while	ecx<len
	mov	al,[ebx+ecx]
	inc	ecx
	.endw
	popad
	ret
R3_read	ENDP

	END