[BITS 16]
[section .text]

org 100h

start:
jmp _main

	call _main

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

[segment .text]

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

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



_main:
	push bp
	mov bp,sp
	push 1234
	push C0
	call _printf
	add sp,word 4
	mov ax,word 0
	leave
	ret



[section .data]

hex db "0x0000",10,13,0
hexc db "0123456789ABCDEF"
C100: db 'OPEN NEXT...',13,10,0
C101: db 'READ NEXT...',13,10,0
C102: db 'CLOSE NEXT...',13,10,0
filename: db 'hello16',0
C0: db 'number==%d',13,10,0

[section .bss]

file: resw 1
buffer: resw 1
temp_word: resd 1
the_ch: resw 1
answer: resb 20
