ReturnInfinity / BareMetal-OS-legacy

BareMetal is a 64-bit OS for x86-64 based computers. The OS is written entirely in Assembly while applications can be written in Assembly, C/C++, and Rust.
1.74k stars 302 forks source link

os_bmfs_file_read not loading more than 2MiB #67

Closed IanSeyler closed 10 years ago

IanSeyler commented 10 years ago

os_bmfs_block_read seems to be ok. It calls readsectors twice for a 4MB file (as it should).

xieyuheng commented 10 years ago

bug fixed and something to learn from this ^_^

the argument RDX = disk # of readsectors should be setted by the function which calls readsectors i.e. in every loop of os_bmfs_block_read

but should not be setted by the function which calls os_bmfs_block_read i.e. os_bmfs_file_read

IanSeyler commented 10 years ago

You are correct. RDX was not being preserved between the calls to readsectors. I'm taking a look at official changes to the code (mainly if we need to worry about multiple disks at the moment).