Core: move close_file function in getc.inc
authorLiu Aleaxander <Aleaxander@gmail.com>
Fri, 5 Jun 2009 22:04:16 +0000 (06:04 +0800)
committerLiu Aleaxander <Aleaxander@gmail.com>
Fri, 5 Jun 2009 22:04:16 +0000 (06:04 +0800)
because (I think) all the close_file are the same.

core/extlinux.asm
core/getc.inc

index 4a4d8ac..55ae363 100644 (file)
@@ -173,18 +173,6 @@ Files              resb MAX_OPEN*open_file_t_size
                global ThisInode
 ThisInode      resb EXT2_GOOD_OLD_INODE_SIZE   ; The most recently opened inode
 
-               section .text16
-;
-; close_file:
-;           Deallocates a file structure (pointer in SI)
-;           Assumes CS == DS.
-;
-close_file:
-               and si,si
-               jz .closed
-               mov dword [si],0                ; First dword == file_bytesleft
-               xor si,si
-.closed:       ret
 
                section .bss16
                alignb  4
index a8b4954..0aa140b 100644 (file)
@@ -87,6 +87,19 @@ openfd:
                xor ax,ax               ; ZF <- 1
                pop bx
                ret
+               
+;
+; close_file:
+;           Deallocates a file structure (pointer in SI)
+;           Assumes CS == DS.
+;
+close_file:
+               and si,si
+               jz .closed
+               mov dword [si],0                ; First dword == file_bytesleft
+               xor si,si
+.closed:       ret
+
 
 getc:
                push bx