[BITS 16]
[section text]

org 100h

jmp _main

global _f
global _main
global _gets
global _printf
global _scanf
global _fflush
global _getchar
global _putc
global _fopen
global _fprintf
global _fgetchar
global _fscanf
global _fgets
global _fseek
global _fread
global _fwrite
global _fclose

%include "io.asm"
%include "libc.asm"

struc __FILE
   ._fd resw 1
   ._head resw 1
   ._sector resw 1
endstruc


[section text]


_f:
	push bp
	mov bp,sp
	mov ax,word 10
	leave
	ret


%define _value -2

_main:
	push bp
	mov bp,sp
	sub sp,word 2
	push 100
	call _f
	mov bx,ax
	pop dx
	imul bx,dx
	mov [bp+_value],bx
	push word [bp+_value]
	push C0
	call _printf
	add sp,word 4
	push ax
	push word 0
	leave
	ret

%undef _value


[section .bss]

[section data]
C0: db 'value == %d',13,0
