;
; C ASSEMBLY LANGAUGE MACROS...
;
; Author: Matthew Coan
; Date: Wed Sep 25 03:06:00 EDT 2013
;

%macro c_push 1
	mov ax,%1
	push ax
%endmacro

%macro c_apush 1
	mov ax,[bp+%1]
	push ax
%endmacro

%macro c_pop 1
	pop %1
%endmacro

%macro c_apop 1
	pop ax
	mov [bp+%1],ax
%endmacro

%macro c_call 1
	mov dx,%1
	call dx
%endmacro

%macro c_jmp 1
	mov dx,%1
	jmp dx
%endmacro

%macro c_add 0
	pop bx
	pop dx
	add bx,dx
	push bx
%endmacro

%macro c_sub 0
	pop bx
	pop dx
	sub bx,dx
	push bx
%endmacro

%macro c_mul 0
	pop bx
	pop dx
	imul bx,dx
	push bx
%endmacro

%macro c_div 0
	pop bx
	pop dx
	div bx,dx
	push bx
%endmacro

%macro c_and 0
	pop bx
	pop dx
	and bx,dx
	push bx
%endmacro

%macro c_not 0
	pop dx
	not dx
	push dx
%endmacro

%macro c_or 0
	pop bx
	pop dx
	or bx,dx
	push bx
%endmacro

%macro c_begin 0
	push bp
	mov bp,sp
%endmacro

%macro c_end 0
	leave
	ret
%endmacro

%macro c_alloc 1
	sub sp,%1
%endmacro 

%macro c_dealloc 1
	add sp,%1
%endmacro 

%macro c_lt 0
%endmacro

%macro c_gt 0
%endmacro

%macro c_lteq 0
%endmacro

%macro c_gteq 0
%endmacro

%macro c_lsh 0
%endmacro

%macro c_rsh 0
%endmacro

%macro c_b_and 0
%endmacro

%macro c_b_or 0
%endmacro

%macro c_b_xor 0
%endmacro

%macro c_b_not 0
%endmacro


