default:
	make prog

all:
	make clean
	make prog

dump:
	ndisasm -b16 -o7c00h -a -s7c3eh edit.com > edit.asm
	clean_edit > edit2.asm
	nasm -f bin edit2.asm -o edit2.com

prog:
	make hello.com
	make do_while.com
	make expr.com
	make for2.com
	make if2.com
	make param.com
	make pointer.com
	make struct.com
	make switch.com
	make while.com
	make pf.com
	make array.com
	make printf.com
	make global.com
	make struct_array.com
	make sizeof.com
	make pointer_struct.com
	make bits.com
	make matrix.com
	make assign.com
	make sf.com
	make run.com

run.com:run.c
	cc run

sf.com:sf.c
	cc sf

assign.com:assign.c
	cc assign

libc.asm:libc.c
	c libc.c libc.asm

edit:
	objdump -D edit.com > edit.asm

hello.com:hello.c
	cc hello

do_while.com:do_while.c
	cc do_while

expr.com:expr.c
	cc expr

for2.com:for2.c
	cc for2

if2.com:if2.c
	cc if2

param.com:param.c
	cc param

pointer.com:pointer.c
	cc pointer

struct.com:struct.c
	cc struct

switch.com:switch.c
	cc switch

while.com:while.c
	cc while

pf.com:pf.c
	cc pf

array.com:array.c
	cc array

printf.com:printf.c
	cc printf

global.com:global.c
	cc global

struct_array.com:struct_array.c
	cc struct_array

sizeof.com:sizeof.c
	cc sizeof

pointer_struct.com:pointer_struct.c
	cc pointer_struct

bits.com:bits.c
	cc bits

matrix.com:matrix.c
	cc matrix

compile:
	copy debug\c.exe

test:
	do_while.com
	expr.com
	for2.com
	if2.com
	param.com
	pointer.com
	struct.com
	switch.com
	while.com
	pf.com
	array.com
	struct_array.com
	sizeof.com
	pointer_struct.com
	bits.com
	matrix.com
	assign.com

tools:
	cl cc.cpp
	cl cpp.cpp

clean:
	del *.com
	del *.temp.c
