global _start

section .data
xmsg: db "x is "
ymsg: db "y is "
nl: db 0ah,0dh
end:

section .bss
struct: resb 8
dmsg: resb 1

section .text

_start:
	; your code goes here

; fill the struct
mov eax,struct
mov byte [eax],4
mov byte [eax+4],9
; erase ~evidence~ register
xor eax,eax
; read the struct
mov esi,struct
mov eax,xmsg
mov ebx,ymsg
call print
mov eax,[esi]
add eax,48
mov [dmsg],eax
mov eax,dmsg
mov ebx,eax
inc ebx
call print
mov eax,nl
mov ebx,end
call print
mov eax,ymsg
mov ebx,nl
call print
mov eax,[esi+4]
add eax,48
mov [dmsg],eax
mov eax,dmsg
mov ebx,eax
inc ebx
call print
mov eax,nl
mov ebx,end
call print
; clear ... yk
xor eax,eax
xor ebx,ebx
xor ecx,ecx
xor edx,edx
xor esi,esi


	je		exit

exit:
	mov		eax, 01h		; exit()
	xor		ebx, ebx		; errno
	int		80h

print:
mov ecx,eax
sub ebx,eax
mov edx,ebx
mov eax,4
mov ebx,1
int 80h
ret