[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 _main
global _printf

[segment .text]

%include "io.asm"


%define _a -4
%define _p -6

_main:
	push bp
	mov bp,sp
	sub sp,word 6
	lea ax,[bp+_a]
	mov [bp+_p],ax
	mov [bp+_a],word 101
	mov di,[bp+_p]
	mov [di],word 102
	push bp
	mov ax,[bp+_p]
	mov bp,ax
	mov dx,[bp]
	pop bp
	push dx
	push C0
	call _printf
	add sp,word 4
	mov ax,word 0
	leave
	ret
%undef _a
%undef _p



[section .data]

C0: db '*p == %d',10,0

[section .bss]

answer: resb 20
