	.386p
	ifndef	??version
?debug	macro
	endm
publicdll macro	name
	public	name
	endm
	endif
	?debug	V 300h
	?debug	S "SOURCE\TRAND.C"
	?debug	C E9757A8F310E534F555243455C5452414E442E43
	?debug	C E9C19D6F301F443A5C4445565C424F524C414E44435C494E434C55+
	?debug	C 44455C535444494F2E48
	?debug	C E9B99D6F301F443A5C4445565C424F524C414E44435C494E434C55+
	?debug	C 44455C5F444546532E48
	?debug	C E9B99D6F3020443A5C4445565C424F524C414E44435C494E434C55+
	?debug	C 44455C5F4E46494C452E48
	?debug	C E9B99D6F301F443A5C4445565C424F524C414E44435C494E434C55+
	?debug	C 44455C5F4E554C4C2E48
	?debug	C E9C19D6F3020443A5C4445565C424F524C414E44435C494E434C55+
	?debug	C 44455C5354444C49422E48
	?debug	C E9BA9D6F301F443A5C4445565C424F524C414E44435C494E434C55+
	?debug	C 44455C434F4E494F2E48
	?debug	C E9BB9D6F301D443A5C4445565C424F524C414E44435C494E434C55+
	?debug	C 44455C444F532E48
TRAND_TEXT	segment byte public use16 'CODE'
TRAND_TEXT	ends
	assume	cs:TRAND_TEXT,ds:TRAND_DATA
TRAND_DATA	segment word public use16 'FAR_DATA'
d@	label	byte
d@w	label	word
b@	label	byte
b@w	label	word
_video	label	dword
	db	0
	db	0
	db	0
	db	0
TRAND_DATA	ends
TRAND_TEXT	segment byte public use16 'CODE'
	?debug	C E8010E534F555243455C5452414E442E43757A8F+
	?debug	C 31
   ;	
   ;	int pixel(int x, int y, char c)
   ;	
	?debug	L 7
	assume	cs:TRAND_TEXT
_pixel	proc	far
	?debug	B
	push	bp
	mov	bp,sp
	push	ds
	mov	ax,TRAND_DATA
	mov	ds,ax
	?debug	C E60163020A0A00000179040A0800000178040A06+
	?debug	C 0000
	?debug	B
   ;	
   ;	{
   ;		video[(unsigned)y * 320 + x] = c;
   ;	
	?debug	L 9
	mov	ax,word ptr [bp+8]
	imul	ax,ax,320
	add	ax,word ptr [bp+6]
	les	bx,dword ptr _video
	add	bx,ax
	mov	al,byte ptr [bp+10]
	mov	byte ptr es:[bx],al
   ;	
   ;		return 0;
   ;	
	?debug	L 10
	xor	ax,ax
	jmp	short @1@58
@1@58:
   ;	
   ;	}
   ;	
	?debug	L 11
	pop	ds
	pop	bp
	ret	
	?debug	C E60178040A0600000179040A0800000163020A0A+
	?debug	C 0000
	?debug	E
	?debug	E
_pixel	endp
   ;	
   ;	int main(void)
   ;	
	?debug	L 12
	assume	cs:TRAND_TEXT
_main	proc	far
	?debug	B
	enter	28,0
	push	ds
	mov	ax,TRAND_DATA
	mov	ds,ax
	?debug	B
   ;	
   ;	{
   ;		union REGS regs;
   ;		long i, x, y;
   ;		regs.x.ax=0x13;
   ;	
	?debug	L 16
	mov	word ptr [bp-28],19
   ;	
   ;		int86(0x10, &regs, &regs);
   ;	
	?debug	L 17
	push	ss
	lea	ax,word ptr [bp-28]
	push	ax
	push	ss
	lea	ax,word ptr [bp-28]
	push	ax
	push	16
	call	far ptr _int86
	add	sp,10
   ;	
   ;		for (i = 0; i < 1000; i++) {
   ;	
	?debug	L 18
	mov	dword ptr [bp-4],large 0
	jmp	short @2@114
@2@58:
   ;	
   ;			 x = random(320);
   ;	
	?debug	L 19
	call	far ptr _rand
	movsx	eax,ax
	imul	eax,large 320
	mov	ebx,large 000008000h
	cdq	
	idiv	ebx
	movsx	eax,ax
	mov	dword ptr [bp-8],eax
   ;	
   ;			 y = random(200);
   ;	
	?debug	L 20
	call	far ptr _rand
	movsx	eax,ax
	imul	eax,large 200
	mov	ebx,large 000008000h
	cdq	
	idiv	ebx
	movsx	eax,ax
	mov	dword ptr [bp-12],eax
   ;	
   ;			 pixel(x,y,7);
   ;	
	?debug	L 21
	push	7
	push	word ptr [bp-12]
	push	word ptr [bp-8]
	push	cs
	call	near ptr _pixel
	add	sp,6
	?debug	L 18
	inc	dword ptr [bp-4]
@2@114:
	cmp	dword ptr [bp-4],large 1000
	jl	short @2@58
   ;	
   ;		}
   ;		getch();
   ;	
	?debug	L 23
	call	far ptr _getch
   ;	
   ;		regs.x.ax=0x03;
   ;	
	?debug	L 24
	mov	word ptr [bp-28],3
   ;	
   ;		int86(0x10, &regs, &regs);
   ;	
	?debug	L 25
	push	ss
	lea	ax,word ptr [bp-28]
	push	ax
	push	ss
	lea	ax,word ptr [bp-28]
	push	ax
	push	16
	call	far ptr _int86
	add	sp,10
   ;	
   ;		return 0;
   ;	
	?debug	L 26
	xor	ax,ax
	jmp	short @2@170
@2@170:
   ;	
   ;	}
   ;	
	?debug	L 27
	pop	ds
	leave	
	ret	
	?debug	C E318045245475310001F01
	?debug	C E31908574F52445245475310001E04
	?debug	C E31A08425954455245475308001E0D
	?debug	C E601790602F4FF0001780602F8FF0001690602FC+
	?debug	C FF0004726567731802E4FF00
	?debug	E
	?debug	E
_main	endp
	?debug	C E9
	?debug	C FA00000000
TRAND_TEXT	ends
TRAND_DATA	segment word public use16 'FAR_DATA'
s@	label	byte
TRAND_DATA	ends
TRAND_TEXT	segment byte public use16 'CODE'
TRAND_TEXT	ends
	public	_main
	public	_pixel
	public	_video
	extrn	_int86:far
	extrn	_getch:far
	extrn	_rand:far
_s@	equ	s@
	?debug	C EA010D
	?debug	C E31B00000023040400
	?debug	C EC055F6D61696E1B1800
	?debug	C E31C00000023040400
	?debug	C EC065F706978656C1C1800
	?debug	C E31D000400160800
	?debug	C EC065F766964656F1D0000
	?debug	C E31E00000023040400
	?debug	C EB065F696E7438361E00
	?debug	C E31F00000023040400
	?debug	C EB065F67657463681F00
	?debug	C E32000000023040400
	?debug	C EB055F72616E642000
	?debug	C E60777636861725F740206000666706F735F7406+
	?debug	C 06000673697A655F740A06000452454753180700+
	?debug	C 0842595445524547531A070008574F5244524547+
	?debug	C 53190700
	?debug	C E2000178190001681AC010000000
	?debug	C E2000261780A000262780A000263780A00026478+
	?debug	C 0A000273690A000264690A000563666C61670A00+
	?debug	C 05666C6167730AC010000000
	?debug	C E20002616C0800026168080002626C0800026268+
	?debug	C 080002636C0800026368080002646C0800026468+
	?debug	C 08C008000000
	end
