[BITS 16]
[org 0]
[section .text]

start:
	mov ax,cs
	mov ds,ax
	mov es,ax

	mov ah,03
	mov bh,0
	int 10h

	call _main

	jmp 0x1000:0

global _fun
global _main
global _printf

[segment .text]

%include "io.asm"


%define _a 4
%define _b 6

_fun:
	push bp
	mov bp,sp
	push word [bp+_a]
	push C0
	call _printf
	add sp,word 4
	push word [bp+_b]
	push C1
	call _printf
	add sp,word 4
	leave
	ret

%undef _a
%undef _b


_main:
	push bp
	mov bp,sp
	push 2
	push 1
	call _fun
	add sp,word 4
	mov ax,word 0
	leave
	ret



[section .data]

C0: db 'a == %d',10,0
C1: db 'b == %d',10,0

[section .bss]

answer: resb 20
