Problem with executing .com files
Posted: Mon Mar 19, 2012 11:54 am
Hi,
I have problems with loading com files in my os.
The problem is:
my os normally execute com file wich file size is les than 100 bytes but when i
try to load com file wich file size is 2KB then system block...
This is a code:
What can be a problem...
I have problems with loading com files in my os.
The problem is:
my os normally execute com file wich file size is les than 100 bytes but when i
try to load com file wich file size is 2KB then system block...
This is a code:
Code: Select all
load_com_file:
mov ax, input
mov cx, 5000h ; segment
call load_com_file_fat
je fail
cli
mov ax, 5000h
mov es, ax
mov ax, es
sub ax, 10h ; "org 100h" stuff :)
mov es, ax
mov ds, ax
mov ss, ax
xor sp, sp
push 0x0010
push es
push word 100h
sti
retf
What can be a problem...